Reputation: 279
I have built a widget with a ConfigurationActivity. Everything works great, but the problem is that I can't reconfigure it and change its setting after creation. Other widgets like the weather app or the calendar app give an option when you long-press on them (Alongside "Remove From Home" and "App Info") which is "Widget Setting" that is opening their ConfigurationActivity. How can I add this option? In the following ScreenShot, there is a "Widget Setting" option that is missing from my app.
Upvotes: 1
Views: 962
Reputation: 279
After some digging in, I found the answer to my question. This feature is added only on API level 28, and that's probably why there isn't enough documentation around it.
Open your_widget_info.xml
file, inside appwidget-provider
tag, add this line.
android:widgetFeatures="reconfigurable"
That will do the job for you.
Upvotes: 6