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


Java AlphaAnimation.setFillAfter方法代碼示例

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


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

示例1: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
@SuppressLint("NewApi")
public ViewHolder setAlpha(int viewId, float value)
{
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
    {
        getView(viewId).setAlpha(value);
    } else
    {
        // Pre-honeycomb hack to set Alpha value
        AlphaAnimation alpha = new AlphaAnimation(value, value);
        alpha.setDuration(0);
        alpha.setFillAfter(true);
        getView(viewId).startAnimation(alpha);
    }
    return this;
}
 
開發者ID:ZhuoKeTeam,項目名稱:JueDiQiuSheng,代碼行數:17,代碼來源:ViewHolder.java

示例2: startAlphaAnimation

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
public static void startAlphaAnimation(View v, long duration, int visibility) {
    AlphaAnimation alphaAnimation = (visibility == View.VISIBLE)
            ? new AlphaAnimation(0f, 1f)
            : new AlphaAnimation(1f, 0f);

    alphaAnimation.setDuration(duration);
    alphaAnimation.setFillAfter(true);
    v.startAnimation(alphaAnimation);
}
 
開發者ID:appteam-nith,項目名稱:Nimbus,代碼行數:10,代碼來源:CoreTeamEventActivity.java

示例3: startAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
/**
 * alpha
 */
private void startAlpha() {
    AlphaAnimation aa = new AlphaAnimation(1, 0);
    aa.setFillAfter(false); // 設置動畫結束後是否停留在當前位置
    aa.setDuration(1000);
    content.startAnimation(aa);
}
 
開發者ID:wuhighway,項目名稱:DailyStudy,代碼行數:10,代碼來源:AnimationDemoActivity.java

示例4: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
private static void setAlpha(View view, float alpha) {
    // Set the alpha appropriately (setAlpha is API >= 11, this technique works on all API levels).
    AlphaAnimation alphaAnimation = new AlphaAnimation(alpha, alpha);
    alphaAnimation.setDuration(0);
    alphaAnimation.setFillAfter(true);
    view.startAnimation(alphaAnimation);
}
 
開發者ID:MobileDev418,項目名稱:AndroidBackendlessChat,代碼行數:8,代碼來源:PickerFragment.java

示例5: applyAlphaAnimation

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private static void applyAlphaAnimation(View view, float alpha) {
    if (isPostHoneycomb()) {
        view.setAlpha(alpha);
    } else {
        AlphaAnimation alphaAnimation = new AlphaAnimation(alpha, alpha);
        // make it instant
        alphaAnimation.setDuration(0);
        alphaAnimation.setFillAfter(true);
        view.startAnimation(alphaAnimation);
    }
}
 
開發者ID:rozdoum,項目名稱:social-app-android,代碼行數:13,代碼來源:ExpandableTextView.java

示例6: startAlphaAnimation

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
public static void startAlphaAnimation (View v, long duration, int visibility) {
    AlphaAnimation alphaAnimation = (visibility == View.VISIBLE)
            ? new AlphaAnimation(0f, 1f)
            : new AlphaAnimation(1f, 0f);

    alphaAnimation.setDuration(duration);
    alphaAnimation.setFillAfter(true);
    v.startAnimation(alphaAnimation);
}
 
開發者ID:lethalskillzz,項目名稱:Andela-ALC-Challenge,代碼行數:10,代碼來源:ProfileActivity.java

示例7: getAlphaAnimation

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
/**
 * 透明度 Alpha
 */
