Back to project page Lessaging.
The source code is released under:
GNU General Public License
If you think the Android project Lessaging 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 fr.lessaging.preferences; //from w w w. j av a 2 s . co m 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 fr.lessaging.R; /** * Created by lheido on 05/06/14. */ public class LessagingPreference extends ActionBarActivity { ViewPager mViewPager; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.lheidosms_pref); mViewPager = (ViewPager) findViewById(R.id.pager); PrefPagerAdapter prefPagerAdapter = new PrefPagerAdapter(getSupportFragmentManager()); mViewPager.setAdapter(prefPagerAdapter); } private class PrefPagerAdapter extends FragmentPagerAdapter { public PrefPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { switch (position) { case 0: return new PrefGeneralFragment(); case 1: return new PrefListConversationsFragment(); case 2: return new PrefConversationFragment(); case 3: return new PrefReceiveFragment(); default: return null; } } @Override public int getCount() { return 4; } @Override public CharSequence getPageTitle(int position) { switch (position) { case 0: return "Gnral"; case 1: return "Liste Conversations"; case 2: return "Conversation"; case 3: return "Rception"; } return null; } } }