Skip to content

Commit 912635c

Browse files
committed
adding colored launcher icons
1 parent abbf666 commit 912635c

File tree

123 files changed

+361
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+361
-5
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,252 @@
9494
android:name="android.appwidget.provider"
9595
android:resource="@xml/widget_info"/>
9696
</receiver>
97+
98+
<!-- Do not append ".Orange" to the default alias "name", it would remove the old homescreen launcher of users at upgrade -->
99+
<activity-alias
100+
android:name=".activities.SplashActivity"
101+
android:enabled="true"
102+
android:icon="@mipmap/ic_launcher"
103+
android:roundIcon="@mipmap/ic_launcher"
104+
android:targetActivity=".activities.SplashActivity">
105+
<intent-filter>
106+
<action android:name="android.intent.action.MAIN"/>
107+
<category android:name="android.intent.category.LAUNCHER"/>
108+
</intent-filter>
109+
</activity-alias>
110+
111+
<activity-alias
112+
android:name=".activities.SplashActivity.Red"
113+
android:enabled="false"
114+
android:icon="@mipmap/ic_launcher_red"
115+
android:roundIcon="@mipmap/ic_launcher_red"
116+
android:targetActivity=".activities.SplashActivity">
117+
118+
<intent-filter>
119+
<action android:name="android.intent.action.MAIN"/>
120+
<category android:name="android.intent.category.LAUNCHER"/>
121+
</intent-filter>
122+
</activity-alias>
123+
124+
<activity-alias
125+
android:name=".activities.SplashActivity.Pink"
126+
android:enabled="false"
127+
android:icon="@mipmap/ic_launcher_pink"
128+
android:roundIcon="@mipmap/ic_launcher_pink"
129+
android:targetActivity=".activities.SplashActivity">
130+
131+
<intent-filter>
132+
<action android:name="android.intent.action.MAIN"/>
133+
<category android:name="android.intent.category.LAUNCHER"/>
134+
</intent-filter>
135+
</activity-alias>
136+
137+
<activity-alias
138+
android:name=".activities.SplashActivity.Purple"
139+
android:enabled="false"
140+
android:icon="@mipmap/ic_launcher_purple"
141+
android:roundIcon="@mipmap/ic_launcher_purple"
142+
android:targetActivity=".activities.SplashActivity">
143+
144+
<intent-filter>
145+
<action android:name="android.intent.action.MAIN"/>
146+
<category android:name="android.intent.category.LAUNCHER"/>
147+
</intent-filter>
148+
</activity-alias>
149+
150+
<activity-alias
151+
android:name=".activities.SplashActivity.Deep_purple"
152+
android:enabled="false"
153+
android:icon="@mipmap/ic_launcher_deep_purple"
154+
android:roundIcon="@mipmap/ic_launcher_deep_purple"
155+
android:targetActivity=".activities.SplashActivity">
156+
157+
<intent-filter>
158+
<action android:name="android.intent.action.MAIN"/>
159+
<category android:name="android.intent.category.LAUNCHER"/>
160+
</intent-filter>
161+
</activity-alias>
162+
163+
<activity-alias
164+
android:name=".activities.SplashActivity.Indigo"
165+
android:enabled="false"
166+
android:icon="@mipmap/ic_launcher_indigo"
167+
android:roundIcon="@mipmap/ic_launcher_indigo"
168+
android:targetActivity=".activities.SplashActivity">
169+
170+
<intent-filter>
171+
<action android:name="android.intent.action.MAIN"/>
172+
<category android:name="android.intent.category.LAUNCHER"/>
173+
</intent-filter>
174+
</activity-alias>
175+
176+
<activity-alias
177+
android:name=".activities.SplashActivity.Blue"
178+
android:enabled="false"
179+
android:icon="@mipmap/ic_launcher_blue"
180+
android:roundIcon="@mipmap/ic_launcher_blue"
181+
android:targetActivity=".activities.SplashActivity">
182+
183+
<intent-filter>
184+
<action android:name="android.intent.action.MAIN"/>
185+
<category android:name="android.intent.category.LAUNCHER"/>
186+
</intent-filter>
187+
</activity-alias>
188+
189+
<activity-alias
190+
android:name=".activities.SplashActivity.Light_blue"
191+
android:enabled="false"
192+
android:icon="@mipmap/ic_launcher_light_blue"
193+
android:roundIcon="@mipmap/ic_launcher_light_blue"
194+
android:targetActivity=".activities.SplashActivity">
195+
196+
<intent-filter>
197+
<action android:name="android.intent.action.MAIN"/>
198+
<category android:name="android.intent.category.LAUNCHER"/>
199+
</intent-filter>
200+
</activity-alias>
201+
202+
<activity-alias
203+
android:name=".activities.SplashActivity.Cyan"
204+
android:enabled="false"
205+
android:icon="@mipmap/ic_launcher_cyan"
206+
android:roundIcon="@mipmap/ic_launcher_cyan"
207+
android:targetActivity=".activities.SplashActivity">
208+
209+
<intent-filter>
210+
<action android:name="android.intent.action.MAIN"/>
211+
<category android:name="android.intent.category.LAUNCHER"/>
212+
</intent-filter>
213+
</activity-alias>
214+
215+
<activity-alias
216+
android:name=".activities.SplashActivity.Teal"
217+
android:enabled="false"
218+
android:icon="@mipmap/ic_launcher_teal"
219+
android:roundIcon="@mipmap/ic_launcher_teal"
220+
android:targetActivity=".activities.SplashActivity">
221+
222+
<intent-filter>
223+
<action android:name="android.intent.action.MAIN"/>
224+
<category android:name="android.intent.category.LAUNCHER"/>
225+
</intent-filter>
226+
</activity-alias>
227+
228+
<activity-alias
229+
android:name=".activities.SplashActivity.Green"
230+
android:enabled="false"
231+
android:icon="@mipmap/ic_launcher_green"
232+
android:roundIcon="@mipmap/ic_launcher_green"
233+
android:targetActivity=".activities.SplashActivity">
234+
235+
<intent-filter>
236+
<action android:name="android.intent.action.MAIN"/>
237+
<category android:name="android.intent.category.LAUNCHER"/>
238+
</intent-filter>
239+
</activity-alias>
240+
241+
<activity-alias
242+
android:name=".activities.SplashActivity.Light_green"
243+
android:enabled="false"
244+
android:icon="@mipmap/ic_launcher_light_green"
245+
android:roundIcon="@mipmap/ic_launcher_light_green"
246+
android:targetActivity=".activities.SplashActivity">
247+
248+
<intent-filter>
249+
<action android:name="android.intent.action.MAIN"/>
250+
<category android:name="android.intent.category.LAUNCHER"/>
251+
</intent-filter>
252+
</activity-alias>
253+
254+
<activity-alias
255+
android:name=".activities.SplashActivity.Lime"
256+
android:enabled="false"
257+
android:icon="@mipmap/ic_launcher_lime"
258+
android:roundIcon="@mipmap/ic_launcher_lime"
259+
android:targetActivity=".activities.SplashActivity">
260+
261+
<intent-filter>
262+
<action android:name="android.intent.action.MAIN"/>
263+
<category android:name="android.intent.category.LAUNCHER"/>
264+
</intent-filter>
265+
</activity-alias>
266+
267+
<activity-alias
268+
android:name=".activities.SplashActivity.Yellow"
269+
android:enabled="false"
270+
android:icon="@mipmap/ic_launcher_yellow"
271+
android:roundIcon="@mipmap/ic_launcher_yellow"
272+
android:targetActivity=".activities.SplashActivity">
273+
274+
<intent-filter>
275+
<action android:name="android.intent.action.MAIN"/>
276+
<category android:name="android.intent.category.LAUNCHER"/>
277+
</intent-filter>
278+
</activity-alias>
279+
280+
<activity-alias
281+
android:name=".activities.SplashActivity.Amber"
282+
android:enabled="false"
283+
android:icon="@mipmap/ic_launcher_amber"
284+
android:roundIcon="@mipmap/ic_launcher_amber"
285+
android:targetActivity=".activities.SplashActivity">
286+
287+
<intent-filter>
288+
<action android:name="android.intent.action.MAIN"/>
289+
<category android:name="android.intent.category.LAUNCHER"/>
290+
</intent-filter>
291+
</activity-alias>
292+
293+
<activity-alias
294+
android:name=".activities.SplashActivity.Deep_orange"
295+
android:enabled="false"
296+
android:icon="@mipmap/ic_launcher_deep_orange"
297+
android:roundIcon="@mipmap/ic_launcher_deep_orange"
298+
android:targetActivity=".activities.SplashActivity">
299+
300+
<intent-filter>
301+
<action android:name="android.intent.action.MAIN"/>
302+
<category android:name="android.intent.category.LAUNCHER"/>
303+
</intent-filter>
304+
</activity-alias>
305+
306+
<activity-alias
307+
android:name=".activities.SplashActivity.Brown"
308+
android:enabled="false"
309+
android:icon="@mipmap/ic_launcher_brown"
310+
android:roundIcon="@mipmap/ic_launcher_brown"
311+
android:targetActivity=".activities.SplashActivity">
312+
313+
<intent-filter>
314+
<action android:name="android.intent.action.MAIN"/>
315+
<category android:name="android.intent.category.LAUNCHER"/>
316+
</intent-filter>
317+
</activity-alias>
318+
319+
<activity-alias
320+
android:name=".activities.SplashActivity.Blue_grey"
321+
android:enabled="false"
322+
android:icon="@mipmap/ic_launcher_blue_grey"
323+
android:roundIcon="@mipmap/ic_launcher_blue_grey"
324+
android:targetActivity=".activities.SplashActivity">
325+
326+
<intent-filter>
327+
<action android:name="android.intent.action.MAIN"/>
328+
<category android:name="android.intent.category.LAUNCHER"/>
329+
</intent-filter>
330+
</activity-alias>
331+
332+
<activity-alias
333+
android:name=".activities.SplashActivity.Grey_black"
334+
android:enabled="false"
335+
android:icon="@mipmap/ic_launcher_grey_black"
336+
android:roundIcon="@mipmap/ic_launcher_grey_black"
337+
android:targetActivity=".activities.SplashActivity">
338+
339+
<intent-filter>
340+
<action android:name="android.intent.action.MAIN"/>
341+
<category android:name="android.intent.category.LAUNCHER"/>
342+
</intent-filter>
343+
</activity-alias>
97344
</application>
98345
</manifest>

