This is updated and refactored version of widget examples.
Original repo: https://github.com/yerenutku/WidgetExamples
This mod uses Kotlin, newer SDK, API and gradle; migrated to AndroidX.
There are 5 examples of Android Widgets based on this article : https://medium.com/@erenutku/android-widgets-ad3d166458d3
Shows how to change widget layout based on it’s approx. size in home screen cells.
Widget Creation Steps with a basic example (opening of a website on widget click).
Broadcast Widget Example (counting clicks on widget).
Configurable Widget Example (getting data before creation and using the data when it’s clicked)
Updating by a JobIntentService Widget Example (updating every minute brings random numbers on widget).