Back to project page SMSAlive.
The source code is released under:
Apache License
If you think the Android project SMSAlive listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.futuretech.app.smsalive.Presentation.activities; /* w w w. j av a 2 s. co m*/ import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.ActionBarActivity; import com.futuretech.app.smsalive.Presentation.fragments.InitialDataGathering; import com.futuretech.app.smsalive.Presentation.fragments.WelcomeFragment; import com.futuretech.app.smsalive.R; public class InitializingData extends ActionBarActivity { private Context context = this; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_initializing_data); ViewPager pager = (ViewPager) findViewById(R.id.pager); pager.setAdapter(new MyPagerAdapter(getSupportFragmentManager())); } private class MyPagerAdapter extends FragmentPagerAdapter { public MyPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int pos) { switch(pos) { case 0: return new WelcomeFragment(); case 1: return new InitialDataGathering(); default: return new WelcomeFragment(); } } @Override public int getCount() { return 2; } } }