Skip to content

Commit 45d3e09

Browse files
committed
update
1 parent a73709e commit 45d3e09

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

app/src/main/java/com/hoc081988/democoroutineschannelresult/ui/dashboard/DashboardFragment.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ class DashboardFragment : Fragment() {
5252
.editText!!
5353
.text
5454
?.toString()
55-
.orEmpty(),
55+
?.takeIf { it.isNotBlank() }
56+
?: return@setOnClickListener,
5657
)
5758
)
59+
60+
binding.textInputLayout.editText!!.setText("")
5861
}
5962
}
6063

app/src/main/java/com/hoc081988/democoroutineschannelresult/ui/home/HomeFragment.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,12 @@ class HomeFragment : Fragment() {
5858
.editText!!
5959
.text
6060
?.toString()
61-
.orEmpty(),
61+
?.takeIf { it.isNotBlank() }
62+
?: return@setOnClickListener,
6263
)
6364
)
65+
66+
binding.textInputLayout.editText!!.setText("")
6467
}
6568

6669
binding.button2.setOnClickListener {

app/src/main/res/layout/fragment_dashboard.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
android:layout_width="match_parent"
3636
android:layout_height="wrap_content"
3737
android:hint="Type something..."
38-
android:maxLines="1" />
38+
android:imeOptions="actionDone"
39+
android:maxLines="1"
40+
android:singleLine="true" />
3941
</com.google.android.material.textfield.TextInputLayout>
4042

4143
<Button

app/src/main/res/layout/fragment_home.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
android:layout_width="match_parent"
3636
android:layout_height="wrap_content"
3737
android:hint="Type something..."
38-
android:maxLines="1" />
38+
android:imeOptions="actionDone"
39+
android:maxLines="1"
40+
android:singleLine="true" />
3941
</com.google.android.material.textfield.TextInputLayout>
4042

4143
<Button

app/src/main/res/layout/fragment_notifications.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
<com.google.android.material.divider.MaterialDivider
1717
android:id="@+id/divider"
18-
app:layout_constraintTop_toTopOf="parent"
19-
app:layout_constraintBottom_toBottomOf="parent"
2018
android:layout_width="match_parent"
21-
android:layout_height="1dp" />
19+
android:layout_height="4dp"
20+
app:layout_constraintBottom_toBottomOf="parent"
21+
app:layout_constraintTop_toTopOf="parent" />
2222

2323
<androidx.recyclerview.widget.RecyclerView
2424
android:id="@+id/recycler_dashboard_results"

0 commit comments

Comments
 (0)