Browse Source

项目初始化。包含三个接口测试模块:
1.数据接口测试;
2.注册接口测试;
3.登录接口测试。

Yumin 6 years ago
commit
14ae982c5e
68 changed files with 2689 additions and 0 deletions
  1. 1 0
      app/.gitignore
  2. 71 0
      app/build.gradle
  3. BIN
      app/libs/Volley.jar
  4. 21 0
      app/proguard-rules.pro
  5. 26 0
      app/src/androidTest/java/cn/minbb/InterfaceTest/ExampleInstrumentedTest.java
  6. 43 0
      app/src/main/AndroidManifest.xml
  7. 119 0
      app/src/main/java/cn/minbb/InterfaceTest/EntranceActivity.java
  8. 136 0
      app/src/main/java/cn/minbb/InterfaceTest/controls/ClearTextInputEditText.java
  9. 93 0
      app/src/main/java/cn/minbb/InterfaceTest/ctrl/App.java
  10. 69 0
      app/src/main/java/cn/minbb/InterfaceTest/entity/User.java
  11. 132 0
      app/src/main/java/cn/minbb/InterfaceTest/utils/JsonFormatTool.java
  12. 232 0
      app/src/main/java/cn/minbb/InterfaceTest/views/LoginActivity.java
  13. 132 0
      app/src/main/java/cn/minbb/InterfaceTest/views/MainActivity.java
  14. 310 0
      app/src/main/java/cn/minbb/InterfaceTest/views/RegisterActivity.java
  15. 76 0
      app/src/main/java/cn/minbb/InterfaceTest/views/ScrollingActivity.java
  16. 5 0
      app/src/main/res/color/text_black_to_light_selector.xml
  17. 15 0
      app/src/main/res/color/text_gray_background_selector.xml
  18. BIN
      app/src/main/res/drawable-hdpi/ic_action_help_light.png
  19. BIN
      app/src/main/res/drawable-hdpi/ic_action_lock_dark.png
  20. BIN
      app/src/main/res/drawable-hdpi/ic_action_person_dark.png
  21. 9 0
      app/src/main/res/drawable-hdpi/ic_bookmark_24dp.xml
  22. 9 0
      app/src/main/res/drawable-hdpi/ic_chevron_right_black_24dp.xml
  23. BIN
      app/src/main/res/drawable-mdpi/ic_action_help_light.png
  24. BIN
      app/src/main/res/drawable-mdpi/ic_action_lock_dark.png
  25. BIN
      app/src/main/res/drawable-mdpi/ic_action_person_dark.png
  26. 34 0
      app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  27. BIN
      app/src/main/res/drawable-xhdpi/ic_action_help_light.png
  28. BIN
      app/src/main/res/drawable-xhdpi/ic_action_lock_dark.png
  29. BIN
      app/src/main/res/drawable-xhdpi/ic_action_person_dark.png
  30. BIN
      app/src/main/res/drawable-xxhdpi/ic_action_help_light.png
  31. BIN
      app/src/main/res/drawable-xxhdpi/ic_action_lock_dark.png
  32. BIN
      app/src/main/res/drawable-xxhdpi/ic_action_person_dark.png
  33. BIN
      app/src/main/res/drawable/doc.jpg
  34. 4 0
      app/src/main/res/drawable/ic_arrow_back_white_24dp.xml
  35. 4 0
      app/src/main/res/drawable/ic_close_black_24dp.xml
  36. 9 0
      app/src/main/res/drawable/ic_credit_card_black_24dp.xml
  37. 9 0
      app/src/main/res/drawable/ic_date_range_black_24dp.xml
  38. 9 0
      app/src/main/res/drawable/ic_domain_black_24dp.xml
  39. 170 0
      app/src/main/res/drawable/ic_launcher_background.xml
  40. 9 0
      app/src/main/res/drawable/ic_lock_black_24dp.xml
  41. 9 0
      app/src/main/res/drawable/ic_person_black_24dp.xml
  42. 9 0
      app/src/main/res/drawable/ic_phone_android_black_24dp.xml
  43. 9 0
      app/src/main/res/drawable/ic_phone_black_24dp.xml
  44. 65 0
      app/src/main/res/layout/activity_entrance.xml
  45. 164 0
      app/src/main/res/layout/activity_login.xml
  46. 124 0
      app/src/main/res/layout/activity_main.xml
  47. 312 0
      app/src/main/res/layout/activity_register.xml
  48. 47 0
      app/src/main/res/layout/activity_scrolling.xml
  49. 15 0
      app/src/main/res/layout/app_bar_layout.xml
  50. 18 0
      app/src/main/res/layout/content_scrolling.xml
  51. 10 0
      app/src/main/res/menu/menu_scrolling.xml
  52. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  53. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  54. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  55. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  56. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  57. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  58. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  59. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  60. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  61. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  62. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  63. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  64. 9 0
      app/src/main/res/values/colors.xml
  65. 5 0
      app/src/main/res/values/dimens.xml
  66. 93 0
      app/src/main/res/values/strings.xml
  67. 26 0
      app/src/main/res/values/styles.xml
  68. 17 0
      app/src/test/java/cn/minbb/InterfaceTest/ExampleUnitTest.java

+ 1 - 0
app/.gitignore

@@ -0,0 +1 @@
+/build

+ 71 - 0
app/build.gradle

@@ -0,0 +1,71 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 26
+    defaultConfig {
+        applicationId "cn.minbb.InterfaceTest"
+        minSdkVersion 16
+        targetSdkVersion 26
+        versionCode 1
+        versionName "1.0"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+        vectorDrawables.useSupportLibrary = true
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+
+    sourceSets {
+        main {
+            // manifest.srcFile 'AndroidManifest.xml'
+            // java.srcDirs = ['src']
+            // res.srcDirs = ['res']
+            assets.srcDirs = ['assets']
+            jniLibs.srcDirs = ['libs']
+        }
+    }
+
+    // 指定项目编码方式
+    compileOptions.encoding = "UTF-8"
+
+    // 指定编译版本
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+
+    // 加快编译速度
+    dexOptions {
+        // 使用增量模式构建
+        // incremental true
+        // 最大堆内存
+        javaMaxHeapSize "8g"
+        // 是否支持大工程模式
+        jumboMode = true
+        // 预编译
+        preDexLibraries = true
+        // 线程数
+        threadCount = 8
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation 'com.android.support:appcompat-v7:26.1.0'
+    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+    implementation 'com.jakewharton:butterknife:8.8.1'
+    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
+    implementation 'com.android.support:design:26.1.0'
+    implementation 'com.android.support:cardview-v7:26.1.0'
+    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
+    implementation 'com.alibaba:fastjson:1.1.63.android'
+    implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
+    implementation 'org.projectlombok:lombok:1.16.20'
+    annotationProcessor 'org.projectlombok:lombok:1.16.20'
+}

BIN
app/libs/Volley.jar


+ 21 - 0
app/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
app/src/androidTest/java/cn/minbb/InterfaceTest/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package cn.minbb.InterfaceTest;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("cn.minbb.InterfaceTest", appContext.getPackageName());
+    }
+}

+ 43 - 0
app/src/main/AndroidManifest.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="cn.minbb.InterfaceTest">
+
+    <!-- 完全的网络访问权限 -->
+    <uses-permission android:name="android.permission.INTERNET" />
+
+    <application
+        android:name=".ctrl.App"
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme">
+        <activity
+            android:name=".EntranceActivity"
+            android:label="接口测试">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name=".views.MainActivity"
+            android:label="接口测试"
+            android:launchMode="singleTask" />
+        <activity
+            android:name=".views.RegisterActivity"
+            android:label="用户注册"
+            android:launchMode="singleTask" />
+        <activity
+            android:name=".views.LoginActivity"
+            android:label="用户登录"
+            android:launchMode="singleTask" />
+        <activity
+            android:name=".views.ScrollingActivity"
+            android:label="结果"
+            android:theme="@style/AppTheme.NoActionBar" />
+    </application>
+
+</manifest>

+ 119 - 0
app/src/main/java/cn/minbb/InterfaceTest/EntranceActivity.java

