Reputation: 564
I have a problem with my edittext and button. When I put them in my xml and run it, I get this...
Can anyone help me get the second output?
Edit:
The second picture is what I see in Eclipse. I feel like it has something to do with the Theme. Some say it is Ice Cream Sandwich that is the problem but my app is 2.2 however my phone is running 4.0
Upvotes: 0
Views: 214
Reputation: 4787
Try setting a background to your edittext like android:background="@drawable/rounded_corner_white"
where rounded_corner_white :
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/White" />
<corners android:radius="18dp" />
</shape>
</item>
Upvotes: 0
Reputation: 5165
In AndroidManifest.xml, I think you just need to set this property:
<uses-sdk
android:targetSdkVersion="15" />
To a value greater than or equal to 15. Do a clean/build and see if that helps. That will tell the phone to use ICS or JellyBean.
Upvotes: 0
Reputation: 6186
The first one is using the holo theme which was new in android4.0. So i think if you specify the android2.3 theme in AndroidManifest.xml, then the second editbox will be displayed.
Such as:
<application android:theme="@android:style/Theme" ...../>
Upvotes: 4
Reputation: 28349
you're compiling (and previewing in the xml editor) for Ice Cream Sandwich. The native UI that you have in the second example is (I believe) from Gingerbread. You can either set your version backwards, or apply the relevant theme in the manifest for this activity.
Upvotes: 2