Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the native Android Editbox

Tags:

android

I have created an Editbox in XML using this code:

<EditText
            android:id="@+id/txtEmail"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="50dp"
            android:inputType="textEmailAddress" >            
        </EditText>      

The textbox renders like this:

textbox

How can I get the native android EditText with the orange borders when focused, white background etc. ?

I tried adding

android:background="@android:color/white"

but that only changes the background to white.

like image 216
xbonez Avatar asked Feb 22 '26 23:02

xbonez


2 Answers

The style you are seeing is "native" for the Honeycomb (3.0) Android version, specifically, the new Holo-dark theme. The orange-borders-and-white-background look was last used in 2.3.* and has since been left behind.

like image 160
alex.zherdev Avatar answered Feb 25 '26 16:02

alex.zherdev


Agree with the answer of neutrino: The style you are seeing is "native" for the Honeycomb (3.0) Android version, specifically, the new Holo-dark theme.

But still if you wants the EditText that you want then you need to set the style/theme inside the AndroidManifest.xml file:

<activity android:theme="@android:style/Theme.Light">
like image 31
Paresh Mayani Avatar answered Feb 25 '26 16:02

Paresh Mayani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!