How can we work-around the blank title in PagerTitleStrip and PagerTabStrip?
This issue was fixed in version 23.1.0
com.android.support:support-v4:23.1.0
ViewPager Title doesn't appear until I swipe it
It is an issue appeared in com.android.support:appcompat-v7:23.0.0. You can refer here https://code.google.com/p/android/issues/detail?id=183127
In that link google support team have mention that defect would be fixed in future releases. So for now solution is build the project using com.android.support:appcompat-v7:22.2.1
Update : If feasible for you then you can go ahead with another solution provided by @nidheeshdas. I have tried on simple project; it work
Modified solution of @nidheeshdas inside onResume() of Activity
viewPager.setCurrentItem(1);
viewPager.postDelayed(new Runnable() {
@Override
public void run() {
viewPager.setCurrentItem(0);
}
},100);
New Update: As mentioned in the above google issue tracker link and comments from JP Ventura. I have tried with new version of library and issue seems to be fixed.
PagerTitlestrip doesn't draw the very first title
As CommonsWare pointed out, this is a bug with appcompat-v4 23.0.1. I managed to solve this by returning to support appcompat-v7 and appcompat-v4 version 22.2.0.
This answer to a duplicate question offers an alternative solution.
PagerTabStrip and PagerTitleStrip difference?
PagerTitleStrip
is just a strip which contain title texts; it just indicates the title of the section we're in.
PagerTabStrip
is very similar to PagerTitleStrip
but actually looks like a strip of tabs (it's used in the Play store tabs, and looks better in my opinion).
You can use PagerTabStrip
if you are looking for a tab-like interface. If you are looking to customize PagerTitleStrip, you may want to see ViewPagerIndicator.
ViewPager and PageTitleStrip
Could you post a screenshot of the result.
I am wondering if its just the content in tabs or the tabs itself are not displayed.
There is an issue on 23.0.0 with text in tab missing https://code.google.com/p/android/issues/detail?id=183127
https://code.google.com/p/android/issues/detail?id=184431
Maybe your issue is not related to this. Just want to make sure.
Alternatively, use the below link as suggested the poster.
Probably wrap_content to height...
How can we work-around the blank title in PagerTitleStrip and PagerTabStrip?
Android PagerTabStrip text disappearing
So I found a solution. I added the PagerStip from appcompat v22 and used that one. Check this link
Related Topics
CSS3 Animation Flicker on Android 2.2 (Webkit-Transform:Translate(..) Scale(..) at The Same Time)
Android-Textview Settext in HTML.Fromhtml to Display Image and Text
Difference Between <Supports-Screens> and <Compatible-Screens> on Android
Eclipse Hangs at The Android Sdk Content Loader
Call an Activity Method from a Broadcastreceiver Class
In Android Applications What Is The Role of "R.Java"
Firebase Changing Layout of Child Data Information in Android
Modifying The Color of an Android Drawable
How Many Activities Vs Fragments
Android: Textcolor of Disabled Button in Selector Not Showing
How to Stack Firebase Cloud Messaging Notifications When the Application Is Not Running
Onitemclicklistener and Onclicklistener Not Working for Listview
How to Access Adb in Os X Through Terminal, "Command Not Found"
Android.App.Application Cannot Be Instantiated Due to Nullpointerexception
Error Inflating Class Com.Google.Android.Maps.Mapview
How to Save Image Taken from Camera and Show It to Listview - Crashes with "Illegalstateexception"