Hi I\'m using Sliding tab layout in my app and it all works great. The only thing I dont understand is why my tabs text are in uppercase.
I\'ve printed the text the
Found the answer it was in the createDefaultTabView() method.
Needed to change textView.setAllCaps(true) to false.
protected TextView createDefaultTabView(Context context) {
TextView textView = new TextView(context);
textView.setGravity(Gravity.CENTER);
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP);
textView.setLayoutParams(new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
TypedValue outValue = new TypedValue();
getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground,
outValue, true);
textView.setBackgroundResource(outValue.resourceId);
textView.setAllCaps(false); **// Changed to false and it did the trick**
int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density);
textView.setPadding(padding, padding, padding, padding);
return textView;
}
just add this linetabTitleView.setAllCaps(false);
in populateTabStrip()
If you use "android.support.design.widget.TabLayout" needed to set app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"