Commit 26956085 by 霍志良

feat:自定义验证码修改大小

parent 92165f37
......@@ -24,16 +24,15 @@
android:name=".ui.GetIdentifyingCodeActivity"
android:theme="@style/platform_NoTitleTheme"
android:screenOrientation="portrait" />
<activity android:name=".ui.login.testLoginActivity"
android:theme="@style/platform_NoTitleTheme"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".ui.FillInfoActivity"
android:theme="@style/platform_NoTitleTheme"
android:screenOrientation="portrait" />
<activity
android:name=".ui.login.testLoginActivity"
android:theme="@style/platform_NoTitleTheme"
android:screenOrientation="portrait" />
<activity
android:name=".safePrivate.CheckPasswordActivity"
android:theme="@style/platform_NoTitleTheme"
android:screenOrientation="portrait" />
......
......@@ -38,10 +38,7 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils
import com.yidianling.user.R
import com.yidianling.user.StatusUtils
import com.yidianling.user.UserHelper
import com.yidianling.user.*
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.AliAuthBean
import com.yidianling.user.constants.UserBIConstants
......@@ -454,13 +451,18 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
}
//下一步
iv_next.setOnClickListener {
if (iv_select_protocol.visibility == View.VISIBLE && !isAgreeProtocol) {
ToastUtil.toastShort("请您先同意壹点灵《用户使用协议》、《隐私保护政策》,才能登录使用")
return@setOnClickListener
}
if (checkPhone()) {
mPresenter.checkPhoneStatus(userPhoneNumber!!, countryCode!!, isUmengLoginState)
if (BuildConfig.DEBUG){
testLoginActivity.start(this)
}else{
if (iv_select_protocol.visibility == View.VISIBLE && !isAgreeProtocol) {
ToastUtil.toastShort("请您先同意壹点灵《用户使用协议》、《隐私保护政策》,才能登录使用")
return@setOnClickListener
}
if (checkPhone()) {
mPresenter.checkPhoneStatus(userPhoneNumber!!, countryCode!!, isUmengLoginState)
}
}
}
//手机号输入框
et_phone_number.setListener {
......
......@@ -81,7 +81,7 @@ class SquarePinField : PinField{
*
* */
if(character!=null) {
canvas?.drawText(character.toString(),textX,textY, textPaint)
canvas?.drawText(character.toString(),textX+10,textY, textPaint)
}
if(shouldDrawHint()){
......@@ -100,7 +100,7 @@ class SquarePinField : PinField{
* 绘制光标cursorY1是光标上方,cursorY2是光标下方
*
* */
drawCursor(canvas,textX,cursorY1+20f,cursorY2-20f,highlightPaint)
drawCursor(canvas,textX+10,cursorY1+20f,cursorY2-30f,highlightPaint)
}
}
highlightLogic(i, text?.length){
......@@ -111,7 +111,7 @@ class SquarePinField : PinField{
private fun drawRect(canvas: Canvas?,paddedX1:Float,paddedY1:Float,paddedX2:Float,paddedY2:Float,paint: Paint){
if(cornerRadius>0 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
canvas?.drawRoundRect(paddedX1,paddedY1,paddedX2,paddedY2,cornerRadius,cornerRadius, paint)
canvas?.drawRoundRect(paddedX1,paddedY1-20f,paddedX2+20f,paddedY2,cornerRadius,cornerRadius, paint)
}else{
canvas?.drawRect(paddedX1,paddedY1,paddedX2,paddedY2, paint)
}
......
......@@ -58,24 +58,36 @@
android:cursorVisible="true"
android:focusable="true"
android:inputType="number"
android:textSize="20sp"
android:paddingBottom="0dp"
android:paddingTop="0dp"
android:textSize="24sp"
app:User_highlightType="currentField"
app:User_isCursorEnabled="true"
app:User_noOfFields="4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_phone"
app:user_cornerRadius="8dp"
/>
app:user_cornerRadius="8dp" />
<TextView
android:id="@+id/login_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_15"
android:text="密码登录"
android:id="@+id/login_password"
android:textColor="@color/platform_color_666666"
android:textSize="13sp"
app:layout_constraintStart_toStartOf="@id/verify_code"
app:layout_constraintTop_toBottomOf="@id/verify_code">
app:layout_constraintTop_toBottomOf="@id/verify_code" />
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收不到验证码?"
android:textSize="13sp"
android:textColor="@color/platform_color_666666"
app:layout_constraintRight_toRightOf="@id/verify_code"
app:layout_constraintTop_toTopOf="@id/login_password"
app:layout_constraintBottom_toBottomOf="@id/login_password"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
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