@@ -0,0 +1,119 @@
+package cn.minbb.InterfaceTest;
+
+import android.os.Bundle;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.joanzapata.iconify.widget.IconTextView;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import cn.minbb.InterfaceTest.ctrl.App;
+import cn.minbb.InterfaceTest.views.LoginActivity;
+import cn.minbb.InterfaceTest.views.MainActivity;
+import cn.minbb.InterfaceTest.views.RegisterActivity;
+
+public class EntranceActivity extends AppCompatActivity {
+
+    @BindView(R.id.dataInterface)
+    Button dataInterface;
+    @BindView(R.id.registerInterface)
+    Button registerInterface;
+    @BindView(R.id.loginInterface)
+    Button loginInterface;
+    @BindView(R.id.serverStatus)
+    TextView serverStatus;
+    @BindView(R.id.serverStatusRefresh)
+    IconTextView serverStatusRefresh;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_entrance);
+        ButterKnife.bind(this);
+        App.setupActionBar(this);
+        testServerStatus();
+    }
+
+    @OnClick({R.id.dataInterface, R.id.registerInterface, R.id.loginInterface, R.id.serverStatusRefresh})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.dataInterface:
+                MainActivity.start(EntranceActivity.this);
+                break;
+            case R.id.registerInterface:
+                RegisterActivity.start(EntranceActivity.this);
+                break;
+            case R.id.loginInterface:
+                LoginActivity.start(EntranceActivity.this);
+                break;
+            case R.id.serverStatusRefresh:
+                testServerStatus();
+                break;
+        }
+    }
+
+    // 检查服务器状态
+    public void testServerStatus() {
+        serverStatusRefresh.setText("{fa-refresh spin}");
+        StringRequest serverStatusRequest = new StringRequest(Request.Method.GET,
+                "http://218.28.14.168:8080/TKRCS/",
+                s -> {
+                    serverStatusRefresh.setText("{fa-refresh}");
+                    serverStatus.setText("在线");
+                    serverStatus.setTextColor(ContextCompat.getColor(this, android.R.color.holo_green_light));
+                },
+                volleyError -> {
+                    serverStatusRefresh.setText("{fa-refresh}");
+                    serverStatus.setText("离线");
+                    serverStatus.setTextColor(ContextCompat.getColor(this, android.R.color.holo_red_light));
+                });
+        App.getRequestQueue().add(serverStatusRequest);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case android.R.id.home:
+                exit();
+                break;
+            default:
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK) {
+            exit();
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
+    private void exit() {
+        AlertDialog.Builder builder = new AlertDialog.Builder(EntranceActivity.this);
+        builder.setTitle("提示")
+                .setMessage("退出系统测试?")
+                .setPositiveButton("退出", (dialog, which) -> {
+                    EntranceActivity.this.finish();
+                })
+                .setNegativeButton("取消", (dialog, which) -> {
+                })
+                .create().show();
+    }
+}

+ 136 - 0
app/src/main/java/cn/minbb/InterfaceTest/controls/ClearTextInputEditText.java

@@ -0,0 +1,136 @@
+package cn.minbb.InterfaceTest.controls;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.support.design.widget.TextInputEditText;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.app.AppCompatDelegate;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.CycleInterpolator;
+import android.view.animation.TranslateAnimation;
+
+import cn.minbb.InterfaceTest.R;
+
+public class ClearTextInputEditText extends TextInputEditText implements View.OnFocusChangeListener, TextWatcher {
+
+    private Context context;
+    // 删除按钮的引用
+    private Drawable drawable;
+    // 控件是否有焦点
+    private boolean hasFocus;
+
+    public ClearTextInputEditText(Context context) {
+        super(context);
+        this.context = context;
+        init();
+    }
+
+    public ClearTextInputEditText(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        this.context = context;
+        init();
+    }
+
+    public ClearTextInputEditText(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        this.context = context;
+        init();
+    }
+
+    private void init() {
+        // 启用通过资源加载矢量图 - Android 5.0 以前版本必须使用
+        AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
+        // 获取 EditText 的 DrawableRight, 假如没有设置就使用默认的图片
+        drawable = getCompoundDrawables()[2];
+        if (drawable == null) {
+            drawable = ContextCompat.getDrawable(context, R.drawable.ic_close_black_24dp);
+        }
+
+        drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
+        // 默认设置隐藏图标
+        setClearIconVisible(false);
+        // 设置焦点改变的监听
+        setOnFocusChangeListener(this);
+        // 设置输入框里面内容发生改变的监听
+        addTextChangedListener(this);
+    }
+
+    /**
+     * 因为我们不能直接给 EditText 设置点击事件,所以我们用记住我们按下的位置来模拟点击事件
+     * 当我们按下的位置在 EditText 的宽度 - 图标到控件右边的间距 - 图标的宽度和 EditText 的宽度 - 图标到控件右边的间距之间我们就算点击了图标,竖直方向就没有考虑
+     */
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        if (event.getAction() == MotionEvent.ACTION_UP) {
+            if (getCompoundDrawables()[2] != null) {
+                if (event.getX() > (getWidth() - getTotalPaddingRight()) && (event.getX() < ((getWidth() - getPaddingRight())))) {
+                    this.setText("");
+                }
+            }
+        }
+        return super.onTouchEvent(event);
+    }
+
+    @Override
+    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+    }
+
+    @Override
+    public void onTextChanged(CharSequence s, int start, int before, int count) {
+        if (hasFocus) {
+            setClearIconVisible(s.length() > 0);
+        }
+    }
+
+    @Override
+    public void afterTextChanged(Editable s) {
+
+    }
+
+    @Override
+    public void onFocusChange(View v, boolean hasFocus) {
+        this.hasFocus = hasFocus;
+        if (hasFocus) {
+            setClearIconVisible(getText().length() > 0);
+        } else {
+            setClearIconVisible(false);
+        }
+    }
+
+    /**
+     * 设置清除图标的显示与隐藏,调用 setCompoundDrawables 为 EditText 绘制上去
+     *
+     * @param visible 是否显示
+     */
+    protected void setClearIconVisible(boolean visible) {
+        Drawable right = visible ? drawable : null;
+        drawable.setBounds(0, 0, 48, 48);
+        setCompoundDrawables(getCompoundDrawables()[0], getCompoundDrawables()[1], right, getCompoundDrawables()[3]);
+    }
+
+    /**
+     * 设置晃动动画
+     */
+    public void setShakeAnimation() {
+        this.setAnimation(shakeAnimation(5));
+    }
+
+    /**
+     * 晃动动画
+     *
+     * @param counts 1 秒钟晃动多少下
+     * @return
+     */
+    public static Animation shakeAnimation(int counts) {
+        Animation translateAnimation = new TranslateAnimation(0, 10, 0, 0);
+        translateAnimation.setInterpolator(new CycleInterpolator(counts));
+        translateAnimation.setDuration(1000);
+        return translateAnimation;
+    }
+}

+ 93 - 0
app/src/main/java/cn/minbb/InterfaceTest/ctrl/App.java

@@ -0,0 +1,93 @@
+package cn.minbb.InterfaceTest.ctrl;
+
+import android.annotation.SuppressLint;
+import android.app.Application;
+import android.content.Context;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.android.volley.RequestQueue;
+import com.android.volley.toolbox.Volley;
+import com.joanzapata.iconify.Iconify;
+import com.joanzapata.iconify.fonts.FontAwesomeModule;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import cn.minbb.InterfaceTest.R;
+
+public class App extends Application {
+
+    // 全局上下文
+    private Context context = null;
+    // Volley 网络请求队列
+    private static RequestQueue requestQueue;
+    // 时间格式
+    private static SimpleDateFormat simpleDateFormat = (SimpleDateFormat) SimpleDateFormat.getDateTimeInstance();
+
+    public App() {
+    }
+
+    @SuppressLint("StaticFieldLeak")
+    private static App app = null;
+
+    public static App getApp() {
+        return app;
+    }
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        app = this;
+        context = getApplicationContext();
+
+        // 初始化 Volley 网络请求队列
+        requestQueue = Volley.newRequestQueue(context);
+        // 初始化字体图标模块
+        Iconify.with(new FontAwesomeModule());
+    }
+
+    @Override
+    public void onTerminate() {
+        super.onTerminate();
+    }
+
+    public static RequestQueue getRequestQueue() {
+        return requestQueue;
+    }
+
+    // 获取系统当前时间
+    public static String getCurrentStringTime() {
+        return simpleDateFormat.format(getCurrentDateTime());
+    }
+
+    public static Date getCurrentDateTime() {
+        return new Date();
+    }
+
+    public Context getContext() {
+        return context;
+    }
+
+    // 设置 ActionBar
+    public static void setupActionBar(AppCompatActivity appCompatActivity) {
+        // id from appcompat
+        ViewGroup rootView = appCompatActivity.findViewById(R.id.action_bar_root);
+        if (rootView != null) {
+            View view = appCompatActivity.getLayoutInflater().inflate(R.layout.app_bar_layout, rootView, false);
+            rootView.addView(view, 0);
+
+            Toolbar toolbar = appCompatActivity.findViewById(R.id.toolbar);
+            appCompatActivity.setSupportActionBar(toolbar);
+        }
+
+        ActionBar actionBar = appCompatActivity.getSupportActionBar();
+        if (actionBar != null) {
+            // 在 ActionBar 中显示 UP 按钮。
+            actionBar.setDisplayHomeAsUpEnabled(true);
+        }
+    }
+}

+ 69 - 0
app/src/main/java/cn/minbb/InterfaceTest/entity/User.java

