1. android怎麼做動態的登陸界面
設計android的登錄界面的方法:
UI實現的代碼如下:
1、背景設置圖片:
background_login.xml
<?xmlversion="1.0"encoding="utf-8"?>
<shapexmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#FFACDAE5"
android:endColor="#FF72CAE1"
android:angle="45"
/>
</shape>
2、圓角白框
效果圖上面的並不是白框,其實框是白色的,只是設置了透明值,也是靠一個xml文件實現的。
background_login_div.xml
<?xmlversion="1.0"encoding="UTF-8"?>
<shapexmlns:android="http://schemas.android.com/apk/res/android">
<solidandroid:color="#55FFFFFF"/>
<!--設置圓角
注意:bottomRightRadius是左下角而不是右下角bottomLeftRadius右下角-->
<cornersandroid:topLeftRadius="10dp"android:topRightRadius="10dp"
android:bottomRightRadius="10dp"android:bottomLeftRadius="10dp"/>
</shape>
3、界面布局:
login.xml
<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_login">
<!--padding內邊距layout_margin外邊距
android:layout_alignParentTop布局的位置是否處於頂部-->
<RelativeLayout
android:id="@+id/login_div"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="15dip"
android:layout_margin="15dip"
android:background="@drawable/background_login_div_bg">
<!--賬號-->
<TextView
android:id="@+id/login_user_input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:text="@string/login_label_username"
style="@style/normalText"/>
<EditText
android:id="@+id/username_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/login_username_hint"
android:layout_below="@id/login_user_input"
android:singleLine="true"
android:inputType="text"/>
<!--密碼text-->
<TextView
android:id="@+id/login_password_input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/username_edit"
android:layout_marginTop="3dp"
android:text="@string/login_label_password"
style="@style/normalText"/>
<EditText
android:id="@+id/password_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/login_password_input"
android:password="true"
android:singleLine="true"
android:inputType="textPassword"/>
<!--登錄button-->
<Button
android:id="@+id/signin_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/password_edit"
android:layout_alignRight="@id/password_edit"
android:text="@string/login_label_signin"
android:background="@drawable/blue_button"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextViewandroid:id="@+id/register_link"
android:text="@string/login_register_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:textColor="#888"
android:textColorLink="#FF0066CC"/>
<ImageViewandroid:id="@+id/miniTwitter_logo"
android:src="@drawable/cat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="25dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="25dp"/>
<ImageViewandroid:src="@drawable/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/miniTwitter_logo"
android:layout_alignBottom="@id/miniTwitter_logo"
android:paddingBottom="8dp"/>
</RelativeLayout>
</LinearLayout>
4、java源代碼,Java源文件比較簡單,只是實例化Activity,去掉標題欄。
packagecom.mytwitter.acitivity;
importandroid.app.Activity;
importandroid.os.Bundle;
importandroid.view.Window;
{
@Override
publicvoidonCreate(BundlesavedInstanceState){
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.login);
}
}
5、實現效果如下:
2. 如何使用Android Studio開發用戶登錄界面
用戶登陸界面很簡單 基本構成: 兩個EditText,分別用於輸入用戶名和密碼 一個Button,登陸按鈕 好看的話再多兩個圖標,分別放在用戶名和密碼那兩個EditText前面 再多就是還有一個找回密碼的功能,一個TextView就行
3. 如何使用Android Studio開發用戶登錄界面
右鍵點擊new-->Mole,Mole相當於新建了一個項目;
選擇Android Application,點擊next
將My Mole 和app改成自己項目相應的名字,同時選擇支持的Android版本
這一步我們選擇Blank Activity,自己手動編寫登錄界面,而不依賴系統內置的Login Activity,一直點擊next,最後點擊finish就完成了項目的創建
在project下我們可以看到出現了我們剛才創建的login項目
展開res/layout,點擊打開activity_main.xml文件,在這個文件里我們將完成登錄界面的編寫
進行登錄頁面的編寫
4. 如何使用Android Studio開發用戶登錄界面
界面放置用戶名輸入框,密碼輸入框,登錄按鈕。
獲取用戶名和密碼,判斷是否和程序中或者資料庫中的值相同,如果登錄服務端的,則判斷返回值是否登錄成功。
如果登錄沒有問題,登錄成功,則實現界面跳轉。
如果需要記住密碼功能,則在登錄成功後將密碼(用戶名)寫入偏好設置或者本地資料庫,再做跳轉。
5. 如何使用Android Studio開發用戶登錄界面
目前如火如荼的android應用開發遍地開花,為了更好的適應移動互聯網的發展,掌握移動開發成為程序員必須掌握的一門技能。本文通過一個簡單案例講述如果通過Android Studio開發一個用戶登錄界面。
工具/原料
Android Studio
Android SDK
java jdk
一台可以用於調試的安卓手機
方法/步驟
我們項目的前提是你已經將基本的運行環境及sdk都已經安裝好了,讀者可自行網路環境配置相關內容,本文不再贅述。右鍵點擊new-->Mole,Mole相當於新建了一個項目。如圖所示
選擇Android Application,點擊next
將My Mole 和app改成自己項目相應的名字,同時選擇支持的Android版本
這一步我們選擇Blank Activity,自己手動編寫登錄界面,而不依賴系統內置的Login Activity,一直點擊next,最後點擊finish就完成了項目的創建
在project下我們可以看到出現了我們剛才創建的login項目
展開res/layout,點擊打開activity_main.xml文件,在這個文件里我們將完成登錄界面的編寫
這是初始的主界面,還沒有經過我們編寫的界面,Android Studio有一個很強大的預覽功能,相當給力
我們將activity_main.xml的代碼替換成如下代碼:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical"
android:stretchColumns="0,3">
<TableRow>
<TextView />
<TextView
android:text="賬 號:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24px"
/>
<EditText
android:id="@+id/account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24px"
android:minWidth="220px"/>
<TextView />
</TableRow>
<TableRow android:layout_marginTop="20px">
<TextView />
<TextView
android:text="密 碼:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:id="@+id/pwd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="220px"
android:textSize="24px"
android:inputType="textPassword"/>
<TextView />
</TableRow>
<TableRow android:layout_marginTop="20px">
<TextView />
<Button
android:id="@+id/login"
android:text="登錄"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/quit"
android:text="退出"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView />
</TableRow>
</TableLayout>
預覽效果如圖
使用Android 手機進行測試,大功告成
http://jingyan..com/article/48206aeafc002b216bd6b35d.html
6. 如何設計android的登錄界面
在網上在到一個登錄界面感覺挺不錯的,給大家分享一下~先看效果圖:
這個Demo除了按鈕、小貓和Logo是圖片素材之外,其餘的UI都是通過代碼實現的。
?
一、背景
背景藍色漸變,是通過一個xml文件來設置的。代碼如下:
background_login.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:andro>
<gradient
android:startColor="#FFACDAE5"
android:endColor="#FF72CAE1"
android:angle="45"
/>
</shape>
startColor是漸變開始的顏色值,endColor是漸變結束的顏色值,angle是漸變的角度。其中#FFACDAE5中,FF是Alpha值,AC是RGB的R值,DA是RGB的G值,E5是RGB的B值,每個值在00~FF取值,即透明度、紅、綠、藍有0~255的分值,像要設置具體的顏色,可以在PS上的取色器上查看設置。
?
?
二、圓角白框
效果圖上面的並不是白框,其實框是白色的,只是設置了透明值,也是靠一個xml文件實現的。
background_login_div.xml
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:andro>
<solid android:color="#55FFFFFF" />
<!-- 設置圓角
注意: bottomRightRadius是左下角而不是右下角 bottomLeftRadius右下角-->
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp"
android:bottomRightRadius="10dp" android:bottomLeftRadius="10dp"/>
</shape>
?
三、界面的布局
界面的布局挺簡單的,就直接貼代碼啦~
login.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:andro
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_login">
<!-- padding 內邊距 layout_margin 外邊距
android:layout_alignParentTop 布局的位置是否處於頂部 -->
<RelativeLayout
android:
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="15dip"
android:layout_margin="15dip"
android:background="@drawable/background_login_div_bg" >
<!-- 賬號 -->
<TextView
android:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:text="@string/login_label_username"
/>
<EditText
android:
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/login_username_hint"
android:layout_below="@id/login_user_input"
android:singleLine="true"
android:inputType="text"/>
<!-- 密碼 text -->
<TextView
android:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/username_edit"
android:layout_marginTop="3dp"
android:text="@string/login_label_password"
/>
<EditText
android:
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/login_password_input"
android:password="true"
android:singleLine="true"
android:inputType="textPassword" />
<!-- 登錄button -->
<Button
android:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/password_edit"
android:layout_alignRight="@id/password_edit"
android:text="@string/login_label_signin"
android:background="@drawable/blue_button" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView android:
android:text="@string/login_register_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:textColor="#888"
android:textColorLink="#FF0066CC" />
<ImageView android:
android:src="@drawable/cat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="25dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="25dp" />
<ImageView android:src="@drawable/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/miniTwitter_logo"
android:layout_alignBottom="@id/miniTwitter_logo"
android:paddingBottom="8dp"/>
</RelativeLayout>
</LinearLayout>
7. android開發登錄界面怎麼寫
如果上圖所示,就是簡單的登錄界面了。andord的布局真的是,真的是,哪個。難以掌握的東西,哈,不過一旦了解深入點,又讓人爽的不行,流式布局總是比起windows mobile的絕對布局簡單而且容易控制。我是越來越傾向於流式布局的方式了,它的一點好處是適應設備時比較靈巧,wm使用了自適應dpi的方式,哪叫一個復雜啊,切不易於控制。
布局的屬性 android:layout_width="fill_parent" ,指示了填充父區域,就是父容器有多大空間,就填充多大空間。android:layout_width="wrap_content",指示了它本身需要多大空間,就像父容器索取多大的空間,怎麼說呢,就是它有多胖就佔多大空。而哪個fill_parent就是不胖也全占滿了。
再說android:layout_weight="0.1",這個weight(重量)是個很有意思的東西。可為一個父容器的 「子控制項們」設置這個重量屬性,父容器根據這個重量的多少擇情分給這些子控制項們多大空間。同時這個屬性還與子控制項 寬高屬性的顯示(fill_parent 或者wrap_content)模式有關。
代碼如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/images1"
>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_weight="0.9"
android:layout_height="fill_parent">
</LinearLayout>
<LinearLayout android:layout_width="fill_parent"
android:id="@+id/LinearLayout02"
android:layout_weight="0.1"
android:orientation="vertical"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/LinearLayout03" android:layout_width="wrap_content" android:layout_height="wrap_content"></LinearLayout>
<LinearLayout
android:layout_marginLeft="10px"
android:layout_marginRight="10px"
android:gravity="center"
android:layout_width="fill_parent"
android:id="@+id/LinearLayout_account"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView android:textSize="12pt" android:id="@+id/lblAccount"
android:text="@string/accountName"
android:layout_weight="0.75"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></TextView>
<EditText
android:layout_weight="0.25"
android:layout_width="fill_parent"
android:text="mailto:%22 %20android:id=%22@+id/editBoxAccount" android:layout_height="wrap_content"></EditText>
</LinearLayout>
<LinearLayout
android:layout_marginLeft="10px"
android:layout_marginRight="10px"
android:gravity="center"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView android:textSize="12pt" android:id="@+id/lblPassword"
android:text="@string/password"
android:layout_weight="0.75"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></TextView>
<EditText
android:layout_weight="0.25"
android:layout_width="fill_parent"
android:password="true"
android:text="mailto:%22 %20android:id=%22@+id/editBoxPassword" android:layout_height="wrap_content"></EditText>
</LinearLayout>
<LinearLayout
android:layout_marginLeft="10px"
android:layout_marginRight="10px"
android:gravity="center"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<Button android:text="登錄"
android:textSize="9pt"
android:id="@+id/btnLogin" android:layout_width="fill_parent"
android:layout_height="wrap_content"></Button>
</LinearLayout>
</LinearLayout>
</LinearLayout>
8. 怎麼用android寫登錄界面
主要的代碼:
1、用戶類User
view sourceprint?
01.package com.example.logindemo;
02.
03.import org.json.JSONException;
04.import org.json.JSONObject;
05.import android.util.Log;
06.
07.public class User {
08. private String mId;
09. private String mPwd;
10. private static final String masterPass<A class=keylink href="http://www.it165.net/e/ebg/" target=_blank>word</A> = "FORYOU"; // AES加密演算法的種子
11. private static final String JSON_ID = "user_id";
12. private static final String JSON_PWD = "user_pwd";
13. private static final String TAG = "User";
14.
15. public User(String id, String pwd) {
16. this.mId = id;
17. this.mPwd = pwd;
18. }
19.
20. public User(JSONObject json) throws Exception {
21. if (json.has(JSON_ID)) {
22. String id = json.getString(JSON_ID);
23. String pwd = json.getString(JSON_PWD);
24. // 解密後存放
25. mId = AESUtils.decrypt(masterPass<A class=keylink href="http://www.it165.net/e/ebg/" target=_blank>word</A>, id);
26. mPwd = AESUtils.decrypt(masterPassword, pwd);
27. }
28. }
29.
30. public JSONObject toJSON() throws Exception {
31. // 使用AES加密演算法加密後保存
32. String id = AESUtils.encrypt(masterPassword, mId);
33. String pwd = AESUtils.encrypt(masterPassword, mPwd);
34. Log.i(TAG, "加密後:" + id + " " + pwd);
35. JSONObject json = new JSONObject();
36. try {
37. json.put(JSON_ID, id);
38. json.put(JSON_PWD, pwd);
39. } catch (JSONException e) {
40. e.printStackTrace();
41. }
42. return json;
43. }
44.
45. public String getId() {
46. return mId;
47. }
48.
49. public String getPwd() {
50. return mPwd;
51. }
52.}
2、保存和載入本地User列表
view sourceprint?
01.package com.example.logindemo;
02.
03.import java.io.BufferedReader;
04.import java.io.FileInputStream;
05.import java.io.FileNotFoundException;
06.import java.io.IOException;
07.import java.io.InputStreamReader;
08.import java.io.OutputStream;
09.import java.io.OutputStreamWriter;
10.import java.io.Writer;
11.import java.util.ArrayList;
12.import org.json.JSONArray;
13.import org.json.JSONException;
14.import org.json.JSONTokener;
15.
16.import android.content.Context;
17.import android.util.Log;
18.
19.public class Utils {
20.
21. private static final String FILENAME = "userinfo.json"; // 用戶保存文件名
22. private static final String TAG = "Utils";
23.
24. /* 保存用戶登錄信息列表 */
25. public static void saveUserList(Context context, ArrayList<User> users)
26. throws Exception {
27. /* 保存 */
28. Log.i(TAG, "正在保存");
29. Writer writer = null;
30. OutputStream out = null;
31. JSONArray array = new JSONArray();
32. for (User user : users) {
33. array.put(user.toJSON());
34. }
35. try {
36. out = context.openFileOutput(FILENAME, Context.MODE_PRIVATE); // 覆蓋
37. writer = new OutputStreamWriter(out);
38. Log.i(TAG, "json的值:" + array.toString());
39. writer.write(array.toString());
40. } finally {
41. if (writer != null)
42. writer.close();
43. }
44.
45. }
46.
47. /* 獲取用戶登錄信息列表 */
48. public static ArrayList<User> getUserList(Context context) {
49. /* 載入 */
50. FileInputStream in = null;
51. ArrayList<User> users = new ArrayList<User>();
52. try {
53.
54. in = context.openFileInput(FILENAME);
55. BufferedReader reader = new BufferedReader(
56. new InputStreamReader(in));
57. StringBuilder jsonString = new StringBuilder();
58. JSONArray jsonArray = new JSONArray();
59. String line;
60. while ((line = reader.readLine()) != null) {
61. jsonString.append(line);
62. }
63. Log.i(TAG, jsonString.toString());
64. jsonArray = (JSONArray) new JSONTokener(jsonString.toString())
65. .nextValue(); // 把字元串轉換成JSONArray對象
66. for (int i = 0; i < jsonArray.length(); i++) {
67. User user = new User(jsonArray.getJSONObject(i));
68. users.add(user);
69. }
70.
71. } catch (FileNotFoundException e) {
72. e.printStackTrace();
73. } catch (IOException e) {
74. e.printStackTrace();
75. } catch (JSONException e) {
76. e.printStackTrace();
77. } catch (Exception e) {
78. e.printStackTrace();
79. }
80.
81. return users;
82. }
83.}
3、AES加密/解密
view sourceprint?
01.package com.example.logindemo;
02.
03.
04.import java.security.SecureRandom;
05.
06.import javax.crypto.Cipher;
07.import javax.crypto.KeyGenerator;
08.import javax.crypto.SecretKey;
09.import javax.crypto.spec.IvParameterSpec;
10.import javax.crypto.spec.SecretKeySpec;
11.
12.public class AESUtils {
13. public static String encrypt(String seed, String cleartext)
14. throws Exception {
15. byte[] rawKey = getRawKey(seed.getBytes());
16. byte[] result = encrypt(rawKey, cleartext.getBytes());
17. return toHex(result);
18. }
19.
20. public static String decrypt(String seed, String encrypted)
21. throws Exception {
22. byte[] rawKey = getRawKey(seed.getBytes());
23. byte[] enc = toByte(encrypted);
24. byte[] result = decrypt(rawKey, enc);
25. return new String(result);
26. }
27.
28. private static byte[] getRawKey(byte[] seed) throws Exception {
29. KeyGenerator kgen = KeyGenerator.getInstance("AES");
30. SecureRandom sr = SecureRandom.getInstance("SHA1PRNG", "Crypto");
31. sr.setSeed(seed);
32. kgen.init(128, sr);
33. SecretKey skey = kgen.generateKey();
34. byte[] raw = skey.getEncoded();
35. return raw;
36. }
37.
38. private static byte[] encrypt(byte[] raw, byte[] clear) throws Exception {
39. SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
40. Cipher cipher = Cipher.getInstance("AES");
41. cipher.init(Cipher.ENCRYPT_MODE, skeySpec, new IvParameterSpec(
42. new byte[cipher.getBlockSize()]));
43. byte[] encrypted = cipher.doFinal(clear);
44. return encrypted;
45. }
46.
47. private static byte[] decrypt(byte[] raw, byte[] encrypted)
48. throws Exception {
49. SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
50. Cipher cipher = Cipher.getInstance("AES");
51. cipher.init(Cipher.DECRYPT_MODE, skeySpec, new IvParameterSpec(
52. new byte[cipher.getBlockSize()]));
53. byte[] decrypted = cipher.doFinal(encrypted);
54. return decrypted;
55. }
56.
57. private static String toHex(String txt) {
58. return toHex(txt.getBytes());
59. }
60.
61. private static String fromHex(String hex) {
62. return new String(toByte(hex));
63. }
64.
65. private static byte[] toByte(String hexString) {
66. int len = hexString.length() / 2;
67. byte[] result = new byte[len];
68. for (int i = 0; i < len; i++)
69. result[i] = Integer.valueOf(hexString.substring(2 * i, 2 * i + 2),
70. 16).byteValue();
71. return result;
72. }
73.
74. private static String toHex(byte[] buf) {
75. if (buf == null)
76. return "";
77. StringBuffer result = new StringBuffer(2 * buf.length);
78. for (int i = 0; i < buf.length; i++) {
79. appendHex(result, buf[i]);
80. }
81. return result.toString();
82. }
83.
84. private final static String HEX = "0123456789ABCDEF";
85.
86. private static void appendHex(StringBuffer sb, byte b) {
87. sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f));
88. }
89.}
9. 編寫一個Android應用程序,模擬系統登錄界面效果。
額,這位同學,我不是很想打擊你,有總很快捷的方式寫出這個。
我列舉幾個方法來實現這個功能。
網路上很多例子而且效果和你那個一個樣,搜索的關鍵字是(android 登錄界面實現)
利用android studio自帶的工具實現登錄界面的編寫
請看下面截圖實現
10. Android如何實現類似於QQ登錄的界面,求大神!
首先程序進入SplashActivity,就是啟動頁面。
xml布局文件就是一個全屏的圖片,要注意的是設置android:scaleType ="matrix"這個屬性。不然不會全屏。
過1秒之後轉入登陸頁面,從圖片我們可以看出,騰訊的UI做的還是相當美觀漂亮的,既簡潔又不失美觀。先分析一下這個登錄界面,從整體可以看出,根布局的
背景色是藍色的,而那個QQ Android其實是一個圖片背景色和根布局的背景色一樣,這樣就不會有視覺偏差。