-2

I want to develope screen like the below..which contains two tabs with right alignment!

actually it's the dynamic screen and top part should be fixed with two tabs when ever they click the tabs it's different fragment. please suggest me the best way.

kiran reddy
  • 128
  • 2
  • 14

2 Answers2

0

You can use ViewPager for this.

 <android.support.v4.view.ViewPager
    android:id="@+id/vpPager"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
</android.support.v4.view.ViewPager>

Here is a link for your reference. Design two different layout files and switch them on Tabchange.

Neal Ahluvalia
  • 1,538
  • 1
  • 10
  • 20
0

You can either use RadioGroup to act like tabs with fragments

like this https://stackoverflow.com/a/17541555/3020568

OR you can use PagerSlidingTabStrip library and customize it like the way you want

https://github.com/astuetz/PagerSlidingTabStrip

Community
  • 1
  • 1
Deniz
  • 12,332
  • 10
  • 44
  • 62