Skip to content

Commit cfa3bb6

Browse files
author
LeanBitLab
committed
chore(release): version 1.1 + branding + fixes
1 parent 3090d6e commit cfa3bb6

24 files changed

+261
-52
lines changed

README.md

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,63 @@
11
# Lwidget
22

3-
**Lwidget** is a modern, open-source Android widget built with Kotlin and Material 3 design principles. It provides essential information at a glance while adhering to your device's dynamic theme.
3+
<picture>
4+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/banner_dark.svg">
5+
<source media="(prefers-color-scheme: light)" srcset="docs/images/banner_light.svg">
6+
<img alt="Lwidget Banner" src="docs/images/banner_light.svg">
7+
</picture>
48

5-
## ✨ Features
6-
- **Material You**: Full dynamic color support.
7-
- **Configurable**: Adjust text sizes and visibility for all elements.
8-
- **Essential Info**: Time, Date, Battery, Device Temp, and Calendar Events.
9-
- **Light/Dark Mode**: Fully supported with optimized contrast (Dark text on Light, Light text on Dark).
10-
- **Privacy Focused**: No internet permission required.
9+
[![Download](https://img.shields.io/github/v/release/LeanBitLab/Lwidget?label=Download&style=for-the-badge&color=7C4DFF)](https://github.com/LeanBitLab/Lwidget/releases/latest) [![Stars](https://img.shields.io/github/stars/LeanBitLab/Lwidget?style=for-the-badge&color=7C4DFF)](https://github.com/LeanBitLab/Lwidget/stargazers)
1110

12-
## 🛠️ Built With
13-
- **Language**: Kotlin
14-
- **UI**: Android standard Views (RemoteViews compatible) & Material Components
15-
- **License**: GPLv3
11+
**Lwidget** is a modern, open-source Android widget built with **Kotlin** and **Material 3** design principles. It provides essential information at a glance while adhering to your device's dynamic theme.
1612

17-
## 📦 Installation
18-
Download the latest APK from the [Releases](../../releases) page or build from source.
13+
## Screenshots
1914

20-
## 🤝 Contributing
21-
Contributions are welcome! Please check the issues page.
15+
<table>
16+
<tr>
17+
<td><img src="docs/images/1.png" height="500" alt="Screenshot 1"/></td>
18+
<td><img src="docs/images/2.png" height="500" alt="Screenshot 2"/></td>
19+
<td><img src="docs/images/3.png" height="500" alt="Screenshot 3"/></td>
20+
</tr>
21+
</table>
2222

23-
## 📄 License
24-
Copyright (C) 2026 LeanBitLab
23+
## Features
2524

26-
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
25+
- **Material You**: Full dynamic color support.
26+
- **Configurable**: Adjust text sizes and visibility for all elements.
27+
- **Essential Info**: Time, Date, Battery, Device Temp, and Calendar Events.
28+
- **Light/Dark Mode**: Optimized contrast for readability.
29+
- **Privacy Focused**: No internet permission required.
30+
- **Glow Effect**: Multiple layers of transparency for a smooth outline glow.
2731

28-
See [LICENSE](LICENSE) for more details.
32+
## Download
33+
34+
You can download the latest release from the [GitHub Releases](https://github.com/LeanBitLab/Lwidget/releases) page.
35+
36+
## Setup
37+
38+
- **Permissions**: The widget requires `Calendar` permission to display upcoming events. It will prompt you when needed.
39+
- **Battery Optimization**: For reliable updates, ensure battery optimization is disabled for Lwidget.
40+
41+
## License
42+
43+
Lwidget is licensed under **GNU General Public License v3.0**.
44+
45+
See [LICENSE](LICENSE) file.
46+
47+
## Credits
48+
49+
- Built with ❤️ by [LeanBitLab](https://github.com/LeanBitLab)
50+
51+
## Support the Development
52+
53+
Building and maintaining open-source apps takes time and resources. If you love Lwidget, please consider supporting the project!
54+
55+
<a href="https://github.com/sponsors/LeanBitLab">
56+
<img src="https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86" width="150" alt="Sponsor on GitHub"/>
57+
</a>
58+
59+
Your support keeps the code **100% Free and Open Source**.
2960

3061
---
31-
*Maintained by [LeanBitLab](https://github.com/LeanBitLab)*
62+
63+
*Lwidget • Modern Material You Widget*

app/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId = "com.leanbitlab.lwidget"
1515
minSdk = 26
1616
targetSdk = 34
17-
versionCode = 1
18-
versionName = "1.0"
17+
versionCode = 2
18+
versionName = "1.1"
1919
}
2020

2121
signingConfigs {
@@ -39,6 +39,10 @@ android {
3939
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
4040
signingConfig = signingConfigs.getByName("release")
4141
}
42+
debug {
43+
applicationIdSuffix = ".debug"
44+
versionNameSuffix = "-DEBUG"
45+
}
4246
}
4347
compileOptions {
4448
sourceCompatibility = JavaVersion.VERSION_17

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<activity
3939
android:name=".MainActivity"
4040
android:exported="true"
41+
android:launchMode="singleTask"
4142
android:theme="@style/Theme.Lwidget">
4243
<intent-filter>
4344
<action android:name="android.intent.action.MAIN" />

app/src/main/java/com/leanbitlab/lwidget/AwidgetProvider.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ class AwidgetProvider : AppWidgetProvider() {
105105

106106
val showEvents = prefs.getBoolean("show_events", true)
107107
val sizeEvents = prefs.getFloat("size_events", 14f)
108+
109+
val showOutline = prefs.getBoolean("show_outline", false)
110+
111+
// --- Apply Outline ---
112+
views.setInt(R.id.widget_root, "setBackgroundResource", if (showOutline) R.drawable.background_glow else R.drawable.background_dark)
108113

109114
// --- Apply Time ---
110115
views.setViewVisibility(R.id.clock_time, if (showTime) android.view.View.VISIBLE else android.view.View.GONE)
@@ -157,7 +162,8 @@ class AwidgetProvider : AppWidgetProvider() {
157162
// Battery -> Battery Usage
158163
val batteryIntent = Intent(Intent.ACTION_POWER_USAGE_SUMMARY)
159164
val batteryPendingIntent = PendingIntent.getActivity(context, 2, batteryIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
160-
views.setOnClickPendingIntent(R.id.info_panel, batteryPendingIntent)
165+
views.setOnClickPendingIntent(R.id.text_battery, batteryPendingIntent)
166+
views.setOnClickPendingIntent(R.id.text_temp, batteryPendingIntent)
161167

162168
// --- Calendar Events ---
163169
views.setViewVisibility(R.id.events_container, if (showEvents) android.view.View.VISIBLE else android.view.View.GONE)

app/src/main/java/com/leanbitlab/lwidget/MainActivity.kt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ class MainActivity : AppCompatActivity() {
9696

9797
// Events: Def True, 14sp, Max 48sp
9898
bindSection(R.id.section_events, "Events", "show_events", true, "size_events", 14f, 10f, 48f)
99+
100+
// Outline Glow: Def False
101+
bindToggle(R.id.section_outline, "Outline Glow", "show_outline", false)
99102
}
100103

101104
private fun bindSection(
@@ -144,6 +147,30 @@ class MainActivity : AppCompatActivity() {
144147
}
145148
}
146149

150+
private fun bindToggle(
151+
sectionId: Int,
152+
title: String,
153+
prefShowKey: String,
154+
defShow: Boolean
155+
) {
156+
val section = findViewById<View>(sectionId)
157+
val tvTitle = section.findViewById<TextView>(R.id.item_title)
158+
val switch = section.findViewById<SwitchMaterial>(R.id.item_switch)
159+
val sizeContainer = section.findViewById<View>(R.id.size_container)
160+
161+
tvTitle.text = title
162+
sizeContainer.visibility = View.GONE
163+
164+
// Load Toggle
165+
val isShown = prefs.getBoolean(prefShowKey, defShow)
166+
switch.isChecked = isShown
167+
168+
switch.setOnCheckedChangeListener { _, isChecked ->
169+
prefs.edit().putBoolean(prefShowKey, isChecked).apply()
170+
updateWidget() // Live update
171+
}
172+
}
173+
147174
private fun updateWidget() {
148175
// Animation: Subtle Outline Shine
149176
val fab = findViewById<ExtendedFloatingActionButton>(R.id.fab_update)

app/src/main/res/color/glow_05.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:color="@color/widget_outline" android:alpha="0.05" />
4+
</selector>

app/src/main/res/color/glow_30.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:color="@color/widget_outline" android:alpha="0.30" />
4+
</selector>

app/src/main/res/color/glow_75.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:color="@color/widget_outline" android:alpha="0.75" />
4+
</selector>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:color="@color/widget_outline" android:alpha="0.5" />
4+
</selector>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:color="@color/widget_outline" android:alpha="0.15" />
4+
</selector>

0 commit comments

Comments
 (0)