Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to remove border of edittext field

I have created a login layout but in this layout edittext field border is overlap. I want to remove the top border of second edit text field. please guide me. here is the link screen

I want to make layout exactly like this. Here is my XML code.

round_edittext.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <solid android:color="#FFFFFF" />

    <stroke
        android:width="1dp"
        android:color="#9999" />

    <corners
        android:bottomLeftRadius="1dp"
        android:bottomRightRadius="1dp"
        android:topLeftRadius="1dp"
        android:topRightRadius="1dp" />

</shape>

activity_mail.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical" >

    <ImageButton
        android:id="@+id/save"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#00000000"
        android:clickable="false"
        android:src="@drawable/no_smslogo_text" />

    <EditText
        android:id="@+id/editText1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="40sp"
        android:layout_marginRight="40sp"
        android:layout_marginTop="10sp"
        android:background="@drawable/round_edittext"
        android:drawableLeft="@drawable/mobile_icon"
        android:drawablePadding="5dp"
        android:gravity="left"
        android:hint="Mobile Number"
        android:padding="5dp"
        android:paddingBottom="8sp"
        android:paddingTop="8sp"
        android:textSize="15dp" >
    </EditText>

    <EditText
        android:id="@+id/editText2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="40sp"
        android:layout_marginRight="40sp"
        android:background="@drawable/round_edittext"
        android:drawable="@drawable/pin_icon"
        android:drawableLeft="@drawable/mobile_icon"
        android:drawablePadding="5dp"
        android:gravity="left"
        android:hint="Pin Number"
        android:padding="5dp"
        android:paddingBottom="8sp"
        android:paddingTop="8sp"
        android:textSize="15dp" />

    <Button
        android:id="@+id/signin"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="40sp"
        android:layout_marginRight="40sp"
        android:layout_marginTop="10sp"
        android:clickable="true"
        android:gravity="center"
        android:text="Sign In"
        android:textColor="#ffffff"
        android:textSize="15dp" />

</LinearLayout>
like image 617
Android Learner Avatar asked Nov 28 '22 02:11

Android Learner


1 Answers

Use it, this is working for me

<EditText  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:hint="@string/hello" 
android:background="#00000000"
/>
like image 167
RaviPatidar Avatar answered Nov 30 '22 22:11

RaviPatidar