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) {
|
||||
val address = searchResult.address
|
||||
if (address != null) {
|
||||
|
|
|
@ -160,6 +160,15 @@
|
|||
android:backgroundTint="@color/transparent_color"
|
||||
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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
@ -216,7 +225,7 @@
|
|||
|
||||
<include
|
||||
layout="@layout/wait_layout"
|
||||
bind:visibility="@{viewModel.waitForChatRoomCreation || viewModel.fetchInProgress}"/>
|
||||
bind:visibility="@{viewModel.waitForChatRoomCreation || viewModel.fetchInProgress}" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
@ -58,17 +58,33 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:text="@={viewModel.filter}"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:inputType="textPersonName"
|
||||
android:layout_margin="10dp"
|
||||
android:drawableLeft="@drawable/search"
|
||||
android:drawablePadding="10dp"
|
||||
android:background="@color/transparent_color"
|
||||
android:backgroundTint="@color/transparent_color"
|
||||
android:hint="@string/contact_filter_hint"/>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/searchBar"
|
||||
android:text="@={viewModel.filter}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:inputType="textPersonName"
|
||||
android:layout_margin="10dp"
|
||||
android:drawableLeft="@drawable/search"
|
||||
android:drawablePadding="10dp"
|
||||
android:background="@color/transparent_color"
|
||||
android:backgroundTint="@color/transparent_color"
|
||||
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
|
||||
android:id="@+id/layoutContactsSelected"
|
||||
|
|
Loading…
Reference in a new issue