Search in sources :

Example 1 with TutorialAdapter

use of com.xabber.android.ui.adapter.TutorialAdapter 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

Intent (android.content.Intent)1 FragmentPagerAdapter (android.support.v13.app.FragmentPagerAdapter)1 ViewPager (android.support.v4.view.ViewPager)1 View (android.view.View)1 TutorialAdapter (com.xabber.android.ui.adapter.TutorialAdapter)1 CircleIndicator (me.relex.circleindicator.CircleIndicator)1