@@ -0,0 +1,69 @@
+package cn.minbb.InterfaceTest.entity;
+
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@NoArgsConstructor
+public class User {
+
+    @Getter
+    @Setter
+    private String userAccount;             // 用户账号
+
+    @Getter
+    @Setter
+    private String userName;                // 用户全拼姓名
+
+    @Getter
+    @Setter
+    private String userSex;                 // 用户性别
+
+    @Getter
+    @Setter
+    private String userPassword;            // 用户密码
+
+    @Getter
+    @Setter
+    private String userPassportno;          // 用户护照号
+
+    @Getter
+    @Setter
+    private String userPassportnotime;      // 护照有效期
+
+    @Getter
+    @Setter
+    private String userPhonenum;            // 用户电话
+
+    @Getter
+    @Setter
+    private String vCode;                   // 短信验证码
+
+    @Getter
+    @Setter
+    private String userDef4;                // 出生年月日
+
+    @Getter
+    @Setter
+    private String userDef5;                // 支付宝账号
+
+    @Getter
+    @Setter
+    private String userDef6;                // 银行卡号
+
+    @Getter
+    @Setter
+    private String userDef8;                // 开户银行
+
+    public User(String userAccount, String userName, String userSex, String userPassword, String userPassportno, String userPassportnotime, String userPhonenum, String vCode, String userDef4) {
+        this.userAccount = userAccount;
+        this.userName = userName;
+        this.userSex = userSex;
+        this.userPassword = userPassword;
+        this.userPassportno = userPassportno;
+        this.userPassportnotime = userPassportnotime;
+        this.userPhonenum = userPhonenum;
+        this.vCode = vCode;
+        this.userDef4 = userDef4;
+    }
+}

+ 132 - 0
app/src/main/java/cn/minbb/InterfaceTest/utils/JsonFormatTool.java

@@ -0,0 +1,132 @@
+package cn.minbb.InterfaceTest.utils;
+
+public class JsonFormatTool {
+
+    /**
+     * 返回格式化 JSON 字符串。
+     *
+     * @param json 未格式化的 JSON 字符串。
+     * @return 格式化的 JSON 字符串。
+     */
+    public String formatJson(String json) {
+        StringBuilder result = new StringBuilder();
+        int length = json.length();
+        int number = 0;
+        char key = 0;
+        // 遍历输入字符串。
+        for (int i = 0; i < length; i++) {
+            // 1、获取当前字符。
+            key = json.charAt(i);
+            // 2、如果当前字符是前方括号、前花括号做如下处理:
+            if ((key == '[') || (key == '{')) {
+                //(1)如果前面还有字符,并且字符为“:”,打印:换行和缩进字符字符串。
+                if ((i - 1 > 0) && (json.charAt(i - 1) == ':')) {
+                    result.append('\n');
+                    result.append(indent(number));
+                }
+                // (2)打印:当前字符。
+                result.append(key);
+                // (3)前方括号、前花括号,的后面必须换行。打印:换行。
+                result.append('\n');
+                // (4)每出现一次前方括号、前花括号;缩进次数增加一次。打印:新行缩进。
+                number++;
+                result.append(indent(number));
+                // (5)进行下一次循环。
+                continue;
+            }
+            // 3、如果当前字符是后方括号、后花括号做如下处理:
+            if ((key == ']') || (key == '}')) {
+                // (1)后方括号、后花括号,的前面必须换行。打印:换行。
+                result.append('\n');
+                // (2)每出现一次后方括号、后花括号;缩进次数减少一次。打印:缩进。
+                number--;
+                result.append(indent(number));
+                // (3)打印:当前字符。
+                result.append(key);
+                // (4)如果当前字符后面还有字符,并且字符不为“,”,打印:换行。
+                if (((i + 1) < length) && (json.charAt(i + 1) != ',')) {
+                    result.append('\n');
+                }
+                //(5)继续下一次循环。
+                continue;
+            }
+            // 4、如果当前字符是逗号。逗号后面换行,并缩进,不改变缩进次数。
+            if ((key == ',')) {
+                result.append(key);
+                result.append('\n');
+                result.append(indent(number));
+                continue;
+            }
+            // 5、打印:当前字符。
+            result.append(key);
+        }
+        return result.toString();
+    }
+
+    /**
+     * 返回指定次数的缩进字符串。每一次缩进三个空格。
+     *
+     * @param number 缩进次数。
+     * @return 指定缩进次数的字符串。
+     */
+    private String indent(int number) {
+        StringBuilder result = new StringBuilder();
+        for (int i = 0; i < number; i++) {
+            result.append("   ");
+        }
+        return result.toString();
+    }
+
+    public static String format(String json, String fix) {
+        StringBuilder out = new StringBuilder();
+        int level = 0;
+        int i, j;
+        boolean start = false, newLine = true;
+        for (i = 0; i < json.length(); ++i) {
+            char ch = json.charAt(i);
+            switch (ch) {
+                case '[':
+                case '{':
+                    newLine = true;
+                    level++;
+                    // 换行
+                    out.append("\n");
+                    // 缩进
+                    for (j = 0; j < level - 1; ++j) {
+                        out.append(fix);
+                    }
+                    break;
+                case ']':
+                case '}':
+                    // 换行
+                    out.append("\n");
+                    // 缩进
+                    for (j = 0; j < level - 1; ++j) {
+                        out.append(fix);
+                    }
+                    level--;
+                    break;
+                case ',':
+                    newLine = true;
+                    break;
+                case ':':
+                    newLine = false;
+                    break;
+                case '\"':
+                case '\'':
+                    start = !start;
+                    if (start && newLine) {
+                        // 换行
+                        out.append("\n");
+                        // 缩进
+                        for (j = 0; j < level; ++j) {
+                            out.append(fix);
+                        }
+                    }
+                    break;
+            }
+            out.append(ch);
+        }
+        return out.toString();
+    }
+}

+ 232 - 0
app/src/main/java/cn/minbb/InterfaceTest/views/LoginActivity.java

@@ -0,0 +1,232 @@
+package cn.minbb.InterfaceTest.views;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.text.TextUtils;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import cn.minbb.InterfaceTest.R;
+import cn.minbb.InterfaceTest.controls.ClearTextInputEditText;
+import cn.minbb.InterfaceTest.ctrl.App;
+
+public class LoginActivity extends AppCompatActivity implements CompoundButton.OnCheckedChangeListener {
+
+    @BindView(R.id.toolbar)
+    Toolbar toolbar;
+    @BindView(R.id.help)
+    FloatingActionButton help;
+    @BindView(R.id.userAccount)
+    ClearTextInputEditText userAccount;
+    @BindView(R.id.userName)
+    ClearTextInputEditText userName;
+    @BindView(R.id.userPassword)
+    ClearTextInputEditText userPassword;
+    @BindView(R.id.rememberPassword)
+    CheckBox rememberPassword;
+    @BindView(R.id.login)
+    Button login;
+    @BindView(R.id.registerAccount)
+    TextView registerAccount;
+    @BindView(R.id.losePassword)
+    TextView losePassword;
+
+    private ProgressDialog dialog;
+
+    private boolean rememberPasswordIsChecked = false;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_login);
+        ButterKnife.bind(this);
+
+        initView();
+        setListener();
+        loadData();
+    }
+
+    @Override
+    protected void onRestart() {
+        super.onRestart();
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        App.getRequestQueue().cancelAll("login");
+        if (dialog != null && dialog.isShowing()) {
+            dialog.dismiss();
+        }
+    }
+
+    public static void start(Context context) {
+        context.startActivity(new Intent(context, LoginActivity.class));
+    }
+
+    private void initView() {
+        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
+        setSupportActionBar(toolbar);
+    }
+
+    private void setListener() {
+        rememberPassword.setOnCheckedChangeListener(this);
+    }
+
+    private void loadData() {
+    }
+
+    private void attemptLogin() {
+        // 重置错误为空
+        userAccount.setError(null);
+        userName.setError(null);
+        userPassword.setError(null);
+
+        // 获取登录表单账号与密码
+        String userAccountText = userAccount.getText().toString();
+        String userNameText = userName.getText().toString();
+        String userPasswordText = userPassword.getText().toString();
+
+        boolean cancel = false;
+        ClearTextInputEditText focusView = null;
+
+        // 检查 用户密码 是否有效
+        if (TextUtils.isEmpty(userPasswordText) || !isUserPasswordValid(userPasswordText)) {
+            userPassword.setError("用户密码不能为空");
+            focusView = userPassword;
+            cancel = true;
+        }
+
+        // 检查 用户全拼姓名 是否有效
+        if (TextUtils.isEmpty(userNameText)) {
+            userName.setError("用户全拼姓名不能为空");
+            focusView = userName;
+            cancel = true;
+        }
+
+        // 检查 用户账号 是否有效
+        if (TextUtils.isEmpty(userAccountText) || !isUsernameValid(userAccountText)) {
+            userAccount.setError("用户账号不能为空");
+            focusView = userAccount;
+            cancel = true;
+        }
+
+        if (cancel) {
+            focusView.requestFocus();
+            focusView.setShakeAnimation();
+        } else {
+            showProgress(true);
+            toLogin(userAccountText, userNameText, userPasswordText);
+        }
+    }
+
+    private boolean isUserPasswordValid(String passwordText) {
+        return passwordText.length() >= 0;
+    }
+
+    private boolean isUsernameValid(String usernameText) {
+        return usernameText.length() >= 1;
+    }
+
+    private void showProgress(boolean show) {
+        if (dialog == null) {
+            dialog = new ProgressDialog(this);
+            dialog.setTitle("用户登录");
+            dialog.setMessage("登录中······");
+            dialog.setCancelable(false);
+        }
+        if (show) {
+            dialog.show();
+        } else {
+            dialog.dismiss();
+        }
+    }
+
+    private void toLogin(String userAccountText, String userNameText, String userPasswordText) {
+        StringRequest loginRequest = new StringRequest(
+                Request.Method.GET,
+                "http://218.28.14.168:8080/TKRCS/mblogin.do?userAccount=" + userAccountText + "&userName=" + userNameText + "&userPassword=" + userPasswordText,
+                s -> {
+                    System.out.println("json = " + s);
+                    ScrollingActivity.start(LoginActivity.this, s);
+                    LoginActivity.this.finish();
+                },
+                volleyError -> {
+                    showProgress(false);
+                    Snackbar.make(toolbar.getRootView(), "登录失败,请稍后重试!", Snackbar.LENGTH_SHORT).show();
+                    Toast.makeText(LoginActivity.this, volleyError.getMessage(), Toast.LENGTH_SHORT).show();
+                }) {
+        };
+        loginRequest.setTag("login");
+        App.getRequestQueue().add(loginRequest);
+    }
+
+    @OnClick({R.id.help, R.id.login, R.id.registerAccount, R.id.losePassword})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.help:
+                AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);
+                builder.setTitle("帮助")
+                        .setMessage("(*)号标识为必填项。")
+                        .setPositiveButton("我知道啦", (dialog, which) -> {
+                        })
+                        .create().show();
+                break;
+            case R.id.login:
+                attemptLogin();
+                break;
+            case R.id.registerAccount:
+                RegisterActivity.start(this);
+                break;
+            case R.id.losePassword:
+                Snackbar.make(toolbar.getRootView(), "密码丢失,请联系系统管理员", Snackbar.LENGTH_SHORT).show();
+                break;
+            default:
+        }
+    }
+
+    @Override
+    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+        switch (buttonView.getId()) {
+            case R.id.rememberPassword:
+                rememberPasswordIsChecked = isChecked;
+                break;
+            default:
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case android.R.id.home:
+                finish();
+                break;
+            default:
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}

