-
Notifications
You must be signed in to change notification settings - Fork 65
Implement Widget UI #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -1,20 +1,110 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Widgets have a limited set of Views that you can use, definitely not a ConstraintLayout :(
Codecov Report
@@ Coverage Diff @@
## main #20 +/- ##
============================================
- Coverage 39.22% 36.69% -2.54%
Complexity 54 54
============================================
Files 17 17
Lines 232 248 +16
Branches 26 27 +1
============================================
Hits 91 91
- Misses 140 156 +16
Partials 1 1
|
android:minHeight="@dimen/widget_min_height" | ||
android:minResizeWidth="@dimen/widget_min_resizable_width" | ||
android:minResizeHeight="@dimen/widget_min_resizable_height" | ||
android:previewImage="@drawable/widget_preview" | ||
android:resizeMode="horizontal|vertical" | ||
android:updatePeriodMillis="86400000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this update period how often the widget is going to sync with the new saved proxy?
If this is once a day and you change the proxy in the meantime from the app,
will the widget show the right proxy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's a required value when creating the widget to automatically refresh, set as once a day to save battery.
The proxy is updated in real time via a broadcast sent every time you update the proxy from other sources (app, tile, etc)
Why?
We had a placeholder widget while waiting for the designs
What?
Implemented the widget UI, making it a bit resizable.
Added widget preview on the widget selector
Bonus
Fixed a small bug on the tile while launching a new intent.
Some screenshots:



