In the settings in my phone can I change the font size of apps globally .
Settings> Display> Font size
Can I make the font size (small, normal, large , very large ) also read with Java and, if applicable . set only for my app ? I tried to change the font size as follows.
Button buttonbig = (Button) dialog.findViewById(R.id.btn_big);
buttonbig.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
float fScale = getResources().getConfiguration().fontScale;
String fontSize = String.valueOf(fScale);
conf.fontScale =fScale + 0.15f;
getResources().getConfiguration().setTo(conf);
TextView textView = (TextView) dialog.findViewById(R.id.lbl_size_act);
textView.setText(fontSize);
}
});
dialog.show();
My Text View shows me the new size . However, the text remains the same size .Have anyone an idea what's wrong ?