dheeraj
dheeraj

Reputation: 13

Real UI different different from which designed

I have created an app in which I have made 3 xml's of an activity normal, large and extra large whose screenshots from android studio I've posted below.

enter image description here

In the above I've properly placed transparent buttons and editText over image, But the problem is that when I run it in my Samsung galaxy s3 neo the editText is coming out of the box Like this what should I do?

Upvotes: 0

Views: 103

Answers (1)

Qaisar Rajput
Qaisar Rajput

Reputation: 791

Before i answer one piece of advice. Always be careful about the fonts you are using! in the development process do test these

Now the problem is in the emulator you are using, It is set to two different fonts, and by the looks of it editText has "Arial" and your button has "New times Roman" font

The thing happening here is for the button you have changed the font and corresponding to which code was added to the back-end (probably designer of this form) so when the application runs it looks for this font and displays it.

The problem with editText is you haven't set the font explicitly, So it is by default set to System font. Now i am assuming you have changed the default font of your device (you must see that font everywhere in your device i.e Messages, Menus etc). But in case of the emulator the default font is not the same.

If you change your device font back to default you will see what i am talking about.

Visit this article to see how to change the fonts (if your android version is different, browse through settings you will find it)

SOLUTION You should explicitly define the font so that when you deploy your app it works as same as it runs on your emulator. Here is how to do it

Cheers!

Upvotes: 2

Related Questions