Commit 9e8aa7d6 authored by zhaopengxiang's avatar zhaopengxiang

update ui

parent 4250d78b
...@@ -58,12 +58,14 @@ class CommonDialog : Dialog { ...@@ -58,12 +58,14 @@ class CommonDialog : Dialog {
tvMessage = findViewById(R.id.tvMessage) tvMessage = findViewById(R.id.tvMessage)
tvNegative = findViewById(R.id.tvNegative) tvNegative = findViewById(R.id.tvNegative)
tvPositive = findViewById(R.id.tvPositive) tvPositive = findViewById(R.id.tvPositive)
tvNegative?.clickWithTrigger { var vNegative: View = findViewById(R.id.vNegative)
var vPositive: View = findViewById(R.id.vPositive)
vNegative?.clickWithTrigger {
if (onClickListener != null) { if (onClickListener != null) {
onClickListener!!.onNegativeClick() onClickListener!!.onNegativeClick()
} }
} }
tvPositive?.clickWithTrigger { vPositive?.clickWithTrigger {
if (onClickListener != null) { if (onClickListener != null) {
onClickListener!!.onPositiveClick() onClickListener!!.onPositiveClick()
} }
......
...@@ -44,6 +44,15 @@ ...@@ -44,6 +44,15 @@
android:background="#E8E8E8" /> android:background="#E8E8E8" />
<View
android:id="@+id/vNegative"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/vVerticalLine"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/vHorizontalLine" />
<TextView <TextView
android:id="@+id/tvNegative" android:id="@+id/tvNegative"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -56,6 +65,15 @@ ...@@ -56,6 +65,15 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/vHorizontalLine" /> app:layout_constraintTop_toBottomOf="@+id/vHorizontalLine" />
<View
android:id="@+id/vPositive"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/vVerticalLine"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/vHorizontalLine" />
<TextView <TextView
android:id="@+id/tvPositive" android:id="@+id/tvPositive"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
......
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