I make an timetable application for android and I\'m using ViewPagerIndicator as fragment. But now I\'ve a problem, I want to get the TabPageIndicator to the center. Like this:
Use it like this :
TabPagerIndicator tbi;
ViewPager pager;
in onCreate()
do like this
tbi=(TabPagerIndicator)findViewById(R.id.something);
tbi.setViewPager(pager);
I hope this will work out for you. :D
Then you don't need an viewpagerindicator. Use a horizontal scroll view as Amulya Khare suggested in your activity and replace fragments when scrolling occurs.
Your activity layout could be like :
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<SomeWheelView
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
<SomeStaticIndicatorView
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
<FrameLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
/>
</LinearLayout>
Set a listener to wheelview and when change occurs you can put your fragments in framelayout in your activity.
The widget you are looking for is similar to the android horizontal wheel. There is an implementation at android-spinnerwheel which can be what you need.