Commit 0f5422ae authored by jyx's avatar jyx

代码优化

parent 0a426bc5
...@@ -154,7 +154,7 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener { ...@@ -154,7 +154,7 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
} }
tvLoginAgreement.text = SpanUtils() SpanUtils.with(tvLoginAgreement)
.append("《用户注册协议》").setClickSpan(object : ClickableSpan() { .append("《用户注册协议》").setClickSpan(object : ClickableSpan() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
val bundle = Bundle() val bundle = Bundle()
......
...@@ -27,7 +27,9 @@ import com.mints.flowbox.mvp.presenters.LoginPresenter ...@@ -27,7 +27,9 @@ import com.mints.flowbox.mvp.presenters.LoginPresenter
import com.mints.flowbox.mvp.views.LoginView import com.mints.flowbox.mvp.views.LoginView
import com.mints.flowbox.ui.activitys.base.BaseActivity import com.mints.flowbox.ui.activitys.base.BaseActivity
import com.mints.flowbox.utils.SpanUtils import com.mints.flowbox.utils.SpanUtils
import kotlinx.android.synthetic.main.activity_mobile_login.*
import kotlinx.android.synthetic.main.activity_wx_login.* import kotlinx.android.synthetic.main.activity_wx_login.*
import kotlinx.android.synthetic.main.activity_wx_login.tvLoginAgreement
import java.util.* import java.util.*
...@@ -172,7 +174,7 @@ class WxLoginActivity : BaseActivity(), LoginView, View.OnClickListener, OnLogin ...@@ -172,7 +174,7 @@ class WxLoginActivity : BaseActivity(), LoginView, View.OnClickListener, OnLogin
private fun initView() { private fun initView() {
tvLoginAgreement.text = SpanUtils() SpanUtils.with(tvLoginAgreement)
.append("《用户注册协议》").setClickSpan(object : ClickableSpan() { .append("《用户注册协议》").setClickSpan(object : ClickableSpan() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
val bundle = Bundle() val bundle = Bundle()
......
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