+ 132 - 0
app/src/main/java/cn/minbb/InterfaceTest/views/MainActivity.java

@@ -0,0 +1,132 @@
+package cn.minbb.InterfaceTest.views;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.constraint.ConstraintLayout;
+import android.support.design.widget.Snackbar;
+import android.support.design.widget.TextInputEditText;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.RadioButton;
+
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.StringRequest;
+
+import java.io.IOException;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import cn.minbb.InterfaceTest.R;
+import cn.minbb.InterfaceTest.ctrl.App;
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+
+public class MainActivity extends AppCompatActivity {
+
+    @BindView(R.id.main)
+    ConstraintLayout main;
+    @BindView(R.id.volley)
+    RadioButton volley;
+    @BindView(R.id.okhttp)
+    RadioButton okhttp;
+    @BindView(R.id.userAccount)
+    TextInputEditText userAccount;
+    @BindView(R.id.flag1)
+    TextInputEditText flag1;
+    @BindView(R.id.yuliu1)
+    TextInputEditText yuliu1;
+    @BindView(R.id.yuliu2)
+    TextInputEditText yuliu2;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+        ButterKnife.bind(this);
+
+        App.setupActionBar(this);
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        App.getRequestQueue().cancelAll("request");
+    }
+
+    public static void start(Context context) {
+        Intent starter = new Intent(context, MainActivity.class);
+        context.startActivity(starter);
+    }
+
+    public void onViewClick(View view) {
+        String url = "http://218.28.14.168:8080/TKRCS/Receiptimglist/aduploading.do?userAccount=" + userAccount.getText().toString() + "&flag1=" + flag1.getText().toString() + "&yuliu1=" + yuliu1.getText().toString() + "&yuliu2=" + yuliu2.getText().toString();
+        if (volley.isChecked()) {
+            StringRequest request = new StringRequest(
+                    url,
+                    new Response.Listener<String>() {
+                        @Override
+                        public void onResponse(String s) {
+                            runOnUiThread(new Runnable() {
+                                @Override
+                                public void run() {
+                                    ScrollingActivity.start(MainActivity.this, s);
+                                }
+                            });
+                        }
+                    },
+                    new Response.ErrorListener() {
+                        @Override
+                        public void onErrorResponse(VolleyError volleyError) {
+                            runOnUiThread(new Runnable() {
+                                @Override
+                                public void run() {
+                                    Snackbar.make(main, "请求失败,请重试!", Snackbar.LENGTH_SHORT).show();
+                                }
+                            });
+                        }
+                    });
+            request.setTag("request");
+            App.getRequestQueue().add(request);
+        } else if (okhttp.isChecked()) {
+            Request request = new Request.Builder().url(url).build();
+            new OkHttpClient().newCall(request).enqueue(new Callback() {
+                @Override
+                public void onFailure(Call call, IOException e) {
+                    runOnUiThread(new Runnable() {
+                        @Override
+                        public void run() {
+                            Snackbar.make(main, "请求失败,请重试!", Snackbar.LENGTH_SHORT).show();
+                        }
+                    });
+                }
+
+                @Override
+                public void onResponse(Call call, okhttp3.Response response) throws IOException {
+                    ScrollingActivity.start(MainActivity.this, response.body().string());
+                }
+            });
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case android.R.id.home:
+                MainActivity.this.finish();
+                break;
+            default:
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}

+ 310 - 0
app/src/main/java/cn/minbb/InterfaceTest/views/RegisterActivity.java

@@ -0,0 +1,310 @@
+package cn.minbb.InterfaceTest.views;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.text.TextUtils;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.CycleInterpolator;
+import android.view.animation.TranslateAnimation;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+
+import com.android.volley.Request;
+import com.android.volley.toolbox.JsonObjectRequest;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import cn.minbb.InterfaceTest.R;
+import cn.minbb.InterfaceTest.controls.ClearTextInputEditText;
+import cn.minbb.InterfaceTest.ctrl.App;
+
+public class RegisterActivity extends AppCompatActivity implements CompoundButton.OnCheckedChangeListener {
+
+    @BindView(R.id.toolbar)
+    Toolbar toolbar;
+    @BindView(R.id.userAccount)
+    ClearTextInputEditText userAccount;
+    @BindView(R.id.userName)
+    ClearTextInputEditText userName;
+    @BindView(R.id.userSex)
+    ClearTextInputEditText userSex;
+    @BindView(R.id.userPassword)
+    ClearTextInputEditText userPassword;
+    @BindView(R.id.userPasswordRepeat)
+    ClearTextInputEditText userPasswordRepeat;
+    @BindView(R.id.userPassportno)
+    ClearTextInputEditText userPassportno;
+    @BindView(R.id.userPassportnotime)
+    ClearTextInputEditText userPassportnotime;
+    @BindView(R.id.userPhonenum)
+    ClearTextInputEditText userPhonenum;
+    @BindView(R.id.vCode)
+    ClearTextInputEditText vCode;
+    @BindView(R.id.userDef4)
+    ClearTextInputEditText userDef4;
+    @BindView(R.id.userDef5)
+    ClearTextInputEditText userDef5;
+    @BindView(R.id.userDef6)
+    ClearTextInputEditText userDef6;
+    @BindView(R.id.userDef8)
+    ClearTextInputEditText userDef8;
+    @BindView(R.id.alreadyRead)
+    CheckBox alreadyRead;
+
+    private boolean alreadyReadIsChecked = false;
+    private ProgressDialog dialog;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_register);
+        ButterKnife.bind(this);
+
+        initView();
+        setListener();
+        loadData();
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        App.getRequestQueue().cancelAll("register");
+        if (dialog != null && dialog.isShowing()) {
+            dialog.dismiss();
+        }
+    }
+
+    public static void start(Context context) {
+        context.startActivity(new Intent(context, RegisterActivity.class));
+    }
+
+    private void initView() {
+        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
+        setSupportActionBar(toolbar);
+    }
+
+    private void setListener() {
+        alreadyRead.setOnCheckedChangeListener(this);
+    }
+
+    private void loadData() {
+    }
+
+    private void attemptRegister() {
+        // 重置错误为空
+        userAccount.setError(null);
+        userName.setError(null);
+        userSex.setError(null);
+        userPassword.setError(null);
+        userPasswordRepeat.setError(null);
+        userPassportno.setError(null);
+        userPassportnotime.setError(null);
+        userPhonenum.setError(null);
+        vCode.setError(null);
+        userDef4.setError(null);
+        userDef5.setError(null);
+        userDef6.setError(null);
+        userDef8.setError(null);
+
+        // 获取登录表单账号与密码
+        String userAccountText = userAccount.getText().toString();
+        String userNameText = userName.getText().toString();
+        String userSexText = userSex.getText().toString();
+        String userPasswordText = userPassword.getText().toString();
+        String userPasswordRepeatText = userPasswordRepeat.getText().toString();
+        String userPassportnoText = userPassportno.getText().toString();
+        String userPassportnotimeText = userPassportnotime.getText().toString();
+        String userPhonenumText = userPhonenum.getText().toString();
+        String vCodeText = vCode.getText().toString();
+        String userDef4Text = userDef4.getText().toString();
+        String userDef5Text = userDef5.getText().toString();
+        String userDef6Text = userDef6.getText().toString();
+        String userDef8Text = userDef8.getText().toString();
+
+        boolean cancel = false;
+        View focusView = null;
+
+        // 已阅用户须知
+        if (!alreadyReadIsChecked) {
+            focusView = alreadyRead;
+            cancel = true;
+            Snackbar.make(toolbar.getRootView(), "请先阅读用户须知", Snackbar.LENGTH_SHORT).show();
+        }
+
+        // 检查 出生年月日 是否有效
+        if (TextUtils.isEmpty(userDef4Text)) {
+            userDef4.setError("出生年月日不能为空");
+            focusView = userDef4;
+            cancel = true;
+        }
+
+        // 检查 短信验证码 是否有效
+        if (TextUtils.isEmpty(vCodeText)) {
+            vCode.setError("短信验证码不能为空");
+            focusView = vCode;
+            cancel = true;
+        }
+
+        // 检查 用户电话 是否有效
+        if (TextUtils.isEmpty(userPhonenumText)) {
+            userPhonenum.setError("用户电话不能为空");
+            focusView = userPhonenum;
+            cancel = true;
+        }
+
+        // 检查 护照有效期 是否有效
+        if (TextUtils.isEmpty(userPassportnotimeText)) {
+            userPassportnotime.setError("护照有效期不能为空");
+            focusView = userPassportnotime;
+            cancel = true;
+        }
+
+        // 检查 用户护照号 是否有效
+        if (TextUtils.isEmpty(userPassportnoText)) {
+            userPassportno.setError("用户护照号不能为空");
+            focusView = userPassportno;
+            cancel = true;
+        }
+
+        // 检查 用户密码 是否有效
+        if (TextUtils.isEmpty(userPasswordText) || !isUserPasswordValid(userPasswordText)) {
+            userPassword.setError("用户密码不能为空");
+            focusView = userPassword;
+            cancel = true;
+        } else if (!userPasswordText.equals(userPasswordRepeatText)) {
+            userPasswordRepeat.setError("两次输入的密码不一致");
+            focusView = userPasswordRepeat;
+            cancel = true;
+        }
+
+        // 检查 用户性别 是否有效
+        if (TextUtils.isEmpty(userSexText)) {
+            userSex.setError("用户性别不能为空");
+            focusView = userSex;
+            cancel = true;
+        }
+
+        // 检查 用户全拼姓名 是否有效
+        if (TextUtils.isEmpty(userNameText)) {
+            userName.setError("用户全拼姓名不能为空");
+            focusView = userName;
+            cancel = true;
+        }
+
+        // 检查 用户账号 是否有效
+        if (TextUtils.isEmpty(userAccountText) || !isUsernameValid(userAccountText)) {
+            userAccount.setError("用户账号不能为空(不符合规则)");
+            focusView = userAccount;
+            cancel = true;
+        }
+
+        if (cancel) {
+            assert focusView != null;
+            focusView.requestFocus();
+            Animation translateAnimation = new TranslateAnimation(0, 10, 0, 0);
+            translateAnimation.setInterpolator(new CycleInterpolator(5));
+            translateAnimation.setDuration(1000);
+            focusView.setAnimation(translateAnimation);
+        } else {
+            showProgress(true);
+            toRegister(userAccountText, userNameText, userSexText, userPasswordText, userPassportnoText, userPassportnotimeText, userPhonenumText, vCodeText, userDef4Text, userDef5Text, userDef6Text, userDef8Text);
+        }
+    }
+
+    private boolean isUserPasswordValid(String passwordText) {
+        int length = passwordText.length();
+        return length >= 0;
+    }
+
+    private boolean isUsernameValid(String usernameText) {
+        return usernameText.length() >= 1;
+    }
+
+    private void showProgress(boolean show) {
+        if (dialog == null) {
+            dialog = new ProgressDialog(this);
+            dialog.setTitle("用户注册");
+            dialog.setMessage("注册中······");
+            dialog.setCancelable(false);
+        }
+        if (show) {
+            dialog.show();
+        } else {
+            dialog.dismiss();
+        }
+    }
+
+    private void toRegister(String userAccountText, String userNameText, String userSexText, String userPasswordText, String userPassportnoText, String userPassportnotimeText, String userPhonenumText, String vCodeText, String userDef4Text, String userDef5Text, String userDef6Text, String userDef8Text) {
+        JsonObjectRequest registerRequest = new JsonObjectRequest(
+                Request.Method.GET,
+                "http://218.28.14.168:8080/TKRCS/register.do?userAccount=" + userAccountText + "&userName=" + userNameText + "&userSex=" + userSexText + "&userPassword=" + userPasswordText + "&userPassportno=" + userPassportnoText + "&userPassportnotime=" + userPassportnotimeText + "&userPhonenum=" + userPhonenumText + "&vCode=" + vCodeText + "&userDef4=" + userDef4Text + "&userDef5=" + userDef5Text + "&userDef6=" + userDef6Text + "&userDef8=" + userDef8Text,
+                null,
+                jsonObject -> {
+                    showProgress(false);
+                    com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(jsonObject.toString());
+                    System.out.println("json = " + json.toJSONString());
+                    ScrollingActivity.start(RegisterActivity.this, json.toJSONString());
+                    RegisterActivity.this.finish();
+                },
+                volleyError -> {
+                    showProgress(false);
+                    Snackbar.make(toolbar.getRootView(), "注册失败,请稍后重试!", Snackbar.LENGTH_SHORT).show();
+                });
+        registerRequest.setTag("register");
+        App.getRequestQueue().add(registerRequest);
+    }
+
+    @OnClick({R.id.userInstructions, R.id.register})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.userInstructions:
+                AlertDialog.Builder builder = new AlertDialog.Builder(this);
+                builder.setTitle("用户须知")
+                        .setMessage("(*)号标识为必填项。")
+                        .setPositiveButton("同意", (dialog, which) -> {
+                            alreadyRead.setChecked(true);
+                        })
+                        .setNegativeButton("不同意", (dialog, which) -> {
+                            alreadyRead.setChecked(false);
+                        })
+                        .setCancelable(false).create().show();
+                break;
+            case R.id.register:
+                attemptRegister();
+                break;
+        }
+    }
+
+    @Override
+    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+        if (buttonView.getId() == R.id.alreadyRead) {
+            alreadyReadIsChecked = isChecked;
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case android.R.id.home:
+                finish();
+                break;
+            default:
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}

