Added clean search field buttons for conference & chat room creation
This commit is contained in:
parent
8f3b17bb0f
commit
a2d08e7268
3 changed files with 40 additions and 11 deletions
|
@ -112,6 +112,10 @@ open class ContactsSelectionViewModel : MessageNotifierViewModel() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun clearFilter() {
|
||||||
|
filter.value = ""
|
||||||
|
}
|
||||||
|
|
||||||
fun toggleSelectionForSearchResult(searchResult: SearchResult) {
|
fun toggleSelectionForSearchResult(searchResult: SearchResult) {
|
||||||
val address = searchResult.address
|
val address = searchResult.address
|
||||||
if (address != null) {
|
if (address != null) {
|
||||||
|
|
|
@ -160,6 +160,15 @@
|
||||||
android:backgroundTint="@color/transparent_color"
|
android:backgroundTint="@color/transparent_color"
|
||||||
android:hint="@string/contact_filter_hint"/>
|
android:hint="@string/contact_filter_hint"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignTop="@id/searchBar"
|
||||||
|
android:layout_alignRight="@id/searchBar"
|
||||||
|
android:layout_alignBottom="@id/searchBar"
|
||||||
|
android:onClick="@{() -> viewModel.clearFilter()}"
|
||||||
|
android:src="@drawable/field_clean" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
|
@ -216,7 +225,7 @@
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/wait_layout"
|
layout="@layout/wait_layout"
|
||||||
bind:visibility="@{viewModel.waitForChatRoomCreation || viewModel.fetchInProgress}"/>
|
bind:visibility="@{viewModel.waitForChatRoomCreation || viewModel.fetchInProgress}" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,12 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/searchBar"
|
||||||
android:text="@={viewModel.filter}"
|
android:text="@={viewModel.filter}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
|
@ -70,6 +75,17 @@
|
||||||
android:backgroundTint="@color/transparent_color"
|
android:backgroundTint="@color/transparent_color"
|
||||||
android:hint="@string/contact_filter_hint"/>
|
android:hint="@string/contact_filter_hint"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignTop="@id/searchBar"
|
||||||
|
android:layout_alignRight="@id/searchBar"
|
||||||
|
android:layout_alignBottom="@id/searchBar"
|
||||||
|
android:onClick="@{() -> viewModel.clearFilter()}"
|
||||||
|
android:src="@drawable/field_clean" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:id="@+id/layoutContactsSelected"
|
android:id="@+id/layoutContactsSelected"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue