添加注册源
This commit is contained in:
parent
5200ed6fd3
commit
73b14fc0af
|
|
@ -2,6 +2,7 @@ package com.yingmao.clash.act
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.Spannable
|
import android.text.Spannable
|
||||||
import android.text.SpannableStringBuilder
|
import android.text.SpannableStringBuilder
|
||||||
|
|
@ -25,6 +26,8 @@ import com.yingmao.clash.app.MainApplication
|
||||||
import com.yingmao.clash.base.BaseActivity
|
import com.yingmao.clash.base.BaseActivity
|
||||||
import com.yingmao.clash.conf.BZYConstants
|
import com.yingmao.clash.conf.BZYConstants
|
||||||
import com.yingmao.clash.entity.CheckLoginRsp
|
import com.yingmao.clash.entity.CheckLoginRsp
|
||||||
|
import com.yingmao.clash.listener.AsyncBodyCallback
|
||||||
|
import com.yingmao.clash.listener.AsyncCallback
|
||||||
import com.yingmao.clash.net.http.HttpReqType
|
import com.yingmao.clash.net.http.HttpReqType
|
||||||
import com.yingmao.clash.net.http.HttpStatus
|
import com.yingmao.clash.net.http.HttpStatus
|
||||||
import com.yingmao.clash.util.AESUtil
|
import com.yingmao.clash.util.AESUtil
|
||||||
|
|
@ -47,6 +50,7 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
private lateinit var loginUserName: String
|
private lateinit var loginUserName: String
|
||||||
private var username_encrypt = ""
|
private var username_encrypt = ""
|
||||||
private var password_encrypt = ""
|
private var password_encrypt = ""
|
||||||
|
private var registerHost = ""
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val LOGIN_TO_REGISTER_REQUEST_CODE = 1
|
private const val LOGIN_TO_REGISTER_REQUEST_CODE = 1
|
||||||
|
|
@ -157,7 +161,10 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
if (::rxDialogShapeLoading.isInitialized && rxDialogShapeLoading.isShowing) {
|
if (::rxDialogShapeLoading.isInitialized && rxDialogShapeLoading.isShowing) {
|
||||||
rxDialogShapeLoading.cancel()
|
rxDialogShapeLoading.cancel()
|
||||||
}
|
}
|
||||||
Log.e("LoginActivity", resources.getString(R.string.LoginException)+"${httpStatus.msg}")
|
Log.e(
|
||||||
|
"LoginActivity",
|
||||||
|
resources.getString(R.string.LoginException) + "${httpStatus.msg}"
|
||||||
|
)
|
||||||
// Logger.i("检查登录异常${httpStatus.msg}")
|
// Logger.i("检查登录异常${httpStatus.msg}")
|
||||||
RxToast.error(resources.getString(R.string.LoginException))
|
RxToast.error(resources.getString(R.string.LoginException))
|
||||||
}
|
}
|
||||||
|
|
@ -249,7 +256,8 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
val config = resources.configuration
|
val config = resources.configuration
|
||||||
val language = config.locale.language
|
val language = config.locale.language
|
||||||
if (language.equals("en")) {
|
if (language.equals("en")) {
|
||||||
val spannableStringBuilder = SpannableStringBuilder(resources.getString(R.string.AgreeAgreement))
|
val spannableStringBuilder =
|
||||||
|
SpannableStringBuilder(resources.getString(R.string.AgreeAgreement))
|
||||||
val clickableSpan: MyClickableSpan = object : MyClickableSpan() {
|
val clickableSpan: MyClickableSpan = object : MyClickableSpan() {
|
||||||
override fun onClick(view: View) {
|
override fun onClick(view: View) {
|
||||||
val backgroundColorSpan = BackgroundColorSpan(Color.parseColor("#00000000"))
|
val backgroundColorSpan = BackgroundColorSpan(Color.parseColor("#00000000"))
|
||||||
|
|
@ -281,7 +289,10 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
)
|
)
|
||||||
textView.text = spannableStringBuilder
|
textView.text = spannableStringBuilder
|
||||||
val intent = Intent(this@LoginActivity, AgreementAndPrivacyActivity::class.java)
|
val intent = Intent(this@LoginActivity, AgreementAndPrivacyActivity::class.java)
|
||||||
intent.putExtra(BZYConstants.EXTRA_KEY_AGREEMENT, BZYConstants.EXTRA_USER_AGREEMENT)
|
intent.putExtra(
|
||||||
|
BZYConstants.EXTRA_KEY_AGREEMENT,
|
||||||
|
BZYConstants.EXTRA_USER_AGREEMENT
|
||||||
|
)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -294,7 +305,8 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
textView.text = spannableStringBuilder
|
textView.text = spannableStringBuilder
|
||||||
textView.movementMethod = LinkMovementMethod.getInstance()
|
textView.movementMethod = LinkMovementMethod.getInstance()
|
||||||
} else {
|
} else {
|
||||||
val spannableStringBuilder = SpannableStringBuilder(resources.getString(R.string.AgreeAgreement))
|
val spannableStringBuilder =
|
||||||
|
SpannableStringBuilder(resources.getString(R.string.AgreeAgreement))
|
||||||
val clickableSpan: MyClickableSpan = object : MyClickableSpan() {
|
val clickableSpan: MyClickableSpan = object : MyClickableSpan() {
|
||||||
override fun onClick(view: View) {
|
override fun onClick(view: View) {
|
||||||
val backgroundColorSpan = BackgroundColorSpan(Color.parseColor("#00000000"))
|
val backgroundColorSpan = BackgroundColorSpan(Color.parseColor("#00000000"))
|
||||||
|
|
@ -326,7 +338,10 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
)
|
)
|
||||||
textView.text = spannableStringBuilder
|
textView.text = spannableStringBuilder
|
||||||
val intent = Intent(this@LoginActivity, AgreementAndPrivacyActivity::class.java)
|
val intent = Intent(this@LoginActivity, AgreementAndPrivacyActivity::class.java)
|
||||||
intent.putExtra(BZYConstants.EXTRA_KEY_AGREEMENT, BZYConstants.EXTRA_USER_AGREEMENT)
|
intent.putExtra(
|
||||||
|
BZYConstants.EXTRA_KEY_AGREEMENT,
|
||||||
|
BZYConstants.EXTRA_USER_AGREEMENT
|
||||||
|
)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -400,8 +415,44 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.tv_register -> {
|
R.id.tv_register -> {
|
||||||
val intent = Intent(applicationContext, RegisterActivity::class.java)
|
// val intent = Intent(applicationContext, RegisterActivity::class.java)
|
||||||
startActivityForResult(intent, LOGIN_TO_REGISTER_REQUEST_CODE)
|
// startActivityForResult(intent, LOGIN_TO_REGISTER_REQUEST_CODE)
|
||||||
|
//
|
||||||
|
if (TextUtils.isEmpty(registerHost)) {
|
||||||
|
var mmkvHost = MMKV.defaultMMKV()
|
||||||
|
.decodeString(BZYConstants.MMKV_KEY_REGISTER_HOST, "")
|
||||||
|
// com.cncat.vpn.common.log.Log.d("mmkvHost==>${mmkvHost}")
|
||||||
|
loginViewMode.getRegisterHost(object : AsyncBodyCallback {
|
||||||
|
override suspend fun suc(str: String) {
|
||||||
|
// com.cncat.vpn.common.log.Log.d("str==>${str}")
|
||||||
|
if (str != mmkvHost) {
|
||||||
|
MMKV.defaultMMKV()
|
||||||
|
.encode(BZYConstants.MMKV_KEY_REGISTER_HOST, str)
|
||||||
|
}
|
||||||
|
// mmkvHost = str
|
||||||
|
registerHost = str
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(str)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun err() {
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(mmkvHost)) {
|
||||||
|
startActivity(
|
||||||
|
Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(mmkvHost)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.tv_forget_pwd -> {
|
R.id.tv_forget_pwd -> {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ class BZYConstants {
|
||||||
//备用地址
|
//备用地址
|
||||||
const val MMKV_KEY_ROUTER_HOST ="router_host"
|
const val MMKV_KEY_ROUTER_HOST ="router_host"
|
||||||
const val MMKV_KEY_Airport_Base64 ="airport_base64"
|
const val MMKV_KEY_Airport_Base64 ="airport_base64"
|
||||||
|
//注册地址
|
||||||
|
const val MMKV_KEY_REGISTER_HOST ="register_host"
|
||||||
|
|
||||||
const val REQUEST_CODE_PAY_WEB_Stripe = 1001
|
const val REQUEST_CODE_PAY_WEB_Stripe = 1001
|
||||||
const val REQUEST_CODE_PAY_WEB_BiLai = 1002
|
const val REQUEST_CODE_PAY_WEB_BiLai = 1002
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatch
|
||||||
backIv: ImageView,
|
backIv: ImageView,
|
||||||
moreTv: TextView,
|
moreTv: TextView,
|
||||||
titleTv: TextView,
|
titleTv: TextView,
|
||||||
container: FrameLayout
|
container: FrameLayout,
|
||||||
) {
|
) {
|
||||||
titleBarRl.visibility = View.VISIBLE
|
titleBarRl.visibility = View.VISIBLE
|
||||||
backIv.visibility = View.INVISIBLE
|
backIv.visibility = View.INVISIBLE
|
||||||
|
|
@ -410,7 +410,6 @@ class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatch
|
||||||
private fun getNodesStatus() {
|
private fun getNodesStatus() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -432,7 +431,6 @@ class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatch
|
||||||
if (isAdded) {
|
if (isAdded) {
|
||||||
RxToast.success(resources.getString(R.string.AccelerateSuccess))
|
RxToast.success(resources.getString(R.string.AccelerateSuccess))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// File("${Core.deviceStorage.noBackupFilesDir}/${BaseService.CONFIG_FILE}").delete()
|
// File("${Core.deviceStorage.noBackupFilesDir}/${BaseService.CONFIG_FILE}").delete()
|
||||||
}
|
}
|
||||||
|
|
@ -662,18 +660,21 @@ class NewAccFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatch
|
||||||
mact.goBackupRechargeWeb()
|
mact.goBackupRechargeWeb()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateUserInfo() {
|
private fun updateUserInfo() {
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
var mact = activity as NewMainActivity
|
var mact = activity as NewMainActivity
|
||||||
mact.goCheckLogin()
|
mact.goCheckLogin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun start_u_timer() {
|
private fun start_u_timer() {
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
var mact = activity as NewMainActivity
|
var mact = activity as NewMainActivity
|
||||||
mact.startUploadTimer()
|
mact.startUploadTimer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun stop_u_timer() {
|
private fun stop_u_timer() {
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
var mact = activity as NewMainActivity
|
var mact = activity as NewMainActivity
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.yingmao.clash.listener
|
||||||
|
|
||||||
|
public interface AsyncBodyCallback {
|
||||||
|
|
||||||
|
suspend fun suc(str:String)
|
||||||
|
fun err()
|
||||||
|
}
|
||||||
|
|
@ -166,6 +166,10 @@ interface HttpApi {
|
||||||
|
|
||||||
@GET("/hosttaizi.txt")
|
@GET("/hosttaizi.txt")
|
||||||
suspend fun getHostTZ(): String
|
suspend fun getHostTZ(): String
|
||||||
|
|
||||||
|
|
||||||
|
@GET("/ymregister.txt")
|
||||||
|
suspend fun getRegister(): String
|
||||||
// @Headers(
|
// @Headers(
|
||||||
// "User-Agent: Octopus_Android"
|
// "User-Agent: Octopus_Android"
|
||||||
// )
|
// )
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,11 @@ import com.tencent.mmkv.MMKV
|
||||||
import com.yingmao.clash.app.MainApplication
|
import com.yingmao.clash.app.MainApplication
|
||||||
import com.yingmao.clash.base.PublicViewMode
|
import com.yingmao.clash.base.PublicViewMode
|
||||||
import com.cncat.vpn.common.log.Log
|
import com.cncat.vpn.common.log.Log
|
||||||
|
import com.yingmao.clash.BuildConfig
|
||||||
import com.yingmao.clash.conf.BZYConstants
|
import com.yingmao.clash.conf.BZYConstants
|
||||||
import com.yingmao.clash.entity.CheckLoginRsp
|
import com.yingmao.clash.entity.CheckLoginRsp
|
||||||
|
import com.yingmao.clash.listener.AsyncBodyCallback
|
||||||
|
import com.yingmao.clash.listener.AsyncCallback
|
||||||
import com.yingmao.clash.net.http.HttpApi
|
import com.yingmao.clash.net.http.HttpApi
|
||||||
import com.yingmao.clash.net.http.HttpReqType
|
import com.yingmao.clash.net.http.HttpReqType
|
||||||
import com.yingmao.clash.net.http.HttpStatus
|
import com.yingmao.clash.net.http.HttpStatus
|
||||||
|
|
@ -89,4 +92,28 @@ class LoginAtyVM : PublicViewMode() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getRegisterHost(callback: AsyncBodyCallback) {
|
||||||
|
val rt =
|
||||||
|
NetService.instances.createFreeBaseUrl("https://yingmao.oss-cn-hongkong.aliyuncs.com/")
|
||||||
|
doAsyncNoNeedReturn(HttpReqType.GET_HOST) {
|
||||||
|
try { //TODO bug 会引起崩溃
|
||||||
|
|
||||||
|
|
||||||
|
var host = rt.getRegister()
|
||||||
|
|
||||||
|
// Log.e("data", "2:$host")
|
||||||
|
// if (!TextUtils.isEmpty(host)) {
|
||||||
|
//
|
||||||
|
// MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_REGISTER_HOST, host)
|
||||||
|
// }
|
||||||
|
// Log.e("data", "22:$host")
|
||||||
|
|
||||||
|
callback.suc(host)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
callback.err()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -55,8 +55,8 @@
|
||||||
android:background="@drawable/login_et_bg_selector"
|
android:background="@drawable/login_et_bg_selector"
|
||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textSize="@dimen/layout_login_et_textsize"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/layout_login_et_textsize"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon"
|
app:layout_constraintStart_toStartOf="@+id/iv_icon"
|
||||||
|
|
@ -93,8 +93,8 @@
|
||||||
android:background="@drawable/login_et_bg_selector"
|
android:background="@drawable/login_et_bg_selector"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textSize="@dimen/layout_login_et_textsize"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/layout_login_et_textsize"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon"
|
app:layout_constraintStart_toStartOf="@+id/iv_icon"
|
||||||
|
|
@ -106,8 +106,8 @@
|
||||||
android:layout_width="@dimen/layout_login_cb_width"
|
android:layout_width="@dimen/layout_login_cb_width"
|
||||||
android:layout_height="@dimen/layout_login_cb_height"
|
android:layout_height="@dimen/layout_login_cb_height"
|
||||||
android:layout_marginEnd="@dimen/layout_login_cb_end_margin"
|
android:layout_marginEnd="@dimen/layout_login_cb_end_margin"
|
||||||
android:drawableBottom="@drawable/hide_pwd_cb_selector"
|
|
||||||
android:button="@null"
|
android:button="@null"
|
||||||
|
android:drawableBottom="@drawable/hide_pwd_cb_selector"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="@dimen/layout_login_cb_bottom_padding"
|
android:paddingBottom="@dimen/layout_login_cb_bottom_padding"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/et_password"
|
app:layout_constraintBottom_toBottomOf="@+id/et_password"
|
||||||
|
|
@ -126,48 +126,48 @@
|
||||||
app:layout_constraintTop_toBottomOf="@+id/et_password" />
|
app:layout_constraintTop_toBottomOf="@+id/et_password" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:checked="true"
|
|
||||||
android:id="@+id/cb_remember_password"
|
android:id="@+id/cb_remember_password"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
|
android:button="@null"
|
||||||
|
android:checked="true"
|
||||||
|
android:drawablePadding="7dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/remember_password"
|
android:text="@string/remember_password"
|
||||||
android:textColor="@color/white_70"
|
android:textColor="@color/white_70"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:drawablePadding="7dp"
|
app:drawableLeftCompat="@drawable/checked_selector"
|
||||||
android:gravity="center"
|
|
||||||
android:button="@null"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_password_error"
|
app:layout_constraintStart_toStartOf="@+id/tv_password_error"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_password_error"
|
app:layout_constraintTop_toBottomOf="@+id/tv_password_error" />
|
||||||
app:drawableLeftCompat="@drawable/checked_selector" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_user_agreement"
|
android:id="@+id/ll_user_agreement"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
app:layout_constraintStart_toStartOf="@+id/cb_remember_password"
|
android:layout_marginTop="15dp"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cb_remember_password"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_marginTop="15dp">
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/cb_remember_password"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/cb_remember_password">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:checked="true"
|
|
||||||
android:id="@+id/cb_user_agreement"
|
android:id="@+id/cb_user_agreement"
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
|
||||||
android:button="@null"
|
android:button="@null"
|
||||||
|
android:checked="true"
|
||||||
|
android:gravity="center"
|
||||||
app:drawableLeftCompat="@drawable/checked_selector" />
|
app:drawableLeftCompat="@drawable/checked_selector" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_user_agreement"
|
android:id="@+id/tv_user_agreement"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="12sp"
|
android:layout_marginStart="7dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textColor="@color/white_70"
|
android:textColor="@color/white_70"
|
||||||
android:gravity="center_vertical"
|
android:textSize="12sp" />
|
||||||
android:layout_marginStart="7dp" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -176,8 +176,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/layout_login_tv_login_start_margin"
|
android:layout_marginStart="@dimen/layout_login_tv_login_start_margin"
|
||||||
android:layout_marginEnd="@dimen/layout_login_tv_login_end_margin"
|
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_marginEnd="@dimen/layout_login_tv_login_end_margin"
|
||||||
android:background="@drawable/login_btn_bg_selector"
|
android:background="@drawable/login_btn_bg_selector"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingTop="@dimen/layout_login_tv_login_top_padding"
|
android:paddingTop="@dimen/layout_login_tv_login_top_padding"
|
||||||
|
|
@ -186,72 +186,69 @@
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/layout_login_tv_login_textsize"
|
android:textSize="@dimen/layout_login_tv_login_textsize"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/ll_user_agreement"
|
app:layout_constraintTop_toBottomOf="@+id/ll_user_agreement" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:id="@+id/tv_tip_default_psw"
|
android:id="@+id/tv_tip_default_psw"
|
||||||
android:layout_marginStart="30dp"
|
|
||||||
android:layout_marginEnd="30dp"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_login"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:maxLines="2"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:text="@string/loginTips"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="30dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_marginEnd="30dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:text="@string/loginTips"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_login" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/tv_hongmeng_tip"
|
android:id="@+id/tv_hongmeng_tip"
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginLeft="53dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_tip_default_psw"
|
|
||||||
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:maxLines="10"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:text="@string/LoginTips2"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:paddingRight="20dp"
|
|
||||||
android:paddingLeft="20dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="53dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:maxLines="10"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingRight="20dp"
|
||||||
|
android:text="@string/LoginTips2"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_tip_default_psw"
|
||||||
tools:ignore="MissingConstraints" />
|
tools:ignore="MissingConstraints" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/tv_register"
|
android:id="@+id/tv_register"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/dp_10"
|
|
||||||
android:layout_marginStart="@dimen/layout_login_tv_register_start_margin"
|
android:layout_marginStart="@dimen/layout_login_tv_register_start_margin"
|
||||||
android:layout_marginTop="@dimen/layout_login_tv_register_top_margin"
|
android:layout_marginTop="35dp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
android:text="@string/register"
|
android:text="@string/register"
|
||||||
android:textColor="@drawable/loginlayout_register_text_color_selector"
|
android:textColor="@drawable/loginlayout_register_text_color_selector"
|
||||||
android:textSize="@dimen/layout_login_tv_register_textsize"
|
android:textSize="@dimen/layout_login_tv_register_textsize"
|
||||||
|
android:visibility="visible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_login" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_hongmeng_tip" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
||||||
android:id="@+id/tv_forget_pwd"
|
android:id="@+id/tv_forget_pwd"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/dp_10"
|
|
||||||
android:layout_marginTop="35dp"
|
android:layout_marginTop="35dp"
|
||||||
android:layout_marginEnd="@dimen/layout_login_forget_tv_end_margin"
|
android:layout_marginEnd="@dimen/layout_login_forget_tv_end_margin"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
android:text="@string/forget_pwd"
|
android:text="@string/forget_pwd"
|
||||||
android:textColor="@drawable/loginlayout_forget_text_color_selector"
|
android:textColor="@drawable/loginlayout_forget_text_color_selector"
|
||||||
android:textSize="@dimen/layout_login_forget_tv_textsize"
|
android:textSize="@dimen/layout_login_forget_tv_textsize"
|
||||||
|
android:visibility="visible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:visibility="visible"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_hongmeng_tip" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_hongmeng_tip" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
Loading…
Reference in New Issue