+ 76 - 0
app/src/main/java/cn/minbb/InterfaceTest/views/ScrollingActivity.java

@@ -0,0 +1,76 @@
+package cn.minbb.InterfaceTest.views;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.TextView;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import cn.minbb.InterfaceTest.R;
+import cn.minbb.InterfaceTest.utils.JsonFormatTool;
+
+public class ScrollingActivity extends AppCompatActivity {
+
+    @BindView(R.id.toolbar)
+    Toolbar toolbar;
+    @BindView(R.id.data)
+    TextView data;
+    private String json = "";
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_scrolling);
+        ButterKnife.bind(this);
+        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+        setSupportActionBar(toolbar);
+
+        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
+        fab.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                ScrollingActivity.this.finish();
+            }
+        });
+
+        initView();
+    }
+
+    public static void start(Context context, String json) {
+        Intent starter = new Intent(context, ScrollingActivity.class);
+        starter.putExtra("json", json);
+        context.startActivity(starter);
+    }
+
+    private void initView() {
+        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
+        setSupportActionBar(toolbar);
+
+        Intent intent = getIntent();
+        json = intent.getStringExtra("json");
+        data.setText(JsonFormatTool.format(json, "   "));
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case android.R.id.home:
+                finish();
+                break;
+            default:
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}

+ 5 - 0
app/src/main/res/color/text_black_to_light_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/light_gray" android:state_pressed="true" />
+    <item android:color="@android:color/darker_gray" android:state_pressed="false" />
+</selector>

