mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
show a placeholder message at the Dialpad activity, if nothing is found
This commit is contained in:
@ -199,6 +199,9 @@ class DialpadActivity : SimpleActivity() {
|
|||||||
}.apply {
|
}.apply {
|
||||||
dialpad_list.adapter = this
|
dialpad_list.adapter = this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialpad_placeholder.beVisibleIf(filtered.isEmpty())
|
||||||
|
dialpad_list.beVisibleIf(filtered.isNotEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||||
|
@ -7,6 +7,23 @@
|
|||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:focusableInTouchMode="true">
|
android:focusableInTouchMode="true">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/dialpad_placeholder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
|
android:paddingEnd="@dimen/activity_margin"
|
||||||
|
android:text="@string/no_contacts_found"
|
||||||
|
android:textSize="@dimen/bigger_text_size"
|
||||||
|
android:textStyle="italic"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||||
android:id="@+id/dialpad_list"
|
android:id="@+id/dialpad_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Reference in New Issue
Block a user