android View Pager with Dates as Title -
i want display view pager date, week , month title. have spinner in toolbar value(daily, weekly & monthly)
<android.support.v7.widget.toolbar xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/bg_image" android:paddingtop="@dimen/app_bar_top_padding" app:popuptheme="@style/themeoverlay.appcompat.light" android:theme="@style/base.themeoverlay.appcompat.dark.actionbar"> <spinner android:id="@+id/spinner_nav" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </android.support.v7.widget.toolbar> based upon selection fragments change.
spinner_nav.setonitemselectedlistener(new onitemselectedlistener() { @override public void onitemselected(adapterview<?> adapter, view v, int position, long id) { // on selecting spinner item string item = adapter.getitematposition(position).tostring(); switch(position){ case 0: commonutilities.replacefragment(new weeklyfragment(), getsupportfragmentmanager()); break; case 1: commonutilities.replacefragment(new dailyfragment(), getsupportfragmentmanager()); break; case 2: commonutilities.replacefragment(new monthlyfragment(), getsupportfragmentmanager()); break; } for endless page swiping, used code viewpager in android switch between days endlessly.
problem: cant able set page title , page select indicator. how this. achieve , there library available or can me code. in advance.
Comments
Post a Comment