>for you to fetch changes up to d19265d8c7cf02fb1342dc5989a8b715dca436f2:>> Resolve "Failed to inflate ..." warnings. (2023-03-14 16:18:30 -0700)>>diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml>index 2a0a0f719..863bd7124 100644>--- a/src/main/res/layout/account_row.xml>+++ b/src/main/res/layout/account_row.xml>@@ -16,6 +16,7 @@> android:layout_height="48dp"> android:layout_alignParentLeft="true"> android:contentDescription="@string/account_image_description">+ app:strokeColor="@null"> app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
What is the significance of setting this to @null ?
Stephen Paul Weber <singpolyma@singpolyma.net> writes:
>>for you to fetch changes up to d19265d8c7cf02fb1342dc5989a8b715dca436f2:>>>> Resolve "Failed to inflate ..." warnings. (2023-03-14 16:18:30 -0700)>>>>diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml>>index 2a0a0f719..863bd7124 100644>>--- a/src/main/res/layout/account_row.xml>>+++ b/src/main/res/layout/account_row.xml>>@@ -16,6 +16,7 @@>> android:layout_height="48dp">> android:layout_alignParentLeft="true">> android:contentDescription="@string/account_image_description">>+ app:strokeColor="@null">> app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />>> What is the significance of setting this to @null ?
I am afraid I do not know. I am neither a Java nor Android expert.
I just monkey patched this based on https://stackoverflow.com/questions/71746801/getting-failed-to-inflate-colorstatelist-leaving-it-to-the-framework-when-usi and the warnings disappeared.
The SO article includes a comment to the effect "The problem is that something in your layout is including a color state list that is invalid". I can dig around and try to figure out what that means for this collection of layouts.
Hugh
hugh@ccss.com writes:
> Stephen Paul Weber <singpolyma@singpolyma.net> writes:
>
>>>for you to fetch changes up to d19265d8c7cf02fb1342dc5989a8b715dca436f2:
>>>
>>> Resolve "Failed to inflate ..." warnings. (2023-03-14 16:18:30 -0700)
>>>
>>>diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml
>>>index 2a0a0f719..863bd7124 100644
>>>--- a/src/main/res/layout/account_row.xml
>>>+++ b/src/main/res/layout/account_row.xml
>>>@@ -16,6 +16,7 @@
>>> android:layout_height="48dp"
>>> android:layout_alignParentLeft="true"
>>> android:contentDescription="@string/account_image_description"
>>>+ app:strokeColor="@null"
>>> app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
>>
>> What is the significance of setting this to @null ?
>
> I am afraid I do not know. I am neither a Java nor Android expert.
...
> I can dig around and try to figure out what that means for
> this collection of layouts.
I must admit, to a broken down system programmer, UI design and layout
seems staggeringly complex :-)
So, there is nothing significant to @null. Seems that strokeColor must
be defined before view layout. I do not see that in writing. And I do
not see it called out in any issue at
https://github.com/material-components/material-components-android/issues
All I have to work on is empirical evidence.
The decent into the exception starts from:
,----
| strokeColor =
| MaterialResources.getColorStateList(
| context, attributes, R.styleable.ShapeableImageView_strokeColor);
`----
in com.google.android.material/material/1.7.0/289bbb3a7fea52532f1163487f9469217ee608a9/material-1.7.0-sources.jar!/com/google/android/material/imageview/ShapeableImageView.java
The full traceback in is my commit log.
I do not *think* the strokeColor is used unless strokeWidth (default 0)
is specified.
Specifying a valid color works as well as null. I have updated my
branch to use "@color/custom_theme_accent". I chose that rather
arbitrarily. Let me know if you would rather a different color.
I tried bumping the com.google.android.material:material release to
1.8.0. Got the same traceback, modulo changing line numbers. The 1.9.0
release cycle is now in alpha.
With the color update, the pull request looks like the following. Let
me know if you are interested is chasing this further.
The following changes since commit cdec63d96b6c7262a28fd03a322e524527e33261:
Do not include fallback quote on direct reply (2023-03-14 14:14:06 -0500)
are available in the Git repository at:
git@git.sr.ht:~hdasch/cheogram-android shapeable-view-warnings
for you to fetch changes up to cf0f1291444bd1211021f06fc5ef8a98905f44c5:
Resolve "Failed to inflate ..." warnings. (2023-03-14 22:25:43 -0700)
----------------------------------------------------------------
Hugh Daschbach (1):
Resolve "Failed to inflate ..." warnings.
src/main/res/layout/account_row.xml | 1 +src/main/res/layout/activity_edit_account.xml | 1 +src/main/res/layout/activity_manage_accounts.xml | 2 ++src/main/res/layout/activity_muc_details.xml | 1 +src/main/res/layout/activity_rtp_session.xml | 1 +src/main/res/layout/contact.xml | 1 +src/main/res/layout/conversation_list_row.xml | 1 +src/main/res/layout/message_received.xml | 1 +src/main/res/layout/message_sent.xml | 1 +src/main/res/layout/message_status.xml | 1 +src/main/res/layout/search_result_item.xml | 1 +
11 files changed, 12 insertions(+)
diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml
index 2a0a0f719..010bbd4be 100644
--- a/src/main/res/layout/account_row.xml+++ b/src/main/res/layout/account_row.xml
@@ -16,6 +16,7 @@
android:layout_height="48dp"
android:layout_alignParentLeft="true"
android:contentDescription="@string/account_image_description"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<LinearLayout
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index c973bd0c9..bb6344d41 100644
--- a/src/main/res/layout/activity_edit_account.xml+++ b/src/main/res/layout/activity_edit_account.xml
@@ -45,6 +45,7 @@
android:layout_alignParentTop="true"
android:layout_marginRight="@dimen/avatar_item_distance"
android:contentDescription="@string/account_image_description"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<LinearLayout
diff --git a/src/main/res/layout/activity_manage_accounts.xml b/src/main/res/layout/activity_manage_accounts.xml
index 0bf7c87e3..b4c7aba2a 100644
--- a/src/main/res/layout/activity_manage_accounts.xml+++ b/src/main/res/layout/activity_manage_accounts.xml
@@ -33,6 +33,7 @@
android:layout_alignParentLeft="true"
android:src="@drawable/ic_call_white_48dp"
android:background="@color/yeller"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<LinearLayout
@@ -66,6 +67,7 @@
android:layout_centerVertical="true"
android:paddingRight="16dp"
android:src="?attr/icon_settings"
+ app:strokeColor="@null" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
</RelativeLayout>
diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml
index 3898ef049..48b9d1a42 100644
--- a/src/main/res/layout/activity_muc_details.xml+++ b/src/main/res/layout/activity_muc_details.xml
@@ -47,6 +47,7 @@
android:layout_width="@dimen/avatar_on_details_screen_size"
android:layout_height="@dimen/avatar_on_details_screen_size"
android:layout_alignParentStart="true"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo"
android:layout_marginEnd="@dimen/avatar_item_distance"
android:layout_alignParentLeft="true"
diff --git a/src/main/res/layout/activity_rtp_session.xml b/src/main/res/layout/activity_rtp_session.xml
index e90fc50f7..29fc02452 100644
--- a/src/main/res/layout/activity_rtp_session.xml+++ b/src/main/res/layout/activity_rtp_session.xml
@@ -104,6 +104,7 @@
android:layout_width="@dimen/publish_avatar_size"
android:layout_height="@dimen/publish_avatar_size"
android:layout_centerInParent="true"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.IncomingCall" />
</RelativeLayout>
diff --git a/src/main/res/layout/contact.xml b/src/main/res/layout/contact.xml
index 279dd6f94..7c8bfbd82 100644
--- a/src/main/res/layout/contact.xml+++ b/src/main/res/layout/contact.xml
@@ -14,6 +14,7 @@
android:layout_height="48dp"
android:layout_alignParentLeft="true"
android:scaleType="centerCrop"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<LinearLayout
diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml
index d3a7d70aa..c59208079 100644
--- a/src/main/res/layout/conversation_list_row.xml+++ b/src/main/res/layout/conversation_list_row.xml
@@ -25,6 +25,7 @@
android:layout_height="56dp"
android:layout_alignParentLeft="true"
android:scaleType="centerCrop"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<RelativeLayout
diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
index 14108646b..7df8f42fd 100644
--- a/src/main/res/layout/message_received.xml+++ b/src/main/res/layout/message_received.xml
@@ -17,6 +17,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:scaleType="fitXY"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<LinearLayout
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index f3675a5dd..4531072d8 100644
--- a/src/main/res/layout/message_sent.xml+++ b/src/main/res/layout/message_sent.xml
@@ -28,6 +28,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<View
diff --git a/src/main/res/layout/message_status.xml b/src/main/res/layout/message_status.xml
index d6dff2fa5..e36adbd48 100644
--- a/src/main/res/layout/message_status.xml+++ b/src/main/res/layout/message_status.xml
@@ -28,6 +28,7 @@
android:layout_marginRight="-1.5dp"
android:padding="0dp"
android:scaleType="fitXY"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<TextView
diff --git a/src/main/res/layout/search_result_item.xml b/src/main/res/layout/search_result_item.xml
index ee6b463a8..b91f95d59 100644
--- a/src/main/res/layout/search_result_item.xml+++ b/src/main/res/layout/search_result_item.xml
@@ -15,6 +15,7 @@
android:layout_height="48dp"
android:layout_alignParentLeft="true"
android:scaleType="centerCrop"
+ app:strokeColor="@color/custom_theme_accent" app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
<RelativeLayout
>for you to fetch changes up to d19265d8c7cf02fb1342dc5989a8b715dca436f2:>> Resolve "Failed to inflate ..." warnings. (2023-03-14 16:18:30 -0700)
Thanks, I have merged this now.