app/src/main/kotlin/com/simplemobiletools/notes/activities/SimpleActivity.kt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,25 @@ import com.simplemobiletools.notes.R
55

66
open class SimpleActivity : BaseSimpleActivity() {
77
override fun getAppIconIDs() = arrayListOf(
8-
R.mipmap.ic_launcher
8+
R.mipmap.ic_launcher_red,
9+
R.mipmap.ic_launcher_pink,
10+
R.mipmap.ic_launcher_purple,
11+
R.mipmap.ic_launcher_deep_purple,
12+
R.mipmap.ic_launcher_indigo,
13+
R.mipmap.ic_launcher_blue,
14+
R.mipmap.ic_launcher_light_blue,
15+
R.mipmap.ic_launcher_cyan,
16+
R.mipmap.ic_launcher_teal,
17+
R.mipmap.ic_launcher_green,
18+
R.mipmap.ic_launcher_light_green,
19+
R.mipmap.ic_launcher_lime,
20+
R.mipmap.ic_launcher_yellow,
21+
R.mipmap.ic_launcher_amber,
22+
R.mipmap.ic_launcher,
23+
R.mipmap.ic_launcher_deep_orange,
24+
R.mipmap.ic_launcher_brown,
25+
R.mipmap.ic_launcher_blue_grey,
26+
R.mipmap.ic_launcher_grey_black
927
)
1028

1129
override fun getAppLauncherName() = getString(R.string.app_launcher_name)

app/src/main/kotlin/com/simplemobiletools/notes/helpers/MyWidgetProvider.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import android.content.Context
88
import android.content.Intent
99
import android.net.Uri
1010
import android.widget.RemoteViews
11+
import com.simplemobiletools.commons.extensions.getLaunchIntent
1112
import com.simplemobiletools.commons.extensions.setBackgroundColor
1213
import com.simplemobiletools.notes.R
1314
import com.simplemobiletools.notes.activities.SplashActivity
@@ -32,7 +33,7 @@ class MyWidgetProvider : AppWidgetProvider() {
3233
}
3334

3435
val widgetId = context.config.widgetNoteId
35-
val startActivityIntent = Intent(context, SplashActivity::class.java)
36+
val startActivityIntent = context.getLaunchIntent() ?: Intent(context, SplashActivity::class.java)
3637
val startActivityPendingIntent = PendingIntent.getActivity(context, widgetId, startActivityIntent, PendingIntent.FLAG_UPDATE_CURRENT)
3738
views.setPendingIntentTemplate(R.id.notes_widget_listview, startActivityPendingIntent)
3839

@@ -45,7 +46,7 @@ class MyWidgetProvider : AppWidgetProvider() {
4546

4647
private fun setupAppOpenIntent(context: Context, views: RemoteViews, id: Int) {
4748
val widgetId = context.config.widgetNoteId
48-
val intent = Intent(context, SplashActivity::class.java)
49+
val intent = context.getLaunchIntent() ?: Intent(context, SplashActivity::class.java)
4950
intent.putExtra(OPEN_NOTE_ID, widgetId)
5051
val pendingIntent = PendingIntent.getActivity(context, widgetId, intent, 0)
5152
views.setOnClickPendingIntent(id, pendingIntent)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@color/color_primary"/>
4-
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
3+
<background android:drawable="@color/md_orange_700"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
55
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/md_amber_700"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/md_blue_700"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/md_blue_grey_700"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/md_brown_700"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/md_cyan_700"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/md_deep_orange_700"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>

0 commit comments

Comments
 (0)