+ 15 - 0
app/src/main/res/color/text_gray_background_selector.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="#20000000" android:state_pressed="true">
+        <shape android:shape="rectangle">
+            <solid android:color="#20000000" />
+            <corners android:radius="8dp" />
+        </shape>
+    </item>
+    <item android:color="#00000000" android:state_pressed="false">
+        <shape android:shape="rectangle">
+            <!-- 透明色 -->
+            <solid android:color="#00000000" />
+        </shape>
+    </item>
+</selector>

BIN
app/src/main/res/drawable-hdpi/ic_action_help_light.png


BIN
app/src/main/res/drawable-hdpi/ic_action_lock_dark.png


BIN
app/src/main/res/drawable-hdpi/ic_action_person_dark.png


+ 9 - 0
app/src/main/res/drawable-hdpi/ic_bookmark_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="36dp"
+        android:height="36dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#ffffb84d"
+        android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable-hdpi/ic_chevron_right_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
+</vector>

BIN
app/src/main/res/drawable-mdpi/ic_action_help_light.png


BIN
app/src/main/res/drawable-mdpi/ic_action_lock_dark.png


BIN
app/src/main/res/drawable-mdpi/ic_action_person_dark.png


+ 34 - 0
app/src/main/res/drawable-v24/ic_launcher_foreground.xml

@@ -0,0 +1,34 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:aapt="http://schemas.android.com/aapt"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportHeight="108"
+    android:viewportWidth="108">
+    <path
+        android:fillType="evenOdd"
+        android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
+        android:strokeColor="#00000000"
+        android:strokeWidth="1">
+        <aapt:attr name="android:fillColor">
+            <gradient
+                android:endX="78.5885"
+                android:endY="90.9159"
+                android:startX="48.7653"
+                android:startY="61.0927"
+                android:type="linear">
+                <item
+                    android:color="#44000000"
+                    android:offset="0.0" />
+                <item
+                    android:color="#00000000"
+                    android:offset="1.0" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#FFFFFF"
+        android:fillType="nonZero"
+        android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
+        android:strokeColor="#00000000"
+        android:strokeWidth="1" />
+</vector>

BIN
app/src/main/res/drawable-xhdpi/ic_action_help_light.png


BIN
app/src/main/res/drawable-xhdpi/ic_action_lock_dark.png


BIN
app/src/main/res/drawable-xhdpi/ic_action_person_dark.png


BIN
app/src/main/res/drawable-xxhdpi/ic_action_help_light.png


BIN
app/src/main/res/drawable-xxhdpi/ic_action_lock_dark.png


BIN
app/src/main/res/drawable-xxhdpi/ic_action_person_dark.png


BIN
app/src/main/res/drawable/doc.jpg


+ 4 - 0
app/src/main/res/drawable/ic_arrow_back_white_24dp.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp">
+    <path android:fillColor="#FFFFFF" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
+</vector>

+ 4 - 0
app/src/main/res/drawable/ic_close_black_24dp.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp">
+    <path android:fillColor="#000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_credit_card_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_date_range_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M9,11L7,11v2h2v-2zM13,11h-2v2h2v-2zM17,11h-2v2h2v-2zM19,4h-1L18,2h-2v2L8,4L8,2L6,2v2L5,4c-1.11,0 -1.99,0.9 -1.99,2L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.9,-2 -2,-2zM19,20L5,20L5,9h14v11z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_domain_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,7L12,3L2,3v18h20L22,7L12,7zM6,19L4,19v-2h2v2zM6,15L4,15v-2h2v2zM6,11L4,11L4,9h2v2zM6,7L4,7L4,5h2v2zM10,19L8,19v-2h2v2zM10,15L8,15v-2h2v2zM10,11L8,11L8,9h2v2zM10,7L8,7L8,5h2v2zM20,19h-8v-2h2v-2h-2v-2h2v-2h-2L12,9h8v10zM18,11h-2v2h2v-2zM18,15h-2v2h2v-2z"/>
+</vector>

+ 170 - 0
app/src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportHeight="108"
+    android:viewportWidth="108">
+    <path
+        android:fillColor="#26A69A"
+        android:pathData="M0,0h108v108h-108z" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M9,0L9,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,0L19,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,0L29,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,0L39,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,0L49,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,0L59,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,0L69,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,0L79,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M89,0L89,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M99,0L99,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,9L108,9"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,19L108,19"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,29L108,29"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,39L108,39"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,49L108,49"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,59L108,59"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,69L108,69"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,79L108,79"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,89L108,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,99L108,99"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,29L89,29"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,39L89,39"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,49L89,49"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,59L89,59"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,69L89,69"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,79L89,79"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,19L29,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,19L39,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,19L49,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,19L59,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,19L69,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,19L79,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_lock_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_person_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_phone_android_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M16,1L8,1C6.34,1 5,2.34 5,4v16c0,1.66 1.34,3 3,3h8c1.66,0 3,-1.34 3,-3L19,4c0,-1.66 -1.34,-3 -3,-3zM14,21h-4v-1h4v1zM17.25,18L6.75,18L6.75,4h10.5v14z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_phone_black_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z"/>
+</vector>

+ 65 - 0
app/src/main/res/layout/activity_entrance.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView 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"
+    tools:context=".EntranceActivity">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <Button
+            android:id="@+id/dataInterface"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="数据接口测试" />
+
+        <Button
+            android:id="@+id/registerInterface"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="注册接口测试" />
+
+        <Button
+            android:id="@+id/loginInterface"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="登录接口测试" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:padding="16dp">
+
+            <com.joanzapata.iconify.widget.IconTextView
+                android:id="@+id/serverStatusTip"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/losePassword"
+                android:layout_marginTop="16dp"
+                android:text="{fa-server} 服务器状态:" />
+
+            <TextView
+                android:id="@+id/serverStatus"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignBaseline="@id/serverStatusTip"
+                android:layout_toRightOf="@id/serverStatusTip"
+                android:text="离线"
+                android:textColor="@android:color/holo_red_dark" />
+
+            <com.joanzapata.iconify.widget.IconTextView
+                android:id="@+id/serverStatusRefresh"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignBaseline="@id/serverStatusTip"
+                android:layout_marginLeft="16dp"
+                android:layout_toRightOf="@id/serverStatus"
+                android:foreground="?android:attr/selectableItemBackground"
+                android:padding="8dp"
+                android:text="{fa-refresh}" />
+        </RelativeLayout>
+    </LinearLayout>
+</ScrollView>

+ 164 - 0
app/src/main/res/layout/activity_login.xml

@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fitsSystemWindows="true">
+
+    <android.support.design.widget.AppBarLayout
+        android:id="@+id/appBarLayout"
+        android:layout_width="match_parent"
+        android:layout_height="240dp"
+        android:fitsSystemWindows="true"
+        android:theme="@style/AppTheme.AppBarOverlay">
+
+        <android.support.design.widget.CollapsingToolbarLayout
+            android:id="@+id/toolbarLayout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:fitsSystemWindows="true"
+            app:contentScrim="?attr/colorPrimary"
+            app:layout_scrollFlags="scroll|exitUntilCollapsed">
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_margin="48dp"
+                android:fitsSystemWindows="true"
+                android:scaleType="fitCenter"
+                android:src="@mipmap/ic_launcher_round"
+                app:layout_collapseMode="parallax" />
+
+            <android.support.v7.widget.Toolbar
+                android:id="@+id/toolbar"
+                android:layout_width="match_parent"
+                android:layout_height="?attr/actionBarSize"
+                app:layout_collapseMode="pin"
+                app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+        </android.support.design.widget.CollapsingToolbarLayout>
+
+    </android.support.design.widget.AppBarLayout>
+
+    <android.support.design.widget.FloatingActionButton
+        android:id="@+id/help"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_margin="16dp"
+        app:layout_anchor="@id/appBarLayout"
+        app:layout_anchorGravity="bottom|end"
+        app:srcCompat="@drawable/ic_action_help_light" />
+
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:padding="16dp"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:padding="16dp">
+
+            <android.support.design.widget.TextInputLayout
+                android:id="@+id/userAccountLayout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                    android:id="@+id/userAccount"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:drawableStart="@drawable/ic_person_black_24dp"
+                    android:drawableLeft="@drawable/ic_person_black_24dp"
+                    android:hint="用户账号(*)"
+                    android:inputType="text"
+                    android:maxLines="1" />
+
+            </android.support.design.widget.TextInputLayout>
+
+            <android.support.design.widget.TextInputLayout
+                android:id="@+id/userNameLayout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/userAccountLayout">
+
+                <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                    android:id="@+id/userName"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:drawableStart="@drawable/ic_person_black_24dp"
+                    android:drawableLeft="@drawable/ic_person_black_24dp"
+                    android:hint="用户全拼姓名(*)"
+                    android:inputType="text"
+                    android:maxLines="1" />
+
+            </android.support.design.widget.TextInputLayout>
+
+            <android.support.design.widget.TextInputLayout
+                android:id="@+id/userPasswordLayout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/userNameLayout">
+
+                <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                    android:id="@+id/userPassword"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:drawableStart="@drawable/ic_lock_black_24dp"
+                    android:drawableLeft="@drawable/ic_lock_black_24dp"
+                    android:hint="用户密码(*)"
+                    android:inputType="textPassword"
+                    android:maxLines="1" />
+
+            </android.support.design.widget.TextInputLayout>
+
+            <CheckBox
+                android:id="@+id/rememberPassword"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/userPasswordLayout"
+                android:checked="false"
+                android:text="记住密码" />
+
+            <Button
+                android:id="@+id/login"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/rememberPassword"
+                android:layout_marginBottom="16dp"
+                android:text="登录" />
+
+            <TextView
+                android:id="@+id/split"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/login"
+                android:layout_centerHorizontal="true"
+                android:text="    |    " />
+
+            <TextView
+                android:id="@+id/registerAccount"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/login"
+                android:layout_toLeftOf="@id/split"
+                android:background="@color/text_gray_background_selector"
+                android:text=" 注册账号 "
+                android:textColor="@color/text_black_to_light_selector" />
+
+            <TextView
+                android:id="@+id/losePassword"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/login"
+                android:layout_toRightOf="@id/split"
+                android:background="@color/text_gray_background_selector"
+                android:text=" 忘记密码 "
+                android:textColor="@color/text_black_to_light_selector" />
+
+        </RelativeLayout>
+
+    </android.support.v4.widget.NestedScrollView>
+
+</android.support.design.widget.CoordinatorLayout>

