I have many TextViews created programatically, but I cannot find out how I could change the text size according to what screen size the device is.
Example: I have layout_sw300dp and layout_sw600dp folders containing individual screen designs to fit according to the phone used. But since I programatically create TextViews, I cannot alter the TextSize for different screen sizes.
How can I fix this matter? Is it possible to have different /res/values/styles.xml for different screens, that way I can attach the style via code and define the styles individually in XML, if so, what is the folder layout?
If you’re setting the text size of the TextView using ‘sp’ then the text should be automatically scaled.