I wanna change hardcoded TITLE to resource from strings.xml
How to do it properly?
public static final CharSequence TITLE = "Home";
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return HomeFragment.TITLE;
case 1:
return HistoryFragment.TITLE;
case 2:
return StatisticsFragment.TITLE;
}
return super.getPageTitle(position);
}
}
public static final CharSequence TITLE = R.string.title_home;