+ 124 - 0
app/src/main/res/layout/activity_main.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/main"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".views.MainActivity">
+
+    <ImageView
+        android:id="@+id/imageView"
+        android:layout_width="0dp"
+        android:layout_height="170dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginLeft="8dp"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:srcCompat="@drawable/doc" />
+
+    <RadioGroup
+        android:id="@+id/radioGroup"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="8dp"
+        android:layout_marginLeft="8dp"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        android:orientation="horizontal"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/imageView">
+
+        <RadioButton
+            android:id="@+id/volley"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:checked="true"
+            android:text="Volley实现" />
+
+        <RadioButton
+            android:id="@+id/okhttp"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="OKHttp实现" />
+    </RadioGroup>
+
+    <ScrollView
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginLeft="8dp"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/radioGroup">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <android.support.design.widget.TextInputLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <android.support.design.widget.TextInputEditText
+                    android:id="@+id/userAccount"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="userAccount(String)(用户账号)" />
+            </android.support.design.widget.TextInputLayout>
+
+            <android.support.design.widget.TextInputLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <android.support.design.widget.TextInputEditText
+                    android:id="@+id/flag1"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="flag1(String)(该用户本次上传所有图片的唯一标识,一次最多上传9张图片)" />
+            </android.support.design.widget.TextInputLayout>
+
+            <android.support.design.widget.TextInputLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <android.support.design.widget.TextInputEditText
+                    android:id="@+id/yuliu1"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="yuliu1(String)(小票所在免税店)" />
+            </android.support.design.widget.TextInputLayout>
+
+            <android.support.design.widget.TextInputLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <android.support.design.widget.TextInputEditText
+                    android:id="@+id/yuliu2"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="yuliu2(Data)(小票上的日期)" />
+            </android.support.design.widget.TextInputLayout>
+
+            <Button
+                android:id="@+id/submit"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:onClick="onViewClick"
+                android:text="提交数据" />
+        </LinearLayout>
+    </ScrollView>
+</android.support.constraint.ConstraintLayout>

+ 312 - 0
app/src/main/res/layout/activity_register.xml

@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fitsSystemWindows="true">
+
+    <android.support.design.widget.AppBarLayout
+        android:id="@+id/appBarLayout"
+        android:layout_width="match_parent"
+        android:layout_height="240dp"
+        android:fitsSystemWindows="true"
+        android:theme="@style/AppTheme.AppBarOverlay">
+
+        <android.support.design.widget.CollapsingToolbarLayout
+            android:id="@+id/toolbarLayout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:fitsSystemWindows="true"
+            app:contentScrim="?attr/colorPrimary"
+            app:layout_scrollFlags="scroll|exitUntilCollapsed">
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_margin="48dp"
+                android:fitsSystemWindows="true"
+                android:scaleType="fitCenter"
+                android:src="@mipmap/ic_launcher_round"
+                app:layout_collapseMode="parallax" />
+
+            <android.support.v7.widget.Toolbar
+                android:id="@+id/toolbar"
+                android:layout_width="match_parent"
+                android:layout_height="?attr/actionBarSize"
+                app:layout_collapseMode="pin" />
+
+        </android.support.design.widget.CollapsingToolbarLayout>
+
+    </android.support.design.widget.AppBarLayout>
+
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <android.support.v7.widget.CardView
+                android:id="@+id/cardView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_margin="24dp"
+                app:cardBackgroundColor="@color/white"
+                app:cardCornerRadius="5dp"
+                app:cardPreventCornerOverlap="true"
+                app:cardUseCompatPadding="true">
+
+                <RelativeLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:padding="24dp">
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userAccountLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userAccount"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_person_black_24dp"
+                            android:hint="用户账号(*)"
+                            android:inputType="text" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userNameLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userAccountLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userName"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_person_black_24dp"
+                            android:hint="用户全拼姓名(*)"
+                            android:inputType="text" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userSexLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userNameLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userSex"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_person_black_24dp"
+                            android:hint="用户性别(*)"
+                            android:inputType="text" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userPasswordLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userSexLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userPassword"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_lock_black_24dp"
+                            android:hint="用户密码(*)"
+                            android:inputType="textPassword" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userPasswordRepeatLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userPasswordLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userPasswordRepeat"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_lock_black_24dp"
+                            android:hint="重复用户密码(*)"
+                            android:inputType="textPassword" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userPassportnoLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userPasswordRepeatLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userPassportno"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_credit_card_black_24dp"
+                            android:hint="用户护照号(*)"
+                            android:inputType="number" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userPassportnotimeLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userPassportnoLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userPassportnotime"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_credit_card_black_24dp"
+                            android:hint="护照有效期(*)"
+                            android:inputType="text" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userPhonenumLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userPassportnotimeLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userPhonenum"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_phone_black_24dp"
+                            android:hint="用户电话(*)"
+                            android:inputType="phone" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/vCodeLayout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userPhonenumLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/vCode"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_phone_android_black_24dp"
+                            android:hint="短信验证码(*)"
+                            android:inputType="text" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userDef4Layout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/vCodeLayout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userDef4"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_date_range_black_24dp"
+                            android:hint="出生年月日(*)"
+                            android:inputType="date" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userDef5Layout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userDef4Layout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userDef5"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_person_black_24dp"
+                            android:hint="支付宝账号"
+                            android:inputType="text" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userDef6Layout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userDef5Layout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userDef6"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_credit_card_black_24dp"
+                            android:hint="银行卡号"
+                            android:inputType="number" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <android.support.design.widget.TextInputLayout
+                        android:id="@+id/userDef8Layout"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userDef6Layout">
+
+                        <cn.minbb.InterfaceTest.controls.ClearTextInputEditText
+                            android:id="@+id/userDef8"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:drawableLeft="@drawable/ic_domain_black_24dp"
+                            android:hint="开户银行"
+                            android:inputType="text" />
+
+                    </android.support.design.widget.TextInputLayout>
+
+                    <CheckBox
+                        android:id="@+id/alreadyRead"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_below="@id/userDef8Layout"
+                        android:layout_marginTop="20dp"
+                        android:checked="false"
+                        android:text="我已阅读" />
+
+                    <TextView
+                        android:id="@+id/userInstructions"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_alignBaseline="@+id/alreadyRead"
+                        android:layout_toRightOf="@id/alreadyRead"
+                        android:background="@color/text_gray_background_selector"
+                        android:text="《用户须知》"
+                        android:textColor="@android:color/holo_blue_dark" />
+
+                </RelativeLayout>
+
+            </android.support.v7.widget.CardView>
+
+            <android.support.design.widget.FloatingActionButton
+                android:id="@+id/register"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignBaseline="@id/cardView"
+                android:layout_alignBottom="@id/cardView"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="6dp"
+                android:layout_marginBottom="60dp"
+                android:rotation="180"
+                app:srcCompat="@drawable/ic_arrow_back_white_24dp" />
+
+        </RelativeLayout>
+
+    </android.support.v4.widget.NestedScrollView>
+
+</android.support.design.widget.CoordinatorLayout>

