一般输入框
一般滴EditText输入框是下面这个样纸的
那么代码是这样滴
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="25dp" android:layout_marginRight="25dp" android:hint="输入账号" /> <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="25dp" android:layout_marginRight="25dp" android:hint="输入账号" /> </LinearLayout> </RelativeLayout>
带点特效的输入框
带点特效的输入框就是界个样子滴
代码如下
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="25dp" android:layout_marginRight="25dp" android:background="#00ffffff" android:hint="输入账号" /> <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#00ffffff" android:layout_marginLeft="25dp" android:layout_marginRight="25dp" android:hint="输入账号" /> </LinearLayout> </RelativeLayout>
在加点特效就成了介个样纸了仔细看,其实就是下面介一行起了作用
android:background="#00ffffff"