├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── t1.jpg │ │ │ │ ├── t2.jpg │ │ │ │ ├── t3.jpg │ │ │ │ ├── t4.jpg │ │ │ │ ├── t5.jpg │ │ │ │ ├── t6.jpg │ │ │ │ ├── t7.jpg │ │ │ │ ├── auth.png │ │ │ │ ├── favorite.png │ │ │ │ └── favorite_border.png │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_comment.xml │ │ │ │ ├── layout_item.xml │ │ │ │ ├── fragment_sms_verify.xml │ │ │ │ ├── activity_auth.xml │ │ │ │ ├── fragment_phone_input.xml │ │ │ │ ├── fragment_set_pwd.xml │ │ │ │ └── fragment_login_by_pwd.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── java │ │ │ └── prototypez │ │ │ │ └── github │ │ │ │ └── io │ │ │ │ └── sq │ │ │ │ └── demo │ │ │ │ ├── util │ │ │ │ └── LoginInfo.kt │ │ │ │ ├── entity │ │ │ │ ├── Item.kt │ │ │ │ └── User.kt │ │ │ │ ├── processes │ │ │ │ ├── register │ │ │ │ │ ├── steps │ │ │ │ │ │ ├── PhoneRegisterFragment.kt │ │ │ │ │ │ ├── SmsCheckForRegisterFragment.kt │ │ │ │ │ │ └── PwdSetFragment.kt │ │ │ │ │ └── RegisterActivity.kt │ │ │ │ ├── pwdReset │ │ │ │ │ ├── steps │ │ │ │ │ │ ├── PhoneCheckFragment.kt │ │ │ │ │ │ ├── SmsCheckForPwdResetFragment.kt │ │ │ │ │ │ └── PwdResetFragment.kt │ │ │ │ │ └── PwdResetActivity.kt │ │ │ │ ├── login │ │ │ │ │ ├── steps │ │ │ │ │ │ ├── LoginBySmsFragment.kt │ │ │ │ │ │ └── LoginByPwdFragment.kt │ │ │ │ │ └── LoginActivity.kt │ │ │ │ ├── comment │ │ │ │ │ └── CommentActivity.kt │ │ │ │ └── auth │ │ │ │ │ └── AuthActivity.kt │ │ │ │ └── MainActivity.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── prototypez │ │ │ └── github │ │ │ └── io │ │ │ └── sq │ │ │ └── demo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── prototypez │ │ └── github │ │ └── io │ │ └── sq │ │ └── demo │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── library ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── ids.xml │ │ │ └── anim │ │ │ │ ├── sq_push_in_left.xml │ │ │ │ ├── sq_push_in_right.xml │ │ │ │ ├── sq_push_out_left.xml │ │ │ │ └── sq_push_out_right.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── prototypez │ │ │ └── github │ │ │ └── io │ │ │ └── sq │ │ │ ├── SqConstant.java │ │ │ ├── activity │ │ │ └── SqActivity.java │ │ │ ├── ActivityResult.java │ │ │ ├── fragment │ │ │ ├── ActivityResultFragment.java │ │ │ └── SupportActivityResultFragment.java │ │ │ ├── util │ │ │ ├── BundleBuilder.java │ │ │ └── IntentBuilder.java │ │ │ └── Sq.java │ ├── test │ │ └── java │ │ │ └── prototypez │ │ │ └── github │ │ │ └── io │ │ │ └── sq │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── prototypez │ │ └── github │ │ └── io │ │ └── sq │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── sq-logo.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.MD /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /sq-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/sq-logo.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | library 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | .DS_Store 5 | /build 6 | /captures 7 | .externalNativeBuild 8 | .idea/ -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/t1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/t1.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/t2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/t2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/t3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/t3.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/t4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/t4.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/t5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/t5.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/t6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/t6.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/t7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/t7.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/auth.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/favorite.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/favorite_border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/drawable-xxhdpi/favorite_border.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrototypeZ/Sq/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /library/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #e71a19 4 | #e71a19 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed May 30 15:30:12 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Sq Demo 3 | 登陆 4 | 短信验证 5 | 实名认证 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/main/java/prototypez/github/io/sq/SqConstant.java: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq; 2 | 3 | public class SqConstant { 4 | public static final String KEY_REQUEST_DATA = "__key_request_data"; 5 | public static final String KEY_REQUEST_CONTEXT_DATA = "__key_request_context_data"; 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/prototypez/github/io/sq/demo/util/LoginInfo.kt: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq.demo.util 2 | 3 | import prototypez.github.io.sq.demo.entity.User 4 | 5 | object LoginInfo { 6 | 7 | var currentLoginUser: User? = null 8 | 9 | val isLogin: Boolean 10 | get() = currentLoginUser != null 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/prototypez/github/io/sq/demo/entity/Item.kt: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq.demo.entity 2 | 3 | import android.support.annotation.DrawableRes 4 | 5 | import java.io.Serializable 6 | 7 | class Item( 8 | var title: String, 9 | @DrawableRes var imageRes: Int, 10 | var favCount: Int, 11 | var commentCount: Int, 12 | var fav: Boolean 13 | ) 14 | -------------------------------------------------------------------------------- /library/src/main/res/anim/sq_push_in_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | -------------------------------------------------------------------------------- /library/src/main/res/anim/sq_push_in_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | -------------------------------------------------------------------------------- /library/src/main/res/anim/sq_push_out_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /library/src/test/java/prototypez/github/io/sq/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/test/java/prototypez/github/io/sq/demo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq.demo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/java/prototypez/github/io/sq/demo/entity/User.kt: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq.demo.entity 2 | 3 | import java.io.Serializable 4 | 5 | class User : Serializable { 6 | var id: String 7 | var nickName: String 8 | var phone: String 9 | 10 | // more information 11 | var address: String? = null 12 | var age: Int = 0 13 | var hasAuth: Boolean? = null 14 | 15 | constructor(id: String, nickName: String, phone: String) { 16 | this.id = id 17 | this.nickName = nickName 18 | this.phone = phone 19 | } 20 | 21 | constructor(id: String, nickName: String, phone: String, address: String, age: Int, hasAuth: Boolean) { 22 | this.id = id 23 | this.nickName = nickName 24 | this.phone = phone 25 | this.address = address 26 | this.age = age 27 | this.hasAuth = hasAuth 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /library/src/androidTest/java/prototypez/github/io/sq/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("prototypez.github.io.sq.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/androidTest/java/prototypez/github/io/sq/demo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq.demo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("prototypez.github.io.sq.demo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 23 | 24 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/prototypez/github/io/sq/demo/processes/register/steps/PhoneRegisterFragment.kt: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq.demo.processes.register.steps 2 | 3 | import android.os.Bundle 4 | import android.support.v4.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | 9 | import prototypez.github.io.sq.demo.R 10 | import kotlinx.android.synthetic.main.fragment_phone_input.* 11 | import java.util.* 12 | 13 | class PhoneRegisterFragment : Fragment() { 14 | 15 | lateinit var phoneInputCallback: (String, String) -> Unit 16 | 17 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { 18 | return inflater.inflate(R.layout.fragment_phone_input, container, false) 19 | } 20 | 21 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 22 | super.onViewCreated(view, savedInstanceState) 23 | btn_ok.setOnClickListener{ 24 | // Mock 请求成功,直接进入下一步 25 | phoneInputCallback(et_phone.text.toString(), UUID.randomUUID().toString()) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/prototypez/github/io/sq/demo/processes/pwdReset/steps/PhoneCheckFragment.kt: -------------------------------------------------------------------------------- 1 | package prototypez.github.io.sq.demo.processes.pwdReset.steps 2 | 3 | import android.os.Bundle 4 | import android.support.v4.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import kotlinx.android.synthetic.main.fragment_phone_input.* 9 | import prototypez.github.io.sq.demo.R 10 | import java.util.* 11 | 12 | class PhoneCheckFragment : Fragment() { 13 | 14 | lateinit var phoneCheckCallback: (phone: String, session: String) -> Unit 15 | 16 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { 17 | return inflater.inflate(R.layout.fragment_phone_input, container, false) 18 | } 19 | 20 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 21 | super.onViewCreated(view, savedInstanceState) 22 | 23 | btn_ok.setOnClickListener{ _ -> 24 | // 发起请求,这里直接成功 25 | val session = UUID.randomUUID().toString() 26 | phoneCheckCallback(et_phone.text.toString(), session) 27 | } 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 18 | 19 | 25 | 26 |