Skip to content

Commit

Permalink
Update login fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
Thooooor committed Nov 1, 2020
1 parent ce31c93 commit 6ce5b34
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,9 @@ class LoginFragment : Fragment() {
)
.show()
jump()
}//else{

// Toast.makeText(loginActivity.applicationContext,
// "密码错误",Toast.LENGTH_SHORT)
// .show()
// }
}else{
passwordText.text = "密码不正确"
}
}

override fun beforeTextChanged(
Expand Down
22 changes: 21 additions & 1 deletion app/src/main/res/layout/fragment_login_passsword.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down Expand Up @@ -70,12 +71,31 @@

</LinearLayout>

<LinearLayout
android:id="@+id/passwordTextLinear"
android:layout_width="match_parent"
android:layout_height="20dp"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@+id/pwdLinearLayout">

<TextView
android:id="@+id/passwordText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="密码错误"
android:gravity="center">

</TextView>

</LinearLayout>


<LinearLayout
android:id="@+id/bottomLinearLayout"
android:layout_width="match_parent"
android:layout_height="319dp"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@+id/pwdLinearLayout">
app:layout_constraintTop_toBottomOf="@+id/passwordTextLinear">

<LinearLayout
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class NineLockView extends View {
private int offsetX;//x轴偏移量
private int offsetY;//y轴偏移量
private int step;//节点间的距离
private int radius=25;//节点圆圈的半径大小
private final int radius=50;//节点圆圈的半径大小
private int lastPointX;//最后一个节点的 x 坐标
private int lastPointY;//最后一个节点的 y 坐标
private float linearEndX;//触摸点的最终位置坐标
Expand Down

0 comments on commit 6ce5b34

Please sign in to comment.