mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-01-29 17:59:26 +01:00
use a vector asset for bright display
This commit is contained in:
parent
cc156d4152
commit
f51efb05cc
@ -120,7 +120,7 @@
|
||||
<receiver
|
||||
android:name=".helpers.MyWidgetBrightDisplayProvider"
|
||||
android:exported="true"
|
||||
android:icon="@drawable/ic_bright_display"
|
||||
android:icon="@drawable/ic_bright_display_vector"
|
||||
android:label="@string/bright_display">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
|
@ -44,7 +44,7 @@ class MyWidgetBrightDisplayProvider : AppWidgetProvider() {
|
||||
}
|
||||
|
||||
private fun getColoredIcon(context: Context, color: Int, alpha: Int): Bitmap {
|
||||
val drawable = context.resources.getColoredDrawableWithColor(R.drawable.ic_bright_display, color, alpha)
|
||||
val drawable = context.resources.getColoredDrawableWithColor(R.drawable.ic_bright_display_vector, color, alpha)
|
||||
return context.drawableToBitmap(drawable)
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
3
app/src/main/res/drawable/ic_bright_display_vector.xml
Normal file
3
app/src/main/res/drawable/ic_bright_display_vector.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="192dp" android:height="192dp" android:viewportWidth="192" android:viewportHeight="192">
|
||||
<path android:fillColor="#FFFFFFFF" android:fillType="evenOdd" android:pathData="M46.77 25.69c0-6.38 5.17-11.56 11.56-11.56h76.08c6.38 0 11.56 5.17 11.56 11.56l-0.01 140.62c0 6.38-5.17 11.56-11.56 11.56l-76.08-0.01c-6.38 0-11.56-5.17-11.56-11.56zm9.63 7.71c0-4.26 3.45-7.7 7.7-7.7h64.53c4.25 0 7.7 3.45 7.7 7.7v123.27c0 4.25-3.45 7.7-7.7 7.7l-64.53 0.01c-4.26 0-7.7-3.45-7.7-7.7zm9.63 2.89h60.67v117.5H66.03zm-53.75 9.29l23.78 8.57-3.08 8.54L9.2 54.11zm168.08 0l-23.78 8.57 3.08 8.54 23.77-8.58zm-144.3 84l-23.78 8.57-3.08-8.54 23.78-8.57zm144.27 8.57l-23.77-8.57 3.08-8.54 23.77 8.57zM163.3 96.41h25.27v-9.07H163.3zm-134.6 0H3.43v-9.08H28.7z"/>
|
||||
</vector>
|
@ -7,10 +7,10 @@
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:bottom="@dimen/normal_margin"
|
||||
android:drawable="@drawable/ic_bright_display"
|
||||
android:left="@dimen/normal_margin"
|
||||
android:right="@dimen/normal_margin"
|
||||
android:top="@dimen/normal_margin" />
|
||||
android:bottom="@dimen/shortcut_padding"
|
||||
android:drawable="@drawable/ic_bright_display_vector"
|
||||
android:left="@dimen/shortcut_padding"
|
||||
android:right="@dimen/shortcut_padding"
|
||||
android:top="@dimen/shortcut_padding" />
|
||||
|
||||
</layer-list>
|
||||
|
@ -41,11 +41,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bright_display_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/smaller_button_size"
|
||||
android:layout_height="@dimen/smaller_button_size"
|
||||
android:layout_marginTop="@dimen/normal_margin"
|
||||
android:layout_marginBottom="@dimen/normal_margin"
|
||||
android:background="@drawable/ic_bright_display"
|
||||
android:background="@drawable/ic_bright_display_vector"
|
||||
android:padding="@dimen/activity_margin"
|
||||
app:layout_constraintBottom_toTopOf="@+id/sos_btn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -72,8 +72,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/stroboscope_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/smaller_button_size"
|
||||
android:layout_height="@dimen/smaller_button_size"
|
||||
android:layout_marginTop="@dimen/normal_margin"
|
||||
android:background="@drawable/ic_stroboscope"
|
||||
android:padding="@dimen/activity_margin"
|
||||
|
@ -23,7 +23,7 @@
|
||||
android:id="@+id/config_image"
|
||||
android:layout_width="@dimen/main_button_size"
|
||||
android:layout_height="@dimen/main_button_size"
|
||||
android:background="@drawable/ic_bright_display" />
|
||||
android:background="@drawable/ic_bright_display_vector" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
<resources>
|
||||
<dimen name="seekbar_width">250dp</dimen>
|
||||
<dimen name="main_button_size">150dp</dimen>
|
||||
<dimen name="smaller_button_size">80dp</dimen>
|
||||
<dimen name="shortcut_padding">60dp</dimen>
|
||||
|
||||
<dimen name="sos_text_size">26sp</dimen>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user