I\'ve just finished my Android widget. Now I need to have different sizes of this widget for the user to choose from.
For example, I need a medium, small and large
You need a receiver definition for each type in your manifest file like:
This would allow you to have the same AppWidgetProvider
class be used for multiple widgets, with different widget names and different sizes defined in the
XML.
Now if you need more differences in your widgets than what is in the
XML I would create a base widget class that implements all the common behavoir between the different types:
public abstract class MyBaseWidget extends AppWidgetProvider
And then each of your concrete implementations could extend MyBaseWidget. Then in your manifest file you would have a receiver definition for each of your concrete implementations like: