gpt4 book ai didi

java - 如何删除edittext字段的边框

转载 作者:太空宇宙 更新时间:2023-11-03 11:27:22 24 4
gpt4 key购买 nike

我已经创建了一个登录布局,但是在这个布局中,编辑文本字段的边框是重叠的。我想删除第二个编辑文本字段的 top border。请指导我。链接在这里 screen

我想做这样的布局。这是我的 XML 代码

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>

最佳答案

使用它,这对我有用

<EditText  
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/hello"
android:background="#00000000"
/>

关于java - 如何删除edittext字段的边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20811850/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com