SessionDetailFragment.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:iosched 作者:
private void showInSchedule(boolean isInSchedule, boolean animate) {
    mAddScheduleFab.setChecked(isInSchedule);
    mAddScheduleFab.setContentDescription(getString(isInSchedule
            ? R.string.remove_from_schedule
            : R.string.add_to_schedule));
    if (!animate) return;

    AnimatedVectorDrawable avd = (AnimatedVectorDrawable) ContextCompat.getDrawable(
            getContext(), isInSchedule ? R.drawable.avd_bookmark : R.drawable.avd_unbookmark);
    mAddScheduleFab.setImageDrawable(avd);
    ObjectAnimator backgroundColor = ObjectAnimator.ofArgb(
            mAddScheduleFab,
            UIUtils.BACKGROUND_TINT,
            isInSchedule ? Color.WHITE
                    : ContextCompat.getColor(getContext(), R.color.lightish_blue));
    backgroundColor.setDuration(400L);
    backgroundColor.setInterpolator(AnimationUtils.loadInterpolator(getContext(),
            android.R.interpolator.fast_out_slow_in));
    backgroundColor.start();
    avd.start();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号