开发者

Button and Edittext styles differ between real phone (Galaxy S2) and emulator

On the AVD, my buttons and edittexts look very nice with rounded corners and shaded backgrounds. Also in the gui editor of Eclipse, the开发者_C百科y look nice as it should be.

But when I then install the app on my SGS2, the buttons and edittexts are basically just white rectangles.

App is compiled for Android 1.6. SGS2 runs Android 2.3.3.

-- As a newbie, I don't seem to be allowed to post the screen images, bummer, sorry about that -- Here is the XML. I didn't do any special formatting:

                  <EditText android:id="@+id/from_account" 
                    android:layout_width="fill_parent"
                    android:text="Checking"/>

I thought it may be due to differences in screen resolution and density. But they are the same except xdpi and ydpi (see images). (Please ignore color of DisplayMetrics).


That's because each manufacturer defines it's own default theme. Read more about themes.


As @renam.antunes said - each manufacturer is free to customize the theme as they see like.

If you want more control, then you'll need to style the components yourself - e.g. setting the background of image of a button. If you like the default Android style you can find the resources used for that in sdk/platforms/platform-X/data/res/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