Improved layouts
This commit is contained in:
parent
b5678a1b18
commit
785ae1ad4e
10 changed files with 35 additions and 11 deletions
|
@ -141,9 +141,16 @@
|
|||
android:queryBackground="@color/transparent_color"
|
||||
android:queryHint="@string/contact_filter_hint"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/searchBar"
|
||||
android:background="?attr/dividerColor" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/contactsList"
|
||||
android:layout_toRightOf="@id/tabs_fragment"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_below="@id/searchBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
<ImageView
|
||||
android:onClick="@{editClickListener}"
|
||||
android:enabled="@{!viewModel.callLogs.empty}"
|
||||
android:enabled="@{viewModel.missedCallLogsSelected ? !viewModel.missedCallLogs.empty : !viewModel.callLogs.empty}"
|
||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -150,8 +150,15 @@
|
|||
android:queryBackground="@color/transparent_color"
|
||||
android:queryHint="@string/contact_filter_hint"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/searchBar"
|
||||
android:background="?attr/dividerColor" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/contactsList"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_below="@id/searchBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
|
||||
<ImageView
|
||||
android:onClick="@{editClickListener}"
|
||||
android:enabled="@{!viewModel.callLogs.empty}"
|
||||
android:enabled="@{viewModel.missedCallLogsSelected ? !viewModel.missedCallLogs.empty : !viewModel.callLogs.empty}"
|
||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
android:src="@drawable/chat_send_message" />
|
||||
|
||||
<ImageView
|
||||
android:visibility="@{viewModel.chatRoom.ephemeralEnabled() ? View.VISIBLE : View.GONE}"
|
||||
android:visibility="@{viewModel.chatRoom.ephemeralEnabled() ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:enabled="@{chatSendingViewModel.sendMessageEnabled && !chatSendingViewModel.isReadOnly}"
|
||||
android:contentDescription="@string/content_description_ephemeral_message"
|
||||
android:clickable="false"
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/contact_avatar"
|
||||
android:layout_centerHorizontal="true"
|
||||
app:showSecurityLevel="@{viewModel.encryptedChatRoom}"
|
||||
app:viewModel="@{viewModel}"/>
|
||||
|
||||
|
@ -50,7 +51,9 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/avatar"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:singleLine="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -88,11 +91,11 @@
|
|||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:text="@{String.valueOf(viewModel.unreadMessagesCount)}"
|
||||
android:visibility="@{viewModel.unreadMessagesCount == 0 ? View.GONE : View.VISIBLE}"/>
|
||||
android:visibility="@{viewModel.unreadMessagesCount == 0 ? View.GONE : View.VISIBLE, default=gone}"/>
|
||||
|
||||
<CheckBox
|
||||
android:onClick="@{() -> selectionListViewModel.onToggleSelect(position)}"
|
||||
android:visibility="@{selectionListViewModel.isEditionEnabled ? View.VISIBLE : View.GONE}"
|
||||
android:visibility="@{selectionListViewModel.isEditionEnabled ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:checked="@{selectionListViewModel.selectedItems.contains(position)}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
@ -111,7 +114,7 @@
|
|||
android:maxLines="2" />
|
||||
|
||||
<ImageView
|
||||
android:visibility="@{viewModel.chatRoom.ephemeralEnabled() ? View.VISIBLE : View.GONE}"
|
||||
android:visibility="@{viewModel.chatRoom.ephemeralEnabled() ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:id="@+id/ephemeral"
|
||||
android:contentDescription="@string/content_description_ephemeral_chat_room"
|
||||
android:layout_width="20dp"
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_toLeftOf="@id/right"
|
||||
android:layout_toRightOf="@id/avatar">
|
||||
|
||||
|
|
|
@ -139,10 +139,17 @@
|
|||
android:queryBackground="@color/transparent_color"
|
||||
android:queryHint="@string/contact_filter_hint"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/searchBar"
|
||||
android:background="?attr/dividerColor" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/contactsList"
|
||||
android:layout_above="@id/tabs_fragment"
|
||||
android:layout_below="@id/searchBar"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
|
|
@ -77,10 +77,12 @@
|
|||
android:contentDescription="@{viewModel.iconContentDescription}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:adjustViewBounds="true"
|
||||
android:padding="7dp"/>
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingBottom="7dp"/>
|
||||
|
||||
<org.linphone.contact.ContactAvatarView
|
||||
android:id="@+id/avatar"
|
||||
|
@ -97,7 +99,6 @@
|
|||
style="@style/contact_name_list_cell_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_toRightOf="@id/avatar"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true" />
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
<ImageView
|
||||
android:onClick="@{editClickListener}"
|
||||
android:enabled="@{!viewModel.callLogs.empty}"
|
||||
android:enabled="@{viewModel.missedCallLogsSelected ? !viewModel.missedCallLogs.empty : !viewModel.callLogs.empty}"
|
||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
|
|
Loading…
Reference in a new issue