- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2022 01:26 AM
@Mehdi BEN ABDESSELEM ,
Steps for Creating a Basic Widget
Step 1: Create a New Project
To create a new project in Android Studio, please refer to How to Create/Start a New Project in Android Studio. We are implementing it for both Java and Kotlin languages.
Step 2: Add the App Widget to the Project
Right-Click on the app, move the cursor to new, find the “Widget” option at the end, and select it.
Specify the required properties for the widget, such as min. Width and height, config file, and preferred language proceed. Files are automatically generated.
Step 3: Install and Run the Code
Install and Run the code on Android Virtual Device (AVD) or a personal device.
Open the widget section of the phone, lookup for a widget with the Application name, select it, and bring it to the home screen.
Try changing the dimensions, and we are done!
This may help you,
Rachel Gomez