Search in sources :

Example 1 with CircleIndicator

use of me.relex.circleindicator.CircleIndicator in project CircleIndicator by ongakuer.

the class CustomAnimationFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
    CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
    viewpager.setAdapter(new SamplePagerAdapter());
    indicator.setViewPager(viewpager);
}
Also used : CircleIndicator(me.relex.circleindicator.CircleIndicator) ViewPager(android.support.v4.view.ViewPager) SamplePagerAdapter(me.relex.circleindicator.sample.SamplePagerAdapter)

Example 2 with CircleIndicator

use of me.relex.circleindicator.CircleIndicator in project CircleIndicator by ongakuer.

the class DefaultFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
    CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
    viewpager.setAdapter(new SamplePagerAdapter());
    indicator.setViewPager(viewpager);
    viewpager.setCurrentItem(2);
}
Also used : CircleIndicator(me.relex.circleindicator.CircleIndicator) ViewPager(android.support.v4.view.ViewPager) SamplePagerAdapter(me.relex.circleindicator.sample.SamplePagerAdapter)

Example 3 with CircleIndicator

use of me.relex.circleindicator.CircleIndicator in project CircleIndicator by ongakuer.

the class LoopViewPagerFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    LoopViewPager viewpager = (LoopViewPager) view.findViewById(R.id.viewpager);
    CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
    viewpager.setAdapter(new SamplePagerAdapter());
    indicator.setViewPager(viewpager);
}
Also used : LoopViewPager(com.imbryk.viewPager.LoopViewPager) CircleIndicator(me.relex.circleindicator.CircleIndicator) SamplePagerAdapter(me.relex.circleindicator.sample.SamplePagerAdapter)

Example 4 with CircleIndicator

use of me.relex.circleindicator.CircleIndicator in project CircleIndicator by ongakuer.

the class SnackbarBehaviorFragment method onViewCreated.

@Override
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
    ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
    CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
    viewpager.setAdapter(new SamplePagerAdapter());
    indicator.setViewPager(viewpager);
    mSnackbar = Snackbar.make(view.findViewById(R.id.coordinator_layout), "Snackbar", Snackbar.LENGTH_SHORT);
    view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (!mSnackbar.isShown()) {
                mSnackbar.show();
            } else {
                mSnackbar.dismiss();
            }
        }
    });
}
Also used : CircleIndicator(me.relex.circleindicator.CircleIndicator) ViewPager(android.support.v4.view.ViewPager) View(android.view.View) SamplePagerAdapter(me.relex.circleindicator.sample.SamplePagerAdapter)

Example 5 with CircleIndicator

use of me.relex.circleindicator.CircleIndicator in project xabber-android by redsolution.

the class TutorialActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_tutorial);
    overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
    ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
    FragmentPagerAdapter pagerAdapter = new TutorialAdapter(getFragmentManager());
    viewPager.setAdapter(pagerAdapter);
    CircleIndicator indicator = (CircleIndicator) findViewById(R.id.indicator);
    indicator.setViewPager(viewPager);
    btnLogin = (Button) findViewById(R.id.btnLogin);
    btnLogin.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            startActivity(XabberLoginActivity.createIntent(TutorialActivity.this));
        }
    });
    btnRegister = (Button) findViewById(R.id.btnRegister);
    btnRegister.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent intent = XabberAccountInfoActivity.createIntent(TutorialActivity.this);
            intent.putExtra(XabberAccountInfoActivity.CALL_FROM, XabberAccountInfoActivity.CALL_FROM_LOGIN);
            startActivity(intent);
        }
    });
}
Also used : FragmentPagerAdapter(android.support.v13.app.FragmentPagerAdapter) CircleIndicator(me.relex.circleindicator.CircleIndicator) Intent(android.content.Intent) TutorialAdapter(com.xabber.android.ui.adapter.TutorialAdapter) ViewPager(android.support.v4.view.ViewPager) View(android.view.View)

Aggregations

CircleIndicator (me.relex.circleindicator.CircleIndicator)7 ViewPager (android.support.v4.view.ViewPager)6 SamplePagerAdapter (me.relex.circleindicator.sample.SamplePagerAdapter)6 View (android.view.View)2 Intent (android.content.Intent)1 FragmentPagerAdapter (android.support.v13.app.FragmentPagerAdapter)1 LoopViewPager (com.imbryk.viewPager.LoopViewPager)1 TutorialAdapter (com.xabber.android.ui.adapter.TutorialAdapter)1