當前位置: 首頁>>代碼示例>>Java>>正文


Java FloatingActionButton.startAnimation方法代碼示例

本文整理匯總了Java中android.support.design.widget.FloatingActionButton.startAnimation方法的典型用法代碼示例。如果您正苦於以下問題:Java FloatingActionButton.startAnimation方法的具體用法?Java FloatingActionButton.startAnimation怎麽用?Java FloatingActionButton.startAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.design.widget.FloatingActionButton的用法示例。


在下文中一共展示了FloatingActionButton.startAnimation方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: animateIn

import android.support.design.widget.FloatingActionButton; //導入方法依賴的package包/類
private void animateIn(FloatingActionButton button) {
    button.setVisibility(View.VISIBLE);
    if (Build.VERSION.SDK_INT >= 14) {
        ViewCompat.animate(button)
            .scaleX(1.0F)
            .scaleY(1.0F)
            .alpha(1.0F)
            .setInterpolator(INTERPOLATOR)
            .withLayer()
            .setListener(null)
            .start();
    } else {
        Animation anim = AnimationUtils.loadAnimation(button.getContext(),
            android.support.design.R.anim.design_fab_in);
        anim.setDuration(200L);
        anim.setInterpolator(INTERPOLATOR);
        button.startAnimation(anim);
    }
}
 
開發者ID:drakeet,項目名稱:rebase-android,代碼行數:20,代碼來源:ScrollAwareFABBehavior.java

示例2: animateIn

import android.support.design.widget.FloatingActionButton; //導入方法依賴的package包/類
private void animateIn(FloatingActionButton button) {
    button.setVisibility(View.VISIBLE);
    if (Build.VERSION.SDK_INT >= 14) {
        ViewCompat.animate(button)
                  .scaleX(1.0F)
                  .scaleY(1.0F)
                  .alpha(1.0F)
                  .setInterpolator(INTERPOLATOR)
                  .withLayer()
                  .setListener(null)
                  .start();
    } else {
        Animation anim = AnimationUtils.loadAnimation(button.getContext(),
                android.support.design.R.anim.design_fab_in);
        anim.setDuration(200L);
        anim.setInterpolator(INTERPOLATOR);
        button.startAnimation(anim);
    }
}
 
開發者ID:weixianshishen,項目名稱:BeautifulGirls,代碼行數:20,代碼來源:ScrollAwareFABBehavior.java

示例3: animateIn

import android.support.design.widget.FloatingActionButton; //導入方法依賴的package包/類
private void animateIn(FloatingActionButton button) {
    button.setVisibility(View.VISIBLE);
    if (Build.VERSION.SDK_INT >= 14) {
        ViewCompat.animate(button)
                .translationY(0)
                .setInterpolator(INTERPOLATOR)
                .withLayer()
                .setListener(null)
                .start();
    } else {
        Animation anim = AnimationUtils.loadAnimation(button.getContext(),
                android.support.design.R.anim.design_fab_in);
        anim.setDuration(200L);
        anim.setInterpolator(INTERPOLATOR);
        button.startAnimation(anim);
    }
}
 
開發者ID:WeiMei-Tian,項目名稱:editor-sql,代碼行數:18,代碼來源:ScrollAwareFABBehavior.java

示例4: onViewAttachedToWindow

import android.support.design.widget.FloatingActionButton; //導入方法依賴的package包/類
@Override
public void onViewAttachedToWindow(CollectionAdapterViewHolder holder) {
    super.onViewAttachedToWindow(holder);
    Log.v(LOG_TAG + "debugCollectionView", "start onViewAttachedToWindow , getFabPlayButton().getTag=" + String.valueOf(holder.getFabPlayButton().getTag()));
    //restore animation if loading status
    FloatingActionButton fabPlayButton = holder.getFabPlayButton();
    String tag = fabPlayButton.getTag() == null ? "" : fabPlayButton.getTag().toString();
    if (Objects.equals(tag, LOADING_STATUS)) {
        Animation rotate_infinite = AnimationUtils.loadAnimation(mActivity, R.anim.rotate_infinite);
        rotate_infinite.setFillAfter(true);
        fabPlayButton.startAnimation(rotate_infinite);
    }
}
 
開發者ID:malah-code,項目名稱:Open-Quran-Radio,代碼行數:14,代碼來源:CollectionAdapter.java


注:本文中的android.support.design.widget.FloatingActionButton.startAnimation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。