-3

我是安卓新手。我想用 as 制作登录屏幕设计在此处输入图像描述

如果有人可以帮助我创建这种类型的编辑框,该编辑框在该边界和提示文本的左侧带有白色边框和图像。

提前致谢。

4

1 回答 1

2

试试这个来创建带边框的edittext

创建borderedEdittext.xml并放入drawable

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

    <!-- Background Color -->
    <solid android:color="#ffffff" />

    <!-- Border Color -->
    <stroke android:width="1dp" android:color="#ff9900" />

    <!-- Round Corners -->
    <corners android:radius="5dp" />

</shape>

对于图像和提示使用这个

<EditText
            android:drawableLeft="@drawable/profilePic"
            android:hint="Enter Name"
            android:background="@drawable/borderedEdittext"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
于 2017-08-12T13:04:25.087 回答