Assume my title is "Nearby - Friends" I want to show that as "Nearby- Friends"
How can I achieve it.
I tired a lot but I can't achieve that.
HERE is code that I use, I use Typeface
TextView text = (TextView) tab.getCustomView();
String subTitle = text.getText().toString().trim();
text.setTextColor(getResources().getColor(R.color.white));
Typeface face = Typeface.createFromAsset(getAssets(), "fonts/Roboto-Bold.ttf");
text.setTypeface(face);
TextView title = new TextView(getApplicationContext());
title.setText("Nearby - ");
title.setTypeface(face);
if (subTitle.equals("NEAR BY")) {
subTitle = "People";
} else if (subTitle.equals("FRIENDS")) {
subTitle = "Friends";
} else if (subTitle.equals("FAMILY")) {
subTitle = "Family";
}
toolbar.setTitle(title.getText().toString() + subTitle);