A3DWidget is a simple Android application that demonstrates how to create and configure an App Widget using a configuration activity. The app allows users to enter custom text through an EditText and then add the widget to the home screen using a button. The widget will then display the entered text.
- Android App Widget with a configuration screen
EditTextinput andButtonto submit data- Saves custom widget text using
SharedPreferences - Demonstrates XML layout creation for widgets and configuration activities
Amarjeet Kumar
UID: 21BCS10768
Department of Computer Science & Engineering
Chandigarh University
Portfolio: https://amarjeetkr.vercel.app/
LinkTree: https://linktr.ee/AmarjeetKumarJyotish
GitHub: https://github.com/AmarjeetJyotis
LinkedIn: https://www.linkedin.com/in/amarjeet-jyotish/
GeeksforGeeks: https://www.geeksforgeeks.org/user/amarjeetjyotish/
LeetCode: https://leetcode.com/u/AmarjeetJyotish/
app/
├── java/
│ └── com.example.a3rdwidget/
│ ├── MainActivity.java
│ ├── A3DWidget.java (AppWidgetProvider)
│ └── A3DWidgetConfigureActivity.java (Configuration screen logic)
├── res/
│ ├── layout/
│ │ ├── activity_main.xml
│ │ ├── amarjeet_widget.xml (Widget layout)
│ │ └── amarjeet_widget_configure.xml (Configure screen layout)
│ ├── values/
│ │ └── strings.xml
│ └── xml/
│ └── widget_info.xml (Widget metadata)
🛠️ Technologies Used
Java
Android SDK
AppWidgetProvider
SharedPreferences
XML-based UI Layouts
🚀 How to Run
Clone or download the project.
Open the project in Android Studio.
Build and run the project on an emulator or physical device.
Add the widget from the widget selector screen.
Enter your custom text in the configuration screen and press "Add widget".
The widget will be added to your home screen showing the text.
📂 Key Files Explained
amarjeet_widget_configure.xml: UI layout for configuring the widget (includes TextView, EditText, and Button)
A3DWidgetConfigureActivity.java: Stores input from user and applies it to the widget using AppWidgetManager
A3DWidget.java: Handles the widget display logic
widget_info.xml: Declares widget dimensions, preview layout, and configuration activity
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.

