How to add widget configuration activity to launcher?
-
08-10-2019 - |
سؤال
I have a widget with a configuration activity.
Currently the configuration launches when you click on the widget.
I want to add the configuration as an app icon to the launcher.
The problem is that when the configuration launches on click, I get a specific widget id , so each widget instance can have a different configuration.
What will happen if I start the activity from the launcher?
I wont be able to show multiple configurations on the same activity.
Thanks.
المحلول
What will happen if I start the activity from the launcher? I wont be able to show multiple configurations on the same activity.
Correct. Your choices appear to be:
- Display a list of app widgets -- perhaps you have a database table matching up app widget instance ID to some sort of display name
- You don't have the activity in the launcher. For example, put a configuration icon in the app widget itself.
لا تنتمي إلى StackOverflow