Widget Settings Icon - Homescreen - Widget - Icon

me again; =)

I am trying to set a specific (different from the start) icon for my widget configuration. It appears when you click on your desktop:
LongClick β†’ Widgets β†’ Icon + Widget Config Title

I tried installing it through Manifest.xml

<activity android:name=".xxx" android:windowSoftInputMode="stateHidden" android:icon="@drawable/widget_icon_link" 

but has no effect.
Searched, but still did not find anything.

Thanks for any advice: =)
with best wishes,
mike :)

+4
source share
1 answer

I had the same problem. I tried to add a shortcut and icon to the file "@ xml / widget_info" (android: resource attribute in the recipient metadata for widgets im Manifest.xml. Does not work.

Then I saw your post and noticed that you included it in action. So I played with him and finally realized that he should be in the receiver itself:

 <receiver android:name=".WidgetProvider" android:label="@string/widget_label" android:icon="@drawable/widget_icon"> ... 

It works like magic.

Yair

kwazi is blogging

+5
source

Source: https://habr.com/ru/post/1341276/


All Articles