+ 47 - 0
app/src/main/res/layout/activity_scrolling.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
+    tools:context=".views.ScrollingActivity">
+
+    <android.support.design.widget.AppBarLayout
+        android:id="@+id/app_bar"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/app_bar_height"
+        android:fitsSystemWindows="true"
+        android:theme="@style/AppTheme.AppBarOverlay">
+
+        <android.support.design.widget.CollapsingToolbarLayout
+            android:id="@+id/toolbar_layout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:fitsSystemWindows="true"
+            app:contentScrim="?attr/colorPrimary"
+            app:layout_scrollFlags="scroll|exitUntilCollapsed"
+            app:toolbarId="@+id/toolbar">
+
+            <android.support.v7.widget.Toolbar
+                android:id="@+id/toolbar"
+                android:layout_width="match_parent"
+                android:layout_height="?attr/actionBarSize"
+                app:layout_collapseMode="pin"
+                app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+        </android.support.design.widget.CollapsingToolbarLayout>
+    </android.support.design.widget.AppBarLayout>
+
+    <include layout="@layout/content_scrolling" />
+
+    <android.support.design.widget.FloatingActionButton
+        android:id="@+id/fab"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_margin="@dimen/fab_margin"
+        app:layout_anchor="@id/app_bar"
+        app:layout_anchorGravity="bottom|end"
+        app:srcCompat="@android:drawable/ic_delete" />
+
+</android.support.design.widget.CoordinatorLayout>

+ 15 - 0
app/src/main/res/layout/app_bar_layout.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:theme="@style/AppTheme.AppBarOverlay">
+
+    <android.support.v7.widget.Toolbar
+        android:id="@+id/toolbar"
+        android:layout_width="match_parent"
+        android:layout_height="?attr/actionBarSize"
+        android:background="?attr/colorPrimary"
+        app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+</android.support.design.widget.AppBarLayout>

+ 18 - 0
app/src/main/res/layout/content_scrolling.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    app:layout_behavior="@string/appbar_scrolling_view_behavior"
+    tools:context=".views.ScrollingActivity"
+    tools:showIn="@layout/activity_scrolling">
+
+    <TextView
+        android:id="@+id/data"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_margin="@dimen/text_margin"
+        android:text="text" />
+
+</android.support.v4.widget.NestedScrollView>

+ 10 - 0
app/src/main/res/menu/menu_scrolling.xml

@@ -0,0 +1,10 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context="cn.minbb.InterfaceTest.views.ScrollingActivity">
+    <item
+        android:id="@+id/action_settings"
+        android:orderInCategory="100"
+        android:title="@string/action_settings"
+        app:showAsAction="never" />
+</menu>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 9 - 0
app/src/main/res/values/colors.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#3F51B5</color>
+    <color name="colorPrimaryDark">#303F9F</color>
+    <color name="colorAccent">#FF4081</color>
+
+    <color name="white">#FFFFFF</color>
+    <color name="light_gray">#F0F0F0</color>
+</resources>

+ 5 - 0
app/src/main/res/values/dimens.xml

@@ -0,0 +1,5 @@
+<resources>
+    <dimen name="app_bar_height">180dp</dimen>
+    <dimen name="fab_margin">16dp</dimen>
+    <dimen name="text_margin">16dp</dimen>
+</resources>

+ 93 - 0
app/src/main/res/values/strings.xml

@@ -0,0 +1,93 @@
+<resources>
+    <string name="app_name">InterfaceTest</string>
+    <string name="large_text">
+        "Material is the metaphor.\n\n"
+
+        "A material metaphor is the unifying theory of a rationalized space and a system of motion."
+        "The material is grounded in tactile reality, inspired by the study of paper and ink, yet "
+        "technologically advanced and open to imagination and magic.\n"
+        "Surfaces and edges of the material provide visual cues that are grounded in reality. The "
+        "use of familiar tactile attributes helps users quickly understand affordances. Yet the "
+        "flexibility of the material creates new affordances that supercede those in the physical "
+        "world, without breaking the rules of physics.\n"
+        "The fundamentals of light, surface, and movement are key to conveying how objects move, "
+        "interact, and exist in space and in relation to each other. Realistic lighting shows "
+        "seams, divides space, and indicates moving parts.\n\n"
+
+        "Bold, graphic, intentional.\n\n"
+
+        "The foundational elements of print based design typography, grids, space, scale, color, "
+        "and use of imagery guide visual treatments. These elements do far more than please the "
+        "eye. They create hierarchy, meaning, and focus. Deliberate color choices, edge to edge "
+        "imagery, large scale typography, and intentional white space create a bold and graphic "
+        "interface that immerse the user in the experience.\n"
+        "An emphasis on user actions makes core functionality immediately apparent and provides "
+        "waypoints for the user.\n\n"
+
+        "Motion provides meaning.\n\n"
+
+        "Motion respects and reinforces the user as the prime mover. Primary user actions are "
+        "inflection points that initiate motion, transforming the whole design.\n"
+        "All action takes place in a single environment. Objects are presented to the user without "
+        "breaking the continuity of experience even as they transform and reorganize.\n"
+        "Motion is meaningful and appropriate, serving to focus attention and maintain continuity. "
+        "Feedback is subtle yet clear. Transitions are efficient yet coherent.\n\n"
+
+        "3D world.\n\n"
+
+        "The material environment is a 3D space, which means all objects have x, y, and z "
+        "dimensions. The z-axis is perpendicularly aligned to the plane of the display, with the "
+        "positive z-axis extending towards the viewer. Every sheet of material occupies a single "
+        "position along the z-axis and has a standard 1dp thickness.\n"
+        "On the web, the z-axis is used for layering and not for perspective. The 3D world is "
+        "emulated by manipulating the y-axis.\n\n"
+
+        "Light and shadow.\n\n"
+
+        "Within the material environment, virtual lights illuminate the scene. Key lights create "
+        "directional shadows, while ambient light creates soft shadows from all angles.\n"
+        "Shadows in the material environment are cast by these two light sources. In Android "
+        "development, shadows occur when light sources are blocked by sheets of material at "
+        "various positions along the z-axis. On the web, shadows are depicted by manipulating the "
+        "y-axis only. The following example shows the card with a height of 6dp.\n\n"
+
+        "Resting elevation.\n\n"
+
+        "All material objects, regardless of size, have a resting elevation, or default elevation "
+        "that does not change. If an object changes elevation, it should return to its resting "
+        "elevation as soon as possible.\n\n"
+
+        "Component elevations.\n\n"
+
+        "The resting elevation for a component type is consistent across apps (e.g., FAB elevation "
+        "does not vary from 6dp in one app to 16dp in another app).\n"
+        "Components may have different resting elevations across platforms, depending on the depth "
+        "of the environment (e.g., TV has a greater depth than mobile or desktop).\n\n"
+
+        "Responsive elevation and dynamic elevation offsets.\n\n"
+
+        "Some component types have responsive elevation, meaning they change elevation in response "
+        "to user input (e.g., normal, focused, and pressed) or system events. These elevation "
+        "changes are consistently implemented using dynamic elevation offsets.\n"
+        "Dynamic elevation offsets are the goal elevation that a component moves towards, relative "
+        "to the component’s resting state. They ensure that elevation changes are consistent "
+        "across actions and component types. For example, all components that lift on press have "
+        "the same elevation change relative to their resting elevation.\n"
+        "Once the input event is completed or cancelled, the component will return to its resting "
+        "elevation.\n\n"
+
+        "Avoiding elevation interference.\n\n"
+
+        "Components with responsive elevations may encounter other components as they move between "
+        "their resting elevations and dynamic elevation offsets. Because material cannot pass "
+        "through other material, components avoid interfering with one another any number of ways, "
+        "whether on a per component basis or using the entire app layout.\n"
+        "On a component level, components can move or be removed before they cause interference. "
+        "For example, a floating action button (FAB) can disappear or move off screen before a "
+        "user picks up a card, or it can move if a snackbar appears.\n"
+        "On the layout level, design your app layout to minimize opportunities for interference. "
+        "For example, position the FAB to one side of stream of a cards so the FAB won’t interfere "
+        "when a user tries to pick up one of cards.\n\n"
+    </string>
+    <string name="action_settings">Settings</string>
+</resources>

+ 26 - 0
app/src/main/res/values/styles.xml

@@ -0,0 +1,26 @@
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+        <!--将 ActionBar 隐藏,这里使用 ToolBar -->
+        <item name="windowActionBar">false</item>
+        <!-- 使用 API Level 22 以上编译的话,要拿掉前綴字 -->
+        <item name="windowNoTitle">true</item>
+        <!-- 去除阴影 ActionBar 阴影 -->
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <style name="AppTheme.NoActionBar">
+        <item name="windowActionBar">false</item>
+        <item name="windowNoTitle">true</item>
+    </style>
+
+    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
+
+    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
+
+</resources>

+ 17 - 0
app/src/test/java/cn/minbb/InterfaceTest/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package cn.minbb.InterfaceTest;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() {
+        assertEquals(4, 2 + 2);
+    }
+}