improved round avatar

(cherry picked from commit 3f6a79f4e6)
This commit is contained in:
Arne 2023-02-06 00:26:02 +01:00
parent 33a974b231
commit f69b55b2e6
11 changed files with 19 additions and 15 deletions

View file

@ -18,7 +18,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:contentDescription="@string/account_image_description" android:contentDescription="@string/account_image_description"
app:riv_corner_radius="2dp" /> app:riv_corner_radius="30dp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"> xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/tools"
app:ignore="NamespaceTypo">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -64,7 +66,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<QuickContactBadge <com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/details_contact_badge" android:id="@+id/details_contact_badge"
android:layout_width="@dimen/avatar_on_details_screen_size" android:layout_width="@dimen/avatar_on_details_screen_size"
android:layout_height="@dimen/avatar_on_details_screen_size" android:layout_height="@dimen/avatar_on_details_screen_size"
@ -73,6 +75,7 @@
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="?attr/color_border" android:background="?attr/color_border"
android:padding="1dp" android:padding="1dp"
app:riv_corner_radius="30dp"
android:scaleType="centerCrop" /> android:scaleType="centerCrop" />
<LinearLayout <LinearLayout

View file

@ -302,7 +302,7 @@
android:maxWidth="@dimen/avatar_on_details_screen_size" android:maxWidth="@dimen/avatar_on_details_screen_size"
android:maxHeight="@dimen/avatar_on_details_screen_size" android:maxHeight="@dimen/avatar_on_details_screen_size"
android:visibility="gone" android:visibility="gone"
app:riv_corner_radius="@dimen/rounded_image_border" /> app:riv_corner_radius="90dp" />
</RelativeLayout> </RelativeLayout>
<CheckBox <CheckBox

View file

@ -74,7 +74,7 @@
android:layout_marginRight="@dimen/avatar_item_distance" android:layout_marginRight="@dimen/avatar_item_distance"
android:padding="1dp" android:padding="1dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:riv_corner_radius="@dimen/rounded_image_border" /> app:riv_corner_radius="30dp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -355,7 +355,7 @@
android:layout_alignParentEnd="false" android:layout_alignParentEnd="false"
android:layout_alignParentRight="false" android:layout_alignParentRight="false"
android:padding="1dp" android:padding="1dp"
app:riv_corner_radius="@dimen/rounded_image_border" /> app:riv_corner_radius="30dp" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -15,7 +15,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:riv_corner_radius="@dimen/rounded_avatar_border" /> app:riv_corner_radius="30dp" />
<ImageView <ImageView
android:id="@+id/user_active_indicator" android:id="@+id/user_active_indicator"

View file

@ -28,7 +28,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:riv_corner_radius="@dimen/rounded_avatar_border" /> app:riv_corner_radius="30dp" />
<ImageView <ImageView
android:id="@+id/user_active_indicator" android:id="@+id/user_active_indicator"

View file

@ -20,7 +20,7 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:scaleType="fitXY" android:scaleType="fitXY"
app:riv_corner_radius="@dimen/rounded_avatar_border" /> app:riv_corner_radius="30dp" />
<LinearLayout <LinearLayout
android:id="@+id/message_box" android:id="@+id/message_box"

View file

@ -26,7 +26,7 @@
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:scaleType="fitXY" android:scaleType="fitXY"
app:riv_corner_radius="@dimen/rounded_avatar_border" /> app:riv_corner_radius="30dp" />
<View <View
android:id="@+id/placeholder" android:id="@+id/placeholder"

View file

@ -33,7 +33,7 @@
android:padding="0dp" android:padding="0dp"
android:scaleType="fitXY" android:scaleType="fitXY"
android:visibility="gone" android:visibility="gone"
app:riv_corner_radius="@dimen/rounded_image_border" /> app:riv_corner_radius="30dp" />
<TextView <TextView
android:id="@+id/status_message" android:id="@+id/status_message"

View file

@ -16,7 +16,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:riv_corner_radius="2dp" /> app:riv_corner_radius="30dp" />
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -1,17 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"> <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<eu.siacs.conversations.ui.widget.SquareFrameLayout <eu.siacs.conversations.ui.widget.SquareFrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?selectableItemBackground" android:background="?selectableItemBackground"
android:padding="2dp"> android:padding="2dp">
<ImageView <com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar" android:id="@+id/avatar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black54" android:background="@color/black54"
app:riv_corner_radius="30dp"
android:scaleType="centerInside" /> android:scaleType="centerInside" />
</eu.siacs.conversations.ui.widget.SquareFrameLayout> </eu.siacs.conversations.ui.widget.SquareFrameLayout>
</layout> </layout>