当前位置: 首页>>代码示例>>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;未经允许,请勿转载。