Answer the question
In order to leave comments, you need to log in
How to localize tab titles in TavLayout?
I don’t know how to localize the names of the tabs, I searched on the Internet, but there are only simple examples without localization and, in general, if there is any standard for the tab adapter.
Answer the question
In order to leave comments, you need to log in
@Override
public CharSequence getPageTitle(int position) {
switch (position){
case 0: return getString(R.string.tab_item_Room);
case 1: return getString(R.string.tab_item_Friend);
case 2: return getString(R.string.tab_item_Message);
default: return null;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question