How to make font sizes in app to not get effected by changing Settings Font size

android, android-layout, android-listview

Solution

I finally got the solution. Google strictly recommends to use "sp" for fonts. However, if you do not want the text to be scaled based on user font settings, use "dp". The font size will not change in a given device if you go to settings->fonts. Your UI will remain just like you designed it for.

Thanks Aswin for your inputs. And thanks to Joseph Earl for answering question at Android sp vs dp texts - what would adjust the 'scale' and what is the philosophy of support

Problem

I have my app running well as per design when the font size is at "Normal" on Settings->Display->FontSize. When i change the font size to Small/Large entire content is mashed up. My app is content intensive and this is badly effecting the app. Lets say, action bar title is like "Privacy and Settings". The title runs off the bounds/ellipsizes when font size is set to "Large" in System Settings. The listview contents look pathetic. Is there a way to make sure that the change in Settings->Fonts doesn't effect our app? Flipboard app does that.

Original source

Related problems