1

I would like to ignore any font style from the device in my application .

I have seen this post and this one, and i didn't found my solution there .

this could have been great but it ignore only if the application is running :

<activity android:name=".MyActivity"
    android:configChanges="fontScale">
    ...
</activity>

My application is big and i got a lot of TextViews with different size, is there a way to just ignore the scale or set new one programmatically just for my application like I can do for example with languages with setLocal?

Community
  • 1
  • 1
Jesus Dimrix
  • 4,378
  • 4
  • 28
  • 62
  • 1
    Why don't you design your own custom textview style and assign it to all the textviews ? – Umair Mar 16 '15 at 09:54
  • assign what ? the only thing i can assign maybe is to get the text size in sp for each text view and assign new dp value .i am not sure if there isn't solution that just ignore the device setting . – Jesus Dimrix Mar 16 '15 at 09:59
  • No you can make custom designs for the textviews and there is an background or style attribute of textview you can assign it ... – Umair Mar 16 '15 at 10:10
  • but i gut a lot of textview in different sizes...if i set the size in sp it will be still scaled by the device . – Jesus Dimrix Mar 16 '15 at 10:18
  • 1
    How much textView's you are talking about ? And by the way you can fix the size of textview and it use "dp" instead of "sp" and the size will adjust itself depending on the size of the screen but it won't be scaled just like it does when you assign "wrap_content". – Umair Mar 16 '15 at 10:25
  • about 100 i think (-: – Jesus Dimrix Mar 16 '15 at 10:30
  • 2
    Damn those are too much but you should take a look at these solutions they might help you ... http://stackoverflow.com/questions/3078081/setting-global-styles-for-views-in-android http://stackoverflow.com/questions/22268717/how-to-create-a-custom-textview-background-android and if you want a fix size of the textviews then you can also do that just keep searching the internet you will surely find a solution – Umair Mar 16 '15 at 10:35

0 Answers0