mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-22 16:23:09 +02:00
Add some transparency to widget indicator
Makes the corners look slighty rounded and blends in a bit with the shadow below the widget.
This commit is contained in:
@@ -87,7 +87,10 @@ public class WidgetProvider extends AppWidgetProvider {
|
|||||||
|
|
||||||
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);
|
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);
|
||||||
|
|
||||||
views.setInt(R.id.indicator_view, "setBackgroundColor", measurementView.getIndicatorColor());
|
// Add some transparency to make the corners appear rounded
|
||||||
|
int indicatorColor = measurementView.getIndicatorColor();
|
||||||
|
indicatorColor = (180 << 24) | (indicatorColor & 0xffffff);
|
||||||
|
views.setInt(R.id.indicator_view, "setBackgroundColor", indicatorColor);
|
||||||
|
|
||||||
// Show icon in >= two cell mode
|
// Show icon in >= two cell mode
|
||||||
if (minWidth >= twoCellsMinWidth) {
|
if (minWidth >= twoCellsMinWidth) {
|
||||||
|
Reference in New Issue
Block a user