Search in sources :

Example 1 with WoWoViewPagerAdapter

use of com.nightonke.wowoviewpager.WoWoViewPagerAdapter in project WoWoViewPager by Nightonke.

the class CVExampleActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_cvexample);
    wowo = (WoWoViewPager) findViewById(R.id.wowo_viewpager);
    adapter = new WoWoViewPagerAdapter(getSupportFragmentManager());
    adapter.setFragmentsNumber(3);
    adapter.setColorRes(android.R.color.transparent);
    wowo.setAdapter(adapter);
}
Also used : WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter)

Example 2 with WoWoViewPagerAdapter

use of com.nightonke.wowoviewpager.WoWoViewPagerAdapter in project WoWoViewPager by Nightonke.

the class WoWoPathAnimationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_wowo_path_animation);
    init();
    wowo = (WoWoViewPager) findViewById(R.id.wowo_viewpager);
    adapter = new WoWoViewPagerAdapter(getSupportFragmentManager());
    adapter.setFragmentsNumber(2);
    adapter.setColorsRes(new Integer[] { R.color.light_blue, R.color.my_pink });
    wowo.setAdapter(adapter);
    setPageTV(wowo);
}
Also used : WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter)

Example 3 with WoWoViewPagerAdapter

use of com.nightonke.wowoviewpager.WoWoViewPagerAdapter in project WoWoViewPager by Nightonke.

the class WoWoRotationAnimationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_wowo_rotation_animation);
    init();
    wowo = (WoWoViewPager) findViewById(R.id.wowo_viewpager);
    adapter = new WoWoViewPagerAdapter(getSupportFragmentManager());
    adapter.setFragmentsNumber(5);
    adapter.setColorRes(R.color.white);
    wowo.setAdapter(adapter);
    setPageTV(wowo);
}
Also used : WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter)

Example 4 with WoWoViewPagerAdapter

use of com.nightonke.wowoviewpager.WoWoViewPagerAdapter in project WoWoViewPager by Nightonke.

the class WoWoTextViewColorAnimationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_wowo_textview_color_animation);
    init();
    wowo = (WoWoViewPager) findViewById(R.id.wowo_viewpager);
    adapter = new WoWoViewPagerAdapter(getSupportFragmentManager());
    adapter.setFragmentsNumber(5);
    adapter.setColorRes(R.color.white);
    wowo.setAdapter(adapter);
    setPageTV(wowo);
    setAnimation(findViewById(R.id.test1), ColorChangeType.RGB);
    setAnimation(findViewById(R.id.test2), ColorChangeType.HSV);
}
Also used : WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter)

Example 5 with WoWoViewPagerAdapter

use of com.nightonke.wowoviewpager.WoWoViewPagerAdapter in project WoWoViewPager by Nightonke.

the class WoWoAlphaAnimationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_wowo_alpha_animation);
    init();
    wowo = (WoWoViewPager) findViewById(R.id.wowo_viewpager);
    adapter = new WoWoViewPagerAdapter(getSupportFragmentManager());
    adapter.setFragmentsNumber(5);
    adapter.setColorRes(R.color.white);
    wowo.setAdapter(adapter);
    setPageTV(wowo);
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.test));
    animation.addPageAnimaition(new WoWoAlphaAnimation(0, 0f, 1f, 1, 0.5f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(1, 0f, 1f, 0.5f, 1f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(2, 0f, 0.5f, 1, 0f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(2, 0.5f, 1f, 0, 1f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(3, 0f, 0.5f, 1, 0.3f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(3, 0.5f, 1f, 0.3f, 1f, easeType, useSameEaseTypeBack));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter) WoWoAlphaAnimation(com.nightonke.wowoviewpager.WoWoAlphaAnimation)

Aggregations

WoWoViewPagerAdapter (com.nightonke.wowoviewpager.WoWoViewPagerAdapter)13 ViewAnimation (com.nightonke.wowoviewpager.ViewAnimation)4 WoWoAlphaAnimation (com.nightonke.wowoviewpager.WoWoAlphaAnimation)1 WoWoScaleAnimation (com.nightonke.wowoviewpager.WoWoScaleAnimation)1 WoWoTextViewSizeAnimation (com.nightonke.wowoviewpager.WoWoTextViewSizeAnimation)1 WoWoTranslationAnimation (com.nightonke.wowoviewpager.WoWoTranslationAnimation)1