Skip to content

Commit

Permalink
Update app icon (fixes #27)
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Jan 11, 2019
1 parent 9124072 commit bf9f60e
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Material.Light.DarkActionBar"
tools:ignore="GoogleAppIndexingWarning">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected void onResume() {
return;
}

Intent.ShortcutIconResource icon = Intent.ShortcutIconResource.fromContext(context, R.mipmap.ic_launcher);
Intent.ShortcutIconResource icon = Intent.ShortcutIconResource.fromContext(context, R.drawable.ic_launcher);

Uri scriptUri = new Uri.Builder().scheme("com.termux.file").path(clickedFile.getAbsolutePath()).build();
Intent executeIntent = new Intent(context, TermuxLaunchShortcutActivity.class);
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/drawable-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@android:color/black"/>
<foreground android:drawable="@drawable/ic_foreground"/>
</adaptive-icon>
28 changes: 28 additions & 0 deletions app/src/main/res/drawable/ic_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="108dp"
android:width="108dp"
android:viewportWidth="108"
android:viewportHeight="108">

<!-- Keep in sync with non-adaptive ic_launcher.xml -->
<path
android:fillColor="#FFFFFF"
android:pathData="M34,38
h6
l12,16
l-12,16
h-6
l12,-16
"
/>

<path
android:fillColor="#FFFFFF"
android:pathData="M56,66
h18
v4
h-18
"
/>

</vector>
34 changes: 34 additions & 0 deletions app/src/main/res/drawable/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="108dp"
android:width="108dp"
android:viewportWidth="108"
android:viewportHeight="108">

<path
android:fillColor="#000000"
android:pathData="M18,54
A36,36 0 1,1 90,54
A36,36 0 1,1 18,54 Z" />

<!-- Keep in sync with adaptive ic_foreground.xml: -->
<path
android:fillColor="#FFFFFF"
android:pathData="M34,38
h6
l12,16
l-12,16
h-6
l12,-16
"
/>

<path
android:fillColor="#FFFFFF"
android:pathData="M56,66
h18
v4
h-18
"
/>

</vector>
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Termux:Widget</string>
<string name="shortcut_widget_name">All shortcuts</string>
<string name="single_shortcut_name">Single shortcut</string>
<string name="shortcut_widget_name">Termux widget</string>
<string name="single_shortcut_name">Termux shortcut</string>
<string name="no_shortcut_scripts">No files in\n$HOME/.shortcuts/</string>
<string name="refresh">Refresh</string>
<string name="termux">Termux</string>
Expand Down

0 comments on commit bf9f60e

Please sign in to comment.