mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 06:55:42 +03:00
align single/dual-line list item layouts with avatar/icon according to material design
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
9da278538d
commit
dc8774f5c9
9 changed files with 73 additions and 44 deletions
|
@ -2,6 +2,8 @@
|
|||
~ Nextcloud Talk application
|
||||
~
|
||||
~ @author Mario Danic
|
||||
~ @author Andy Scherzinger
|
||||
~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
|
||||
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
|
@ -19,11 +21,15 @@
|
|||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/call_header_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/double_margin_between_elements"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:layout_marginBottom="@dimen/standard_half_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -33,13 +39,13 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/public_call_link"
|
||||
android:layout_width="@dimen/small_item_height"
|
||||
android:layout_height="@dimen/small_item_height"
|
||||
android:layout_width="@dimen/avatar_size"
|
||||
android:layout_height="@dimen/avatar_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_public_black_24px"
|
||||
android:tint="@color/colorPrimary" />
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -49,7 +55,7 @@
|
|||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:text="@string/nc_public_call"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textAppearance="@style/ListItem"
|
||||
tools:text="@string/nc_public_call" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -60,7 +66,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:minHeight="@dimen/small_item_height"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
~ Nextcloud Talk application
|
||||
~
|
||||
~ @author Mario Danic
|
||||
~ @author Andy Scherzinger
|
||||
~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
|
||||
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
|
@ -19,22 +21,25 @@
|
|||
-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/joinConversationViaLinkRelativeLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/double_margin_between_elements"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:layout_marginBottom="@dimen/standard_half_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/joinConversationViaLinkImageView"
|
||||
android:layout_width="@dimen/small_item_height"
|
||||
android:layout_height="@dimen/small_item_height"
|
||||
android:layout_width="@dimen/avatar_size"
|
||||
android:layout_height="@dimen/avatar_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_public_black_24px"
|
||||
android:tint="@color/colorPrimary" />
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -44,7 +49,6 @@
|
|||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:text="@string/nc_join_via_link"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
tools:text="@string/nc_join_via_link" />
|
||||
android:textAppearance="@style/ListItem" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
~
|
||||
~ @author Mario Danic
|
||||
~ @author Andy Scherzinger
|
||||
~ Copyright (C) 2021 Andy Scherzinger
|
||||
~ Copyright (C) 2017 Mario Danic
|
||||
~ Copyright (C) 2017 Andy Scherzinger
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,8 +24,11 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/rv_item_view_height"
|
||||
android:layout_margin="@dimen/margin_between_elements"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:layout_marginBottom="@dimen/standard_half_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
|
@ -34,9 +37,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:contentDescription="@string/selected_list_item"
|
||||
android:src="@drawable/ic_check_black_24dp"
|
||||
android:tint="@color/colorPrimary"
|
||||
android:visibility="gone" />
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
android:id="@+id/name_text"
|
||||
|
@ -46,16 +50,16 @@
|
|||
android:layout_toStartOf="@id/checkedImageView"
|
||||
android:layout_toEndOf="@id/simple_drawee_view"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textAppearance="@style/ListItem"
|
||||
tools:text="Contact item text" />
|
||||
tools:text="Jane Doe" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/simple_drawee_view"
|
||||
android:layout_width="@dimen/small_item_height"
|
||||
android:layout_height="@dimen/small_item_height"
|
||||
android:layout_width="@dimen/avatar_size"
|
||||
android:layout_height="@dimen/avatar_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/double_margin_between_elements"
|
||||
android:layout_marginEnd="@dimen/margin_between_elements"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
app:roundAsCircle="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
~ @author Mario Danic
|
||||
~ @author Andy Scherzinger
|
||||
~ Copyright (C) 2017 Mario Danic
|
||||
~ Copyright (C) 2017 Andy Scherzinger
|
||||
~ Copyright (C) 2017-2021 Andy Scherzinger
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
|
@ -23,9 +23,8 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
android:layout_height="72dp"
|
||||
android:layout_margin="@dimen/standard_margin">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_layout"
|
||||
|
@ -59,7 +58,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/margin_between_elements"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_more_horiz_black_24dp" />
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
~ Nextcloud Talk application
|
||||
~
|
||||
~ @author Mario Danic
|
||||
~ @author Andy Scherzinger
|
||||
~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
|
||||
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
|
@ -20,21 +22,26 @@
|
|||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="@dimen/double_margin_between_elements"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:layout_marginBottom="@dimen/standard_half_margin"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkedImageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:contentDescription="@string/selected_list_item"
|
||||
android:src="@drawable/ic_check_black_24dp"
|
||||
android:tint="@color/colorPrimary" />
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notificationNameTextView"
|
||||
|
@ -44,14 +51,16 @@
|
|||
android:layout_toStartOf="@id/checkedImageView"
|
||||
android:layout_toEndOf="@id/simpleDraweeView"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
android:lines="1"
|
||||
android:textAppearance="@style/ListItem"
|
||||
tools:text="Ringy Gone" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/simpleDraweeView"
|
||||
android:layout_width="@dimen/small_item_height"
|
||||
android:layout_height="@dimen/small_item_height"
|
||||
android:layout_width="@dimen/avatar_size"
|
||||
android:layout_height="@dimen/avatar_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
app:roundAsCircle="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
~ Nextcloud Talk application
|
||||
~
|
||||
~ @author Mario Danic
|
||||
~ @author Andy Scherzinger
|
||||
~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
|
||||
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
|
@ -22,17 +24,19 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/bg_default"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:layout_marginBottom="@dimen/standard_half_margin"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
tools:text="A" />
|
||||
|
||||
<View
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
android:id="@+id/user_info_edit_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:layout_marginStart="@dimen/standard_double_margin"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:autofillHints="none"
|
||||
android:ellipsize="end"
|
||||
|
|
|
@ -389,4 +389,5 @@
|
|||
<string name="tooManyUnreadMessages" translatable="false">999+</string>
|
||||
<string name="nc_action_open_main_menu">Open main menu</string>
|
||||
<string name="failed_to_save">Failed to save %1$s</string>
|
||||
<string name="selected_list_item">selected</string>
|
||||
</resources>
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
</style>
|
||||
|
||||
<style name="ListItem" parent="BottomSheet.ListItem.TextAppearance">
|
||||
<item name="android:textColor">@color/nc_incoming_text_default</item>
|
||||
<item name="android:textColor">@color/conversation_item_header</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="ChipIncomingTextAppearance" parent="TextAppearance.MaterialComponents.Chip">
|
||||
|
|
Loading…
Reference in a new issue