1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-19 23:12:12 +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:
Erik Johansson
2018-05-10 23:00:20 +02:00
parent f9eddace5f
commit 2acf8e58e6

View File

@@ -87,7 +87,10 @@ public class WidgetProvider extends AppWidgetProvider {
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
if (minWidth >= twoCellsMinWidth) {