mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-06-05 21:59:19 +02:00
replacing the circles at the widget too
This commit is contained in:
@@ -75,7 +75,7 @@
|
|||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".helpers.MyWidgetProvider"
|
android:name=".helpers.MyWidgetProvider"
|
||||||
android:icon="@drawable/circles_small">
|
android:icon="@drawable/ic_flashlight">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
@@ -69,7 +69,7 @@ class MyWidgetProvider : AppWidgetProvider() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getColoredCircles(context: Context, color: Int, alpha: Int): Bitmap {
|
private fun getColoredCircles(context: Context, color: Int, alpha: Int): Bitmap {
|
||||||
val drawable = context.resources.getColoredDrawableWithColor(R.drawable.circles_small, color, alpha)
|
val drawable = context.resources.getColoredDrawableWithColor(R.drawable.ic_flashlight, color, alpha)
|
||||||
return context.drawableToBitmap(drawable)
|
return context.drawableToBitmap(drawable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,51 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- just an invisible rectangle determining the size of the widget -->
|
|
||||||
<item
|
|
||||||
android:bottom="0px"
|
|
||||||
android:left="0px"
|
|
||||||
android:right="60dp"
|
|
||||||
android:top="60dp">
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:bottom="20dp"
|
|
||||||
android:left="20dp"
|
|
||||||
android:right="20dp"
|
|
||||||
android:top="20dp">
|
|
||||||
<shape
|
|
||||||
android:shape="oval">
|
|
||||||
<stroke
|
|
||||||
android:width="5dp"
|
|
||||||
android:color="@android:color/white"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:bottom="10dp"
|
|
||||||
android:left="10dp"
|
|
||||||
android:right="10dp"
|
|
||||||
android:top="10dp">
|
|
||||||
<shape
|
|
||||||
android:shape="oval">
|
|
||||||
<stroke
|
|
||||||
android:width="5dp"
|
|
||||||
android:color="@android:color/white"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item>
|
|
||||||
<shape
|
|
||||||
android:shape="oval">
|
|
||||||
<stroke
|
|
||||||
android:width="5dp"
|
|
||||||
android:color="@android:color/white"/>
|
|
||||||
<solid android:color="@android:color/transparent"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
|
Reference in New Issue
Block a user