From 89db867ab3dcefa3870feb178f3addd1c23cbce4 Mon Sep 17 00:00:00 2001 From: Maxime Naturel Date: Thu, 3 Mar 2022 15:41:05 +0100 Subject: [PATCH] Fix attributes style id conflicts --- ...le_location_sharing_option_picker_view.xml | 12 +++---- .../option/LocationSharingOptionView.kt | 12 +++---- .../view_location_sharing_option_picker.xml | 34 +++++++++---------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/library/ui-styles/src/main/res/values/stylable_location_sharing_option_picker_view.xml b/library/ui-styles/src/main/res/values/stylable_location_sharing_option_picker_view.xml index 4b9594d8d3..25b2687fed 100644 --- a/library/ui-styles/src/main/res/values/stylable_location_sharing_option_picker_view.xml +++ b/library/ui-styles/src/main/res/values/stylable_location_sharing_option_picker_view.xml @@ -2,12 +2,12 @@ - - - - - - + + + + + + diff --git a/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionView.kt b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionView.kt index db87a6a82c..d11ff00261 100644 --- a/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionView.kt +++ b/vector/src/main/java/im/vector/app/features/location/option/LocationSharingOptionView.kt @@ -65,17 +65,17 @@ class LocationSharingOptionView @JvmOverloads constructor( } private fun setIcon(typedArray: TypedArray) { - val icon = typedArray.getDrawable(R.styleable.LocationSharingOptionView_icon) - val background = typedArray.getDrawable(R.styleable.LocationSharingOptionView_iconBackground) + val icon = typedArray.getDrawable(R.styleable.LocationSharingOptionView_locShareIcon) + val background = typedArray.getDrawable(R.styleable.LocationSharingOptionView_locShareIconBackground) val backgroundTint = typedArray.getColor( - R.styleable.LocationSharingOptionView_iconBackgroundTint, + R.styleable.LocationSharingOptionView_locShareIconBackgroundTint, ContextCompat.getColor(context, android.R.color.transparent) ) val padding = typedArray.getDimensionPixelOffset( - R.styleable.LocationSharingOptionView_iconPadding, + R.styleable.LocationSharingOptionView_locShareIconPadding, context.resources.getDimensionPixelOffset(R.dimen.location_sharing_option_default_padding) ) - val description = typedArray.getString(R.styleable.LocationSharingOptionView_iconDescription) + val description = typedArray.getString(R.styleable.LocationSharingOptionView_locShareIconDescription) iconView.setImageDrawable(icon) iconView.background = background @@ -85,7 +85,7 @@ class LocationSharingOptionView @JvmOverloads constructor( } private fun setTitle(typedArray: TypedArray) { - val title = typedArray.getString(R.styleable.LocationSharingOptionView_title) + val title = typedArray.getString(R.styleable.LocationSharingOptionView_locShareTitle) binding.shareLocationOptionTitle.text = title } } diff --git a/vector/src/main/res/layout/view_location_sharing_option_picker.xml b/vector/src/main/res/layout/view_location_sharing_option_picker.xml index 87699ea96d..292963d898 100644 --- a/vector/src/main/res/layout/view_location_sharing_option_picker.xml +++ b/vector/src/main/res/layout/view_location_sharing_option_picker.xml @@ -10,16 +10,16 @@ android:id="@+id/locationSharingOptionPinned" android:layout_width="0dp" android:layout_height="wrap_content" - app:icon="@drawable/ic_attachment_location_white" - app:iconPadding="11dp" - app:iconBackground="@drawable/circle" - app:iconBackgroundTint="?colorPrimary" - app:iconDescription="@string/a11y_location_share_option_pinned_icon" app:layout_constraintBottom_toTopOf="@id/locationSharingOptionUserCurrent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:title="@string/location_share_option_pinned" /> + app:locShareIcon="@drawable/ic_attachment_location_white" + app:locShareIconBackground="@drawable/circle" + app:locShareIconBackgroundTint="?colorPrimary" + app:locShareIconDescription="@string/a11y_location_share_option_pinned_icon" + app:locShareIconPadding="11dp" + app:locShareTitle="@string/location_share_option_pinned" /> + app:locShareIconBackground="@drawable/circle" + app:locShareIconBackgroundTint="?colorPrimary" + app:locShareIconDescription="@string/a11y_location_share_option_user_current_icon" + app:locShareIconPadding="3dp" + app:locShareTitle="@string/location_share_option_user_current" /> + app:locShareIcon="@drawable/ic_attachment_location_live_white" + app:locShareIconBackground="@drawable/circle" + app:locShareIconBackgroundTint="?vctr_live_location" + app:locShareIconDescription="@string/a11y_location_share_option_user_live_icon" + app:locShareIconPadding="3dp" + app:locShareTitle="@string/location_share_option_user_live" />