Search in sources :

Example 61 with ArgbEvaluator

use of android.animation.ArgbEvaluator in project AndroidIndicators by MoshDev.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    setTitle(null);
    ViewPager mViewPager = (ViewPager) findViewById(R.id.viewPager);
    mViewPager.setAdapter(new MyAdapter(getSupportFragmentManager()));
    final ViewPagerObserver observer = new ViewPagerObserver(mViewPager);
    titleIndicator = (TitleIndicator) findViewById(R.id.titleIndicator);
    observer.addObservableView(titleIndicator);
    titleIndicator.setToolBar(toolbar);
    IconicTabsView iconicTabsView = (IconicTabsView) findViewById(R.id.iconicTabsView);
    // iconicTabsView.setIconicTabsEffect(new FadeIconicTabsEffect());
    iconicTabsView.setIconicTabsEffect(new GreyscaleIconicTabsEffect());
    // iconicTabsView.setIconicTabsEffect(new ArgbIconicTabsEffect(0xFF010101, Color.RED));
    observer.addObservableView(iconicTabsView);
    ArgbEvaluator argbEvaluator;
}
Also used : IconicTabsView(com.moshx.indicators.tab.IconicTabsView) ArgbEvaluator(android.animation.ArgbEvaluator) ViewPagerObserver(com.moshx.indicators.observer.ViewPagerObserver) ViewPager(android.support.v4.view.ViewPager) GreyscaleIconicTabsEffect(com.moshx.indicators.tab.effect.GreyscaleIconicTabsEffect) Toolbar(android.support.v7.widget.Toolbar)

Aggregations

ArgbEvaluator (android.animation.ArgbEvaluator)61 ValueAnimator (android.animation.ValueAnimator)30 ObjectAnimator (android.animation.ObjectAnimator)18 Animator (android.animation.Animator)10 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)7 TargetApi (android.annotation.TargetApi)6 View (android.view.View)6 Paint (android.graphics.Paint)5 AnimatorUpdateListener (android.animation.ValueAnimator.AnimatorUpdateListener)4 ColorDrawable (android.graphics.drawable.ColorDrawable)4 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)4 TextView (android.widget.TextView)4 PropertyValuesHolder (android.animation.PropertyValuesHolder)3 SuppressLint (android.annotation.SuppressLint)3 ViewGroup (android.view.ViewGroup)3 AnimatorListener (android.animation.Animator.AnimatorListener)2 AnimatorSet (android.animation.AnimatorSet)2 Intent (android.content.Intent)2 Drawable (android.graphics.drawable.Drawable)2 Toolbar (android.support.v7.widget.Toolbar)2