Skip to content

Commit 6f8db7c

Browse files
committed
use a vector asset for flashlight icon
1 parent f51efb0 commit 6f8db7c

File tree

10 files changed

+10
-7
lines changed

10 files changed

+10
-7
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<activity
6464
android:name=".activities.BrightDisplayActivity"
6565
android:exported="false"
66-
android:launchMode="singleInstance"
6766
android:label="@string/bright_display"
67+
android:launchMode="singleInstance"
6868
android:theme="@style/FullScreenTheme" />
6969

7070
<activity
@@ -106,7 +106,7 @@
106106
<receiver
107107
android:name=".helpers.MyWidgetTorchProvider"
108108
android:exported="true"
109-
android:icon="@drawable/ic_flashlight"
109+
android:icon="@drawable/ic_flashlight_vector"
110110
android:label="@string/app_launcher_name">
111111
<intent-filter>
112112
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />

app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyWidgetTorchProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class MyWidgetTorchProvider : AppWidgetProvider() {
6969
}
7070

7171
private fun getColoredIcon(context: Context, color: Int, alpha: Int): Bitmap {
72-
val drawable = context.resources.getColoredDrawableWithColor(R.drawable.ic_flashlight, color, alpha)
72+
val drawable = context.resources.getColoredDrawableWithColor(R.drawable.ic_flashlight_vector, color, alpha)
7373
return context.drawableToBitmap(drawable)
7474
}
7575
}
-3.1 KB
Binary file not shown.
-4.25 KB
Binary file not shown.
-7.81 KB
Binary file not shown.
-11 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="192dp" android:height="192dp" android:viewportWidth="192" android:viewportHeight="192">
2+
<path android:fillColor="#FFFFFFFF" android:fillType="evenOdd" android:pathData="M100.17 30.03c0 2.05-1.66 3.72-3.72 3.72-2.05 0-3.72-1.66-3.72-3.72V13.31c0-2.05 1.66-3.72 3.72-3.72 2.05 0 3.72 1.66 3.72 3.72zM71.24 20c1.69-0.99 3.87-0.42 4.86 1.27l6.58 11.24c0.99 1.69 0.42 3.87-1.27 4.86-1.69 0.99-3.87 0.42-4.86-1.27l-6.58-11.25c-0.99-1.69-0.42-3.87 1.27-4.86zm49.59 0c-1.69-0.99-3.87-0.42-4.86 1.27l-6.58 11.24c-0.99 1.69-0.42 3.87 1.27 4.86 1.69 0.99 3.87 0.42 4.86-1.27l6.58-11.24c0.99-1.69 0.42-3.87-1.27-4.86zm-41.5 66.61c-0.6 1.78-0.93 3.69-0.93 5.68v72.47c0 9.75 7.9 17.65 17.65 17.65 9.75 0 17.65-7.9 17.65-17.65l0.01-72.48c0-2.01-0.34-3.94-0.96-5.74 7.69-4.02 12.93-10.71 15.82-17.95l0.52-1.53 0.01-0.02c0.57-1.65 0.9-2.6 1.33-4.95 1.1-6.04 0.93-7.9 0.46-8.83-2.52-5.05-15.6-9.29-34.84-9.29-19.24 0-35.31 5.04-35.31 10.69v0.42c0 1.69-0.01 3.26 0.47 6.09 0.46 2.79 0.93 4.18 2.32 7.43 3.24 7.55 8.33 14.11 15.8 18.02zm16.72 14.04c-3.59 0-6.5 2.91-6.5 6.5v9.29c0 3.59 2.91 6.5 6.5 6.5s6.5-2.91 6.5-6.5v-9.29c0-3.59-2.91-6.5-6.5-6.5zm27.88-46c-4.65 2.79-12.69 5.11-28.34 5.11s-23.23-2.32-28.34-5.11c3.25-2.32 12.69-5.11 28.34-5.11s25.09 3.25 28.34 5.11z"/>
3+
</vector>

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
android:layout_height="@dimen/main_button_size"
3333
android:layout_marginTop="@dimen/normal_margin"
3434
android:layout_marginBottom="@dimen/normal_margin"
35-
android:background="@drawable/ic_flashlight"
35+
android:background="@drawable/ic_flashlight_vector"
3636
app:layout_constraintBottom_toTopOf="@+id/bright_display_btn"
3737
app:layout_constraintEnd_toEndOf="parent"
3838
app:layout_constraintHorizontal_bias="0.5"

app/src/main/res/layout/widget_torch_config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
android:id="@+id/config_image"
2424
android:layout_width="@dimen/main_button_size"
2525
android:layout_height="@dimen/main_button_size"
26-
android:background="@drawable/ic_flashlight" />
26+
android:background="@drawable/ic_flashlight_vector" />
2727

2828
</RelativeLayout>
2929

app/src/main/res/values/dimens.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22
<dimen name="seekbar_width">250dp</dimen>
3-
<dimen name="main_button_size">150dp</dimen>
4-
<dimen name="smaller_button_size">80dp</dimen>
3+
<dimen name="main_button_size">180dp</dimen>
4+
<dimen name="smaller_button_size">60dp</dimen>
55
<dimen name="shortcut_padding">60dp</dimen>
66

77
<dimen name="sos_text_size">26sp</dimen>

0 commit comments

Comments
 (0)