作者 qin

增加欢迎页,修改顶部UI

@@ -3,7 +3,7 @@ apply plugin: 'com.android.application' @@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
3 android { 3 android {
4 4
5 signingConfigs { 5 signingConfigs {
6 - /* debug { 6 + /* debug {
7 storeFile file('D:\\project\\huahang_project\\app\\xuetubao.jks') 7 storeFile file('D:\\project\\huahang_project\\app\\xuetubao.jks')
8 storePassword '111111' 8 storePassword '111111'
9 keyAlias = 'xuetubao' 9 keyAlias = 'xuetubao'
@@ -8,25 +8,31 @@ @@ -8,25 +8,31 @@
8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9 <uses-permission 9 <uses-permission
10 android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" 10 android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
11 - tools:ignore="ProtectedPermissions" />  
12 - <!-- 允许程序访问WiFi网络信息 -->  
13 - <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />  
14 - <!-- 允许程序读写手机状态和身份 -->  
15 - <uses-permission android:name="android.permission.READ_PHONE_STATE" />  
16 - <!-- 允许程序访问CellID或WiFi热点来获取粗略的位置 --> 11 + tools:ignore="ProtectedPermissions" /> <!-- 允许程序访问WiFi网络信息 -->
  12 + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 允许程序读写手机状态和身份 -->
  13 + <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- 允许程序访问CellID或WiFi热点来获取粗略的位置 -->
17 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 14 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
18 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 15 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
19 16
20 -  
21 <application 17 <application
22 android:name=".MyApplication" 18 android:name=".MyApplication"
23 android:allowBackup="true" 19 android:allowBackup="true"
24 - android:icon="@mipmap/ic_launcher" 20 + android:icon="@drawable/xuetubao"
25 android:label="@string/app_name" 21 android:label="@string/app_name"
26 android:roundIcon="@mipmap/ic_launcher_round" 22 android:roundIcon="@mipmap/ic_launcher_round"
27 android:supportsRtl="true" 23 android:supportsRtl="true"
28 android:theme="@style/NoTheme" 24 android:theme="@style/NoTheme"
29 android:usesCleartextTraffic="true"> 25 android:usesCleartextTraffic="true">
  26 + <activity
  27 + android:name=".activity.login.WelcomeActivity"
  28 + android:screenOrientation="portrait" >
  29 + <intent-filter>
  30 + <action android:name="android.intent.action.MAIN" />
  31 +
  32 + <category android:name="android.intent.category.LAUNCHER" />
  33 + </intent-filter>
  34 + </activity>
  35 +
30 <meta-data 36 <meta-data
31 android:name="com.amap.api.v2.apikey" 37 android:name="com.amap.api.v2.apikey"
32 android:value="64d9479176ae933006f461633143e1a6" /> 38 android:value="64d9479176ae933006f461633143e1a6" />
@@ -37,47 +43,34 @@ @@ -37,47 +43,34 @@
37 android:name=".activity.study.StudyActivity" 43 android:name=".activity.study.StudyActivity"
38 android:launchMode="singleTask" 44 android:launchMode="singleTask"
39 android:screenOrientation="portrait" /> 45 android:screenOrientation="portrait" />
40 -  
41 <activity 46 <activity
42 android:name=".activity.study.CourseDetailActivity_Video" 47 android:name=".activity.study.CourseDetailActivity_Video"
43 android:configChanges="orientation|screenSize|keyboardHidden" 48 android:configChanges="orientation|screenSize|keyboardHidden"
44 android:screenOrientation="portrait" /> 49 android:screenOrientation="portrait" />
45 -  
46 <activity 50 <activity
47 android:name=".activity.study.VipActivity" 51 android:name=".activity.study.VipActivity"
48 android:screenOrientation="portrait" /> 52 android:screenOrientation="portrait" />
49 <activity 53 <activity
50 android:name=".MainActivity" 54 android:name=".MainActivity"
51 - android:launchMode="singleTask">  
52 -  
53 - </activity>  
54 -  
55 - <!-- 绑定微信 --> 55 + android:launchMode="singleTask"></activity> <!-- 绑定微信 -->
56 <activity 56 <activity
57 android:name=".activity.login.BdsjActivity" 57 android:name=".activity.login.BdsjActivity"
58 - android:screenOrientation="portrait" />  
59 -  
60 - <!-- 机构登录 --> 58 + android:screenOrientation="portrait" /> <!-- 机构登录 -->
61 <activity 59 <activity
62 android:name=".activity.login.JgdlActivity" 60 android:name=".activity.login.JgdlActivity"
63 - android:screenOrientation="portrait" />  
64 -  
65 - <!-- 忘记密码 --> 61 + android:screenOrientation="portrait" /> <!-- 忘记密码 -->
66 <activity 62 <activity
67 android:name=".activity.login.ForgetPasActivity" 63 android:name=".activity.login.ForgetPasActivity"
68 android:screenOrientation="portrait" /> 64 android:screenOrientation="portrait" />
69 -  
70 <activity 65 <activity
71 android:name=".activity.personal.InfromationActivity" 66 android:name=".activity.personal.InfromationActivity"
72 android:screenOrientation="portrait" /> 67 android:screenOrientation="portrait" />
73 <activity 68 <activity
74 android:name=".activity.personal.ResumeActivity" 69 android:name=".activity.personal.ResumeActivity"
75 android:screenOrientation="portrait" /> 70 android:screenOrientation="portrait" />
76 -  
77 <activity 71 <activity
78 android:name=".activity.study.WebActivity" 72 android:name=".activity.study.WebActivity"
79 android:screenOrientation="portrait" /> 73 android:screenOrientation="portrait" />
80 -  
81 <activity 74 <activity
82 android:name=".activity.personal.MessageActivity" 75 android:name=".activity.personal.MessageActivity"
83 android:screenOrientation="portrait" /> 76 android:screenOrientation="portrait" />
@@ -116,13 +109,7 @@ @@ -116,13 +109,7 @@
116 android:screenOrientation="portrait" /> 109 android:screenOrientation="portrait" />
117 <activity 110 <activity
118 android:name=".activity.login.LoginActivity" 111 android:name=".activity.login.LoginActivity"
119 - android:screenOrientation="portrait">  
120 - <intent-filter>  
121 - <action android:name="android.intent.action.MAIN" />  
122 -  
123 - <category android:name="android.intent.category.LAUNCHER" />  
124 - </intent-filter>  
125 - </activity> 112 + android:screenOrientation="portrait"/>
126 <activity 113 <activity
127 android:name=".activity.personal.MoneyHistoryActivity" 114 android:name=".activity.personal.MoneyHistoryActivity"
128 android:screenOrientation="portrait" /> 115 android:screenOrientation="portrait" />
@@ -155,16 +142,12 @@ @@ -155,16 +142,12 @@
155 android:screenOrientation="portrait" /> 142 android:screenOrientation="portrait" />
156 <activity 143 <activity
157 android:name=".activity.pratice.c" 144 android:name=".activity.pratice.c"
158 - android:screenOrientation="portrait" />  
159 -  
160 - <!-- 微信 --> 145 + android:screenOrientation="portrait" /> <!-- 微信 -->
161 <activity 146 <activity
162 android:name=".wxapi.WXEntryActivity" 147 android:name=".wxapi.WXEntryActivity"
163 android:configChanges="keyboardHidden|orientation|screenSize" 148 android:configChanges="keyboardHidden|orientation|screenSize"
164 android:exported="true" 149 android:exported="true"
165 android:theme="@android:style/Theme.Translucent.NoTitleBar" /> 150 android:theme="@android:style/Theme.Translucent.NoTitleBar" />
166 -  
167 </application> 151 </application>
168 152
169 -  
170 </manifest> 153 </manifest>
  1 +package com.hh.xuetubao.activity.login;
  2 +
  3 +import android.content.Intent;
  4 +import android.os.CountDownTimer;
  5 +
  6 +import com.hh.xuetubao.R;
  7 +import com.hh.xuetubao.model.AccountModel;
  8 +import com.hh.xuetubao.mvp.BaseMvpActivity;
  9 +import com.hh.xuetubao.mvp.CommonPresenter;
  10 +import com.hh.xuetubao.mvp.ICommonView;
  11 +
  12 +public class WelcomeActivity extends BaseMvpActivity<CommonPresenter, AccountModel> implements ICommonView {
  13 +
  14 + private CountDownTimer timer;
  15 +
  16 + @Override
  17 + public void initView() {
  18 +
  19 + timer = new CountDownTimer(3000, 1000) {
  20 + @Override
  21 + public void onTick(long millisUntilFinished) {
  22 +
  23 + }
  24 +
  25 + @Override
  26 + public void onFinish() {
  27 + Intent intent=new Intent(WelcomeActivity.this,LoginActivity.class);
  28 + startActivity(intent);
  29 + }
  30 + }.start();
  31 + }
  32 +
  33 + @Override
  34 + public int initLayout() {
  35 + return R.layout.activity_welcome;
  36 + }
  37 +
  38 + @Override
  39 + public void initData() {
  40 +
  41 + }
  42 +
  43 + @Override
  44 + public CommonPresenter getPresenter() {
  45 + return new CommonPresenter();
  46 + }
  47 +
  48 + @Override
  49 + public AccountModel getModel() {
  50 + return new AccountModel();
  51 + }
  52 +
  53 + @Override
  54 + public void getData(Object o, int api, int intent) {
  55 +
  56 + }
  57 +
  58 + @Override
  59 + public void onComplete(int api) {
  60 +
  61 + }
  62 +
  63 + @Override
  64 + public void onError(Throwable e, int api) {
  65 +
  66 + }
  67 +
  68 + @Override
  69 + protected void onDestroy() {
  70 + super.onDestroy();
  71 + timer.cancel();
  72 + }
  73 +}
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <LinearLayout 9 <LinearLayout
10 android:id="@+id/lin_tab" 10 android:id="@+id/lin_tab"
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 - android:layout_height="@dimen/dp_68" 12 + android:layout_height="@dimen/dp_48"
13 android:background="#F2F2F2" 13 android:background="#F2F2F2"
14 android:orientation="horizontal"> 14 android:orientation="horizontal">
15 15
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <LinearLayout 23 <LinearLayout
24 android:id="@+id/lin_tab" 24 android:id="@+id/lin_tab"
25 android:layout_width="match_parent" 25 android:layout_width="match_parent"
26 - android:layout_height="@dimen/dp_68" 26 + android:layout_height="@dimen/dp_48"
27 android:background="#F2F2F2" 27 android:background="#F2F2F2"
28 android:orientation="horizontal"> 28 android:orientation="horizontal">
29 29
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <LinearLayout 9 <LinearLayout
10 android:id="@+id/lin_tab" 10 android:id="@+id/lin_tab"
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 - android:layout_height="@dimen/dp_68" 12 + android:layout_height="@dimen/dp_48"
13 android:background="#F2F2F2" 13 android:background="#F2F2F2"
14 android:orientation="horizontal"> 14 android:orientation="horizontal">
15 15
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <LinearLayout 9 <LinearLayout
10 android:id="@+id/lin_tab" 10 android:id="@+id/lin_tab"
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 - android:layout_height="@dimen/dp_68" 12 + android:layout_height="@dimen/dp_48"
13 android:background="#F2F2F2" 13 android:background="#F2F2F2"
14 android:orientation="horizontal"> 14 android:orientation="horizontal">
15 15
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <RelativeLayout 8 <RelativeLayout
9 android:id="@+id/rl_search" 9 android:id="@+id/rl_search"
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 - android:layout_height="@dimen/dp_68" 11 + android:layout_height="@dimen/dp_48"
12 android:layout_alignParentTop="true" 12 android:layout_alignParentTop="true"
13 android:background="#F2F2F2"> 13 android:background="#F2F2F2">
14 14
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <RelativeLayout 8 <RelativeLayout
9 android:id="@+id/rl_top" 9 android:id="@+id/rl_top"
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 - android:layout_height="@dimen/dp_68" 11 + android:layout_height="@dimen/dp_48"
12 android:background="#F2F2F2"> 12 android:background="#F2F2F2">
13 13
14 <LinearLayout 14 <LinearLayout
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <RelativeLayout 8 <RelativeLayout
9 android:id="@+id/rl_top" 9 android:id="@+id/rl_top"
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 - android:layout_height="@dimen/dp_68" 11 + android:layout_height="@dimen/dp_48"
12 android:background="#F2F2F2"> 12 android:background="#F2F2F2">
13 13
14 <LinearLayout 14 <LinearLayout
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <RelativeLayout 10 <RelativeLayout
11 android:id="@+id/rl_top" 11 android:id="@+id/rl_top"
12 android:layout_width="match_parent" 12 android:layout_width="match_parent"
13 - android:layout_height="@dimen/dp_68" 13 + android:layout_height="@dimen/dp_48"
14 android:background="#F2F2F2"> 14 android:background="#F2F2F2">
15 15
16 <LinearLayout 16 <LinearLayout
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 7
8 <LinearLayout 8 <LinearLayout
9 android:layout_width="match_parent" 9 android:layout_width="match_parent"
10 - android:layout_height="@dimen/dp_68" 10 + android:layout_height="@dimen/dp_48"
11 android:background="#F2F2F2" 11 android:background="#F2F2F2"
12 android:gravity="center_vertical" 12 android:gravity="center_vertical"
13 android:orientation="horizontal"> 13 android:orientation="horizontal">
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <RelativeLayout 8 <RelativeLayout
9 android:id="@+id/rl_top" 9 android:id="@+id/rl_top"
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 - android:layout_height="@dimen/dp_68" 11 + android:layout_height="@dimen/dp_48"
12 android:background="#F2F2F2"> 12 android:background="#F2F2F2">
13 13
14 <LinearLayout 14 <LinearLayout
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <RelativeLayout 8 <RelativeLayout
9 android:id="@+id/rl_top" 9 android:id="@+id/rl_top"
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 - android:layout_height="@dimen/dp_68" 11 + android:layout_height="@dimen/dp_48"
12 android:background="#F2F2F2"> 12 android:background="#F2F2F2">
13 13
14 <LinearLayout 14 <LinearLayout
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <RelativeLayout 18 <RelativeLayout
19 android:id="@+id/lin_tab" 19 android:id="@+id/lin_tab"
20 android:layout_width="match_parent" 20 android:layout_width="match_parent"
21 - android:layout_height="@dimen/dp_68" 21 + android:layout_height="@dimen/dp_48"
22 android:background="#F2F2F2" 22 android:background="#F2F2F2"
23 android:orientation="horizontal"> 23 android:orientation="horizontal">
24 24
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <RelativeLayout 8 <RelativeLayout
9 android:id="@+id/rl_top" 9 android:id="@+id/rl_top"
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 - android:layout_height="@dimen/dp_68" 11 + android:layout_height="@dimen/dp_48"
12 android:layout_alignParentTop="true" 12 android:layout_alignParentTop="true"
13 android:background="#F2F2F2"> 13 android:background="#F2F2F2">
14 14
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:tools="http://schemas.android.com/tools"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="match_parent"
  6 + tools:context=".activity.login.WelcomeActivity">
  7 +
  8 + <ImageView
  9 + android:layout_width="match_parent"
  10 + android:layout_height="match_parent"
  11 + android:src="@mipmap/welcome"/>
  12 +</LinearLayout>
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <RelativeLayout 7 <RelativeLayout
8 android:id="@+id/rl_top" 8 android:id="@+id/rl_top"
9 android:layout_width="match_parent" 9 android:layout_width="match_parent"
10 - android:layout_height="@dimen/dp_68" 10 + android:layout_height="@dimen/dp_48"
11 android:background="#F2F2F2"> 11 android:background="#F2F2F2">
12 12
13 <LinearLayout 13 <LinearLayout
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <RelativeLayout 9 <RelativeLayout
10 android:id="@+id/rl_top" 10 android:id="@+id/rl_top"
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 - android:layout_height="@dimen/dp_68" 12 + android:layout_height="@dimen/dp_48"
13 android:background="#F2F2F2"> 13 android:background="#F2F2F2">
14 14
15 <LinearLayout 15 <LinearLayout
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <RelativeLayout 9 <RelativeLayout
10 android:id="@+id/rl_top" 10 android:id="@+id/rl_top"
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 - android:layout_height="@dimen/dp_68" 12 + android:layout_height="@dimen/dp_48"
13 android:background="#F2F2F2"> 13 android:background="#F2F2F2">
14 14
15 <LinearLayout 15 <LinearLayout
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <RelativeLayout 7 <RelativeLayout
8 android:id="@+id/rl_top" 8 android:id="@+id/rl_top"
9 android:layout_width="match_parent" 9 android:layout_width="match_parent"
10 - android:layout_height="@dimen/dp_68" 10 + android:layout_height="@dimen/dp_48"
11 android:background="#F2F2F2"> 11 android:background="#F2F2F2">
12 12
13 <LinearLayout 13 <LinearLayout
@@ -8,17 +8,16 @@ @@ -8,17 +8,16 @@
8 <RelativeLayout 8 <RelativeLayout
9 android:id="@+id/rl_search" 9 android:id="@+id/rl_search"
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 - android:layout_height="@dimen/dp_45" 11 + android:layout_height="@dimen/dp_48"
12 android:layout_alignParentTop="true" 12 android:layout_alignParentTop="true"
13 android:background="#F2F2F2"> 13 android:background="#F2F2F2">
14 14
15 <LinearLayout 15 <LinearLayout
16 android:layout_width="match_parent" 16 android:layout_width="match_parent"
17 android:layout_height="@dimen/dp_30" 17 android:layout_height="@dimen/dp_30"
18 - android:layout_alignParentBottom="true"  
19 android:layout_marginLeft="@dimen/dp_15" 18 android:layout_marginLeft="@dimen/dp_15"
20 android:layout_marginRight="@dimen/dp_15" 19 android:layout_marginRight="@dimen/dp_15"
21 - android:layout_marginBottom="@dimen/dp_7" 20 + android:layout_centerVertical="true"
22 android:background="@drawable/circle_concers" 21 android:background="@drawable/circle_concers"
23 android:orientation="horizontal"> 22 android:orientation="horizontal">
24 23