This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.manishkpr.menudrawerexample; | |
| public class SlidingGetSet { | |
| String name; | |
| public SlidingGetSet(String name){ | |
| this.name= name; | |
| } | |
| public String getName() { | |
| return name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.manishkpr.menudrawerexample; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import net.simonvt.menudrawer.MenuDrawer; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.AdapterView; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ViewPagerStyle1Activity extends FragmentActivity { | |
| private ViewPager _mViewPager; | |
| private ViewPagerAdapter _adapter; | |
| private Button _btn1,_btn2; | |
| /** Called when the activity is first created. */ | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.main); | |
| setUpView(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ViewPagerAdapter extends FragmentPagerAdapter { | |
| private Context _context; | |
| public static int totalPage=2; | |
| public ViewPagerAdapter(Context context, FragmentManager fm) { | |
| super(fm); | |
| _context=context; | |
| } | |
| @Override | |
| public Fragment getItem(int position) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LayoutTwo extends Fragment { | |
| public static Fragment newInstance(Context context) { | |
| LayoutTwo f = new LayoutTwo(); | |
| return f; | |
| } | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LayoutOne extends Fragment { | |
| public static Fragment newInstance(Context context) { | |
| LayoutOne f = new LayoutOne(); | |
| return f; | |
| } | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent" | |
| android:background="@color/white" | |
| android:gravity="center|center" | |
| android:orientation="vertical" > | |
| <TextView | |
| android:id="@+id/textView1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent" | |
| android:background="@color/white" | |
| android:gravity="center|center" | |
| android:orientation="vertical" > | |
| <TextView | |
| android:id="@+id/textView1" |