废话不多说,直接上图,android手机防盗时序图:
先来观摩一下主要界面吧(PS:界面粗糙简单之极):
第一次启动软件:
进入主界面(PS:简单)
再次进入软件:
些微差别,不知道你发现没有(*^__^*)
开始防盗:
好了,界面看到这里,我把布局代码也贴一下吧,方便以后复习:
- <!--Main.xml-->
- <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"
- android:paddingBottom="@dimen/activity_vertical_margin"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:paddingTop="@dimen/activity_vertical_margin"
- tools:context=".MainActivity" >
- <EditText
- android:id="@+id/safeNumber"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/safe_phone"
- />
- <Button
- android:id="@+id/btn_startSafe"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/safeNumber"
- android:layout_alignParentLeft="true"
- android:text="@string/start_safe"
- />
- <Button
- android:id="@+id/btn_modify"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/safeNumber"
- android:layout_alignParentRight="true"
- android:text="@string/modify"
- />
- </RelativeLayout>
- <!--Dialog.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:orientation="vertical" >
- <EditText
- android:id="@+id/et_UserName"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/user_text"
- />
- <EditText
- android:id="@+id/et_Password"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:password="true"
- android:hint="@string/password_text"
- />
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- >
- <Button
- android:id="@+id/btn_Ok"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- />
- <Button
- android:id="@+id/btn_cancle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- />
- </LinearLayout>
- </LinearLayout>
是不是很简单,呵呵,简单就对了,其实都没什么难的!