public static Animation getAlphaAnimation(float fromAlpha, float toAlpha,
                                          long durationMillis) {
    AlphaAnimation alpha = new AlphaAnimation(fromAlpha, toAlpha);
    alpha.setDuration(durationMillis);
    alpha.setFillAfter(true);
    return alpha;
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:11,代碼來源:KJAnimations.java

示例8: animate

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
private static void animate(View view, int duration, AnimationListener listener, float fromAlpha, float targetAlpha) {
	// Create new animation
	AlphaAnimation newAnimation = new AlphaAnimation(fromAlpha, targetAlpha);
	
	newAnimation.setDuration(duration);
	// Force fillAfter flag to be true
	newAnimation.setFillAfter(true);
	newAnimation.setAnimationListener(listener);
	// Start fading
	view.startAnimation(newAnimation);
	
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:13,代碼來源:AlphaAnimator.java

示例9: startAlphaAnimation

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
private void startAlphaAnimation(View v, long duration, int visibility) {
    AlphaAnimation alphaAnimation = (visibility == View.VISIBLE)
            ? new AlphaAnimation(0f, 1f)
            : new AlphaAnimation(1f, 0f);
    alphaAnimation.setDuration(duration);
    alphaAnimation.setFillAfter(true);
    v.startAnimation(alphaAnimation);
}
 
開發者ID:nfdz,項目名稱:foco,代碼行數:9,代碼來源:MainActivity.java

示例10: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
/**
 * Add an action to set the alpha of a view. Can be called multiple times.
 * Alpha between 0-1.
 */
public BaseViewHolder setAlpha(@IdRes int viewId, float value) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getView(viewId).setAlpha(value);
    } else {
        // Pre-honeycomb hack to set Alpha value
        AlphaAnimation alpha = new AlphaAnimation(value, value);
        alpha.setDuration(0);
        alpha.setFillAfter(true);
        getView(viewId).startAnimation(alpha);
    }
    return this;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:17,代碼來源:BaseViewHolder.java

示例11: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
/**
 * Add an action to set the alpha of a view. Can be called multiple times.
 * Alpha between 0-1.
 */
public BaseViewHolder setAlpha(int viewId, float value) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getView(viewId).setAlpha(value);
    } else {
        // Pre-honeycomb hack to set Alpha value
        AlphaAnimation alpha = new AlphaAnimation(value, value);
        alpha.setDuration(0);
        alpha.setFillAfter(true);
        getView(viewId).startAnimation(alpha);
    }
    return this;
}
 
開發者ID:JackChan1999,項目名稱:GoogleVR,代碼行數:17,代碼來源:BaseViewHolder.java

示例12: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
/**
 * 設置透明度
 */
@SuppressLint("NewApi")
public BaseViewHolder setAlpha(int viewId, float value) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getView(viewId).setAlpha(value);
    } else {
        // Pre-honeycomb hack to set Alpha value
        AlphaAnimation alpha = new AlphaAnimation(value, value);
        alpha.setDuration(0);
        alpha.setFillAfter(true);
        getView(viewId).startAnimation(alpha);
    }
    return this;
}
 
開發者ID:yangchong211,項目名稱:YCBaseAdapter,代碼行數:17,代碼來源:BaseViewHolder.java

示例13: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
@SuppressLint("NewApi")
public ViewHolder setAlpha(int viewId, float value) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getView(viewId).setAlpha(value);
    } else {
        // Pre-honeycomb hack to set Alpha value
        AlphaAnimation alpha = new AlphaAnimation(value, value);
        alpha.setDuration(0);
        alpha.setFillAfter(true);
        getView(viewId).startAnimation(alpha);
    }
    return this;
}
 
開發者ID:guzhigang001,項目名稱:Bailan,代碼行數:14,代碼來源:ViewHolder.java

示例14: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
/**
 * 設置透明度
 */
@SuppressLint("NewApi")
public BaseRvViewHolder setAlpha(int viewId, float value) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getView(viewId).setAlpha(value);
    } else {
        // Pre-honeycomb hack to set Alpha value
        AlphaAnimation alpha = new AlphaAnimation(value, value);
        alpha.setDuration(0);
        alpha.setFillAfter(true);
        getView(viewId).startAnimation(alpha);
    }
    return this;
}
 
開發者ID:yangchong211,項目名稱:YCBaseAdapter,代碼行數:17,代碼來源:BaseRvViewHolder.java

示例15: setAlpha

import android.view.animation.AlphaAnimation; //導入方法依賴的package包/類
public BaseViewHolder setAlpha(int viewId, float value) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getView(viewId).setAlpha(value);
    } else {
        AlphaAnimation alpha = new AlphaAnimation(value, value);
        alpha.setDuration(0);
        alpha.setFillAfter(true);
        getView(viewId).startAnimation(alpha);
    }
    return this;
}
 
開發者ID:zwmlibs,項目名稱:BookReader-master,代碼行數:12,代碼來源:BaseViewHolder.java


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