做了一个非常简单的界面,功能还未完全实现,还在摸索过程中。
首先上图:
activity_main.xml
这里我的主要改动是加了CheckBox,然后还有添加了一个样式MyEditText,具体设置在res->values->styles.xml中,下面会贴出代码。
此外还给Button设置了OnClick触发事件。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/timg"
>
<!-- <ImageView-->
<!-- android:id="@+id/icon"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:src="@drawable/icon"-->
<!-- android:layout_below="@+id/setting_btn"/>-->
<CheckBox
android:id="@+id/remeber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/password"
android:theme="@style/MyEditText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/remebertext"
android:layout_below="@+id/password"
android:layout_toRightOf="@+id/remeber"
android:layout_margin="10dp"
android:text="记住密码"
android:textColor="#ffffff"
/>
<CheckBox
android:id="@+id/auto"
android:layout_width="wrap_content"
android:layout_height