Search code examples
javaandroidscaleandroid-relativelayout

Partial scaling on relative layout


I'm currently working on a game and have designed a custom keyboard as a relative layout. The keyboard is displayed fine on mdpi and hdpi screens, but on xhdpi even with a provided resource it's not being displayed properly. This is my keyboard in xml:

http://pastebin.com/WR88j01C

And this is how it looks on an hdpi screen: enter image description here

And this is how it looks on an ldpi screen(exactly the same thing happens on xhdpi):

enter image description here

As you can see the first 5 letters in each row are resized and the others are normal, I can't figure it out and I've tried.

EDIT:

styles.xml - http://pastebin.com/6FPnybzP

FontImageButton class - http://pastebin.com/FgeG1aJ9


Solution

  • Try to add to your your buttons

    android:minHeight="0dp"
    android:minWidth="0dp"
    

    Hope this helps.