Commit 74ab32ba by 霍志良

feat:UI修改

parent ee0a93f7
......@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Handler
import android.support.v4.content.ContextCompat
import android.text.TextUtils
......@@ -25,6 +26,7 @@ import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.ui.login.contract.IVerificationCodeContract
import com.yidianling.user.ui.login.presenter.VerificationCodePresenterImpl
import com.yidianling.user.widget.PinField.PinField
import com.yidianling.user.widget.ZDialog
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
......@@ -41,7 +43,7 @@ import java.util.concurrent.TimeUnit
*/
class VerificationCodeActivity :
BaseMvpActivity<IVerificationCodeContract.View, IVerificationCodeContract.Presenter>(),
IVerificationCodeContract.View {
IVerificationCodeContract.View, View.OnClickListener {
private var codeType = STATUS_LOGIN_BY_CODE//页面状态: 1 忘记密码界面 2验证码登录界面
private var userPhoneNumber: String? = null
......@@ -49,7 +51,7 @@ class VerificationCodeActivity :
private var hasPassword = false
private var countryCode: String? = null
private var msgCodeDispoable: Disposable? = null
private var mKeFuDialog: ZDialog? = null
companion object {
var STATUS_FORGET_PWD = 1//忘记密码界面
var STATUS_LOGIN_BY_CODE = 2//验证码登录界面
......@@ -194,7 +196,7 @@ class VerificationCodeActivity :
}
}
not_get_code.setOnClickListener(this)
img_reg_back.setOnClickListener {
if (ActivityManager.getInstance().getSecondTaskActivity() == null) {
closeAnim(true)
......@@ -320,7 +322,7 @@ class VerificationCodeActivity :
@SuppressLint("SetTextI18n")
override fun startCountdown(remainTime: Int) {
tv_countdown_time.isEnabled = false
tv_countdown_time.setTextColor(ContextCompat.getColor(this, R.color.platform_white))
tv_countdown_time.setTextColor(ContextCompat.getColor(this, R.color.platform_color_999999))
msgCodeDispoable = Observable.interval(0, 1, TimeUnit.SECONDS)
.subscribeOn(Schedulers.computation())
......@@ -404,4 +406,33 @@ class VerificationCodeActivity :
overridePendingTransition(0, 0)
}
}
override fun onClick(v: View?) {
when(v?.id){
R.id.not_get_code->{
showKeFuDialog()
}
}
}
private fun showKeFuDialog() {
if (mKeFuDialog == null) {
mKeFuDialog = ZDialog.Builder(this)
.setContentView(R.layout.user_kefu_tipdialog)
.setOnClickListener(R.id.cancel_dialog) {
mKeFuDialog?.dismiss()
}
.setAnimation(0)//取消动画
.setOnClickListener(R.id.dial_right_now) {
val dialIntent =
Intent(
Intent.ACTION_DIAL,
Uri.parse(String.format("tel:" + "400-765-1010"))
)
startActivity(dialIntent)
}
.show()
}
}
}
......@@ -8,7 +8,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_16"
android:layout_marginTop="@dimen/platform_dp_20"
android:layout_marginTop="@dimen/platform_dp_30"
android:src="@drawable/user_ic_back_black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
......
......@@ -10,7 +10,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_16"
android:layout_marginTop="@dimen/platform_dp_20"
android:layout_marginTop="@dimen/platform_dp_30"
android:src="@drawable/user_ic_back_black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -85,6 +85,7 @@
android:layout_height="wrap_content"
android:text="收不到验证码?"
android:textSize="13sp"
android:id="@+id/not_get_code"
android:textColor="@color/platform_color_666666"
app:layout_constraintRight_toRightOf="@id/verify_code"
app:layout_constraintTop_toTopOf="@id/login_password"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment