登录页可查看用户协议

chengzhenyu 8 anos atrás
pai
commit
21d83fe172

+ 1 - 1
.idea/gradle.xml

@@ -5,7 +5,7 @@
5 5
       <GradleProjectSettings>
6 6
         <option name="distributionType" value="LOCAL" />
7 7
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
8
-        <option name="gradleHome" value="C:\Android\android-studio\gradle\gradle-2.14.1" />
8
+        <option name="gradleHome" value="C:\Android\Studio\gradle\gradle-2.14.1" />
9 9
         <option name="modules">
10 10
           <set>
11 11
             <option value="$PROJECT_DIR$" />

+ 1 - 4
app/build.gradle

@@ -3,7 +3,7 @@ apply plugin: 'android-apt'
3 3
 
4 4
 android {
5 5
     compileSdkVersion 24
6
-    buildToolsVersion "24.0.0"
6
+    buildToolsVersion "24.0.3"
7 7
 
8 8
     dexOptions {
9 9
         incremental true
@@ -65,9 +65,6 @@ dependencies {
65 65
     compile project(path: ':common')
66 66
     compile project(path: ':views')
67 67
     compile fileTree(include: ['*.jar'], dir: 'libs')
68
-    compile 'com.android.support:appcompat-v7:24.0.0'
69
-    compile 'com.android.support:recyclerview-v7:24.0.0'
70
-    compile 'com.android.support:design:24.0.0'
71 68
     compile 'com.jakewharton:butterknife:8.2.1'
72 69
     apt 'com.jakewharton:butterknife-compiler:8.2.1'
73 70
     compile 'com.google.code.gson:gson:2.7'

+ 0 - 3
app/src/main/java/ai/pai/lensman/app.java

@@ -13,9 +13,6 @@ import com.nostra13.universalimageloader.utils.StorageUtils;
13 13
 
14 14
 import ai.pai.lensman.utils.Constants;
15 15
 
16
-/**
17
- * Created by sky on 2015/7/6.
18
- */
19 16
 public class App extends Application {
20 17
 
21 18
     private static Context   mInstance;

+ 18 - 0
app/src/main/java/ai/pai/lensman/login/LoginActivity.java

@@ -1,15 +1,21 @@
1 1
 package ai.pai.lensman.login;
2 2
 
3 3
 import android.content.Intent;
4
+import android.graphics.Paint;
4 5
 import android.os.Bundle;
5 6
 import android.support.v4.app.FragmentActivity;
7
+import android.text.Html;
8
+import android.text.SpannableString;
6 9
 import android.text.TextUtils;
10
+import android.text.style.UnderlineSpan;
7 11
 import android.view.View;
12
+import android.widget.TextView;
8 13
 import android.widget.Toast;
9 14
 
10 15
 import com.android.views.progressbar.ProgressWheel;
11 16
 
12 17
 import ai.pai.lensman.R;
18
+import ai.pai.lensman.activities.WebViewActivity;
13 19
 import ai.pai.lensman.main.MainActivity;
14 20
 import butterknife.BindView;
15 21
 import butterknife.ButterKnife;
@@ -18,6 +24,7 @@ import butterknife.OnClick;
18 24
 public class LoginActivity extends FragmentActivity implements LoginContract.View{
19 25
 
20 26
     @BindView(R.id.wheel_wait_http)    ProgressWheel progressWheel;
27
+    @BindView(R.id.tv_agree_protocol)  TextView protocolText;
21 28
 
22 29
     private LoginContract.Presenter presenter;
23 30
 
@@ -26,6 +33,9 @@ public class LoginActivity extends FragmentActivity implements LoginContract.Vie
26 33
         super.onCreate(savedInstanceState);
27 34
         setContentView(R.layout.activity_login);
28 35
         ButterKnife.bind(this);
36
+        SpannableString content = new SpannableString(getString(R.string.agree_protocol));
37
+        content.setSpan(new UnderlineSpan(), 6, content.length(), 0);
38
+        protocolText.setText(content);
29 39
         presenter = new LoginPresenter(this,this);
30 40
     }
31 41
 
@@ -41,6 +51,14 @@ public class LoginActivity extends FragmentActivity implements LoginContract.Vie
41 51
         presenter.login();
42 52
     }
43 53
 
54
+    @OnClick(R.id.tv_agree_protocol)
55
+    public void jump2Protocol(){
56
+        Intent declareIntent = new Intent(this,WebViewActivity.class);
57
+        declareIntent.putExtra("url","http://pai.ai/page/user_agreement");
58
+        declareIntent.putExtra("title",getString(R.string.contract));
59
+        startActivity(declareIntent);
60
+    }
61
+
44 62
     @Override
45 63
     public void showLoginHint(String hint) {
46 64
         if(TextUtils.isEmpty(hint)){

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -13,7 +13,7 @@
13 13
     <string name="scene">场景</string>
14 14
 
15 15
     <string name="wx_login">微信登录</string>
16
-    <string name="agree_protocol">已阅读并同意拍爱用户协议</string>
16
+    <string name="agree_protocol">已阅读并同意<u>拍爱用户协议</u></string>
17 17
 
18 18
     <string name="login_success">登录成功</string>
19 19
     <string name="login_fail">登录失败</string>

+ 1 - 1
build.gradle

@@ -5,7 +5,7 @@ buildscript {
5 5
         jcenter()
6 6
     }
7 7
     dependencies {
8
-        classpath 'com.android.tools.build:gradle:2.2.0-rc2'
8
+        classpath 'com.android.tools.build:gradle:2.2.0'
9 9
         classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
10 10
         // NOTE: Do not place your application dependencies here; they belong
11 11
         // in the individual module build.gradle files

+ 2 - 2
common/build.gradle

@@ -1,8 +1,8 @@
1 1
 apply plugin: 'com.android.library'
2 2
 
3 3
 android {
4
-    compileSdkVersion 23
5
-    buildToolsVersion "23.0.2"
4
+    compileSdkVersion 24
5
+    buildToolsVersion "24.0.3"
6 6
 
7 7
     defaultConfig {
8 8
         minSdkVersion 14

+ 5 - 5
views/build.gradle

@@ -1,8 +1,8 @@
1 1
 apply plugin: 'com.android.library'
2 2
 
3 3
 android {
4
-    compileSdkVersion 23
5
-    buildToolsVersion "23.0.2"
4
+    compileSdkVersion 24
5
+    buildToolsVersion "24.0.3"
6 6
 
7 7
     defaultConfig {
8 8
         minSdkVersion 14
@@ -14,7 +14,7 @@ android {
14 14
 
15 15
 dependencies {
16 16
     compile fileTree(include: ['*.jar'], dir: 'libs')
17
-    compile 'com.android.support:appcompat-v7:23.2.0'
18
-    compile 'com.android.support:recyclerview-v7:23.1.1'
19
-    compile 'com.android.support:design:23.1.1'
17
+    compile 'com.android.support:recyclerview-v7:24.2.1'
18
+    compile 'com.android.support:design:24.2.1'
19
+    compile 'com.android.support:appcompat-v7:24.2.1'
20 20
 }