streamline layout for user infos

Fix #7047

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2020-10-06 10:10:37 +02:00
parent 2696df8d46
commit 41056302dd
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
5 changed files with 22 additions and 24 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

@ -21,15 +21,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:layout_height="@dimen/iconized_single_line_item_layout_height"
android:orientation="horizontal">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/iconized_single_line_item_icon_size"
android:layout_height="@dimen/iconized_single_line_item_icon_size"
android:layout_marginStart="@dimen/user_info_icon_horizontal_margin"
android:contentDescription="@string/account_icon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -40,7 +39,8 @@
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/standard_icon_list_horizontal_margin"
android:layout_marginStart="@dimen/user_info_icon_horizontal_margin"
android:layout_marginEnd="@dimen/standard_margin"
android:ellipsize="end"
android:maxLines="3"
android:textAppearance="?android:attr/textAppearanceListItem"

View file

@ -40,15 +40,16 @@
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<ImageView
android:id="@+id/userinfo_icon"
android:layout_width="@dimen/nav_drawer_header_avatar"
android:layout_height="@dimen/nav_drawer_header_avatar"
android:layout_marginStart="@dimen/account_item_layout_user_image_left_start_margin"
android:layout_marginBottom="@dimen/account_item_layout_user_image_left_start_margin"
android:layout_width="@dimen/user_icon_size"
android:layout_height="@dimen/user_icon_size"
android:layout_margin="@dimen/standard_margin"
android:contentDescription="@string/avatar"
android:src="@drawable/account_circle_white"
app:layout_constraintBottom_toBottomOf="parent"
@ -58,8 +59,8 @@
android:id="@+id/userinfo_fullName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/standard_margin"
android:layout_marginEnd="@dimen/standard_margin"
android:ellipsize="end"
android:lines="1"
android:shadowColor="@color/drawer_shadow"
@ -78,6 +79,7 @@
android:id="@+id/userinfo_username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/standard_margin"
android:ellipsize="end"
android:lines="2"
android:shadowColor="@color/drawer_shadow"
@ -97,13 +99,12 @@
android:id="@+id/userinfo_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/standard_margin"
android:orientation="vertical"
android:visibility="gone"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:visibility="visible"
tools:itemCount="3"
tools:listitem="@layout/user_info_details_table_item"
tools:itemCount="3" />
tools:visibility="visible" />
<include layout="@layout/empty_list" />

View file

@ -17,10 +17,5 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="nav_drawer_header_height">164dp</dimen>
<dimen name="nav_drawer_header_avatar">64dp</dimen>
<!-- avatar radius needs to 1/2 of the avatar dp value -->
<dimen name="nav_drawer_header_avatar_radius">32dp</dimen>
<integer name="media_grid_width">4</integer>
</resources>

View file

@ -17,8 +17,8 @@
-->
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="nav_drawer_header_height">140dp</dimen>
<dimen name="nav_drawer_header_avatar">56dp</dimen>
<dimen name="nav_drawer_header_height">164dp</dimen>
<dimen name="nav_drawer_header_avatar_radius">28dp</dimen>
<dimen name="nav_drawer_menu_avatar_radius">12sp</dimen>
<dimen name="list_item_avatar_icon_radius">20dp</dimen>
<dimen name="bottom_sheet_menu_item_divider_standard_margin">56dp</dimen>
@ -33,7 +33,6 @@
<dimen name="standard_quarter_padding">4dp</dimen>
<dimen name="standard_eight_padding">2dp</dimen>
<dimen name="standard_margin">16dp</dimen>
<dimen name="standard_icon_list_horizontal_margin">24dp</dimen>
<dimen name="standard_double_margin">32dp</dimen>
<dimen name="standard_half_margin">8dp</dimen>
<dimen name="standard_quarter_margin">4dp</dimen>
@ -47,6 +46,9 @@
<dimen name="file_list_item_avatar_icon_radius">10dp</dimen>
<dimen name="account_action_layout_height">72dp</dimen>
<dimen name="zero">0dp</dimen>
<dimen name="iconized_single_line_item_layout_height">56dp</dimen>
<dimen name="iconized_single_line_item_icon_size">24dp</dimen>
<dimen name="user_info_icon_horizontal_margin">24dp</dimen>
<dimen name="account_item_layout_height">72dp</dimen>
<dimen name="user_icon_size">40dp</dimen>
<dimen name="user_icon_radius">20dp</dimen>