feat: 优化代码

pull/164/head
kunfei 5 years ago
parent 0b6a9060d5
commit ee50620a73
  1. 14
      app/src/main/AndroidManifest.xml
  2. 3
      app/src/main/java/io/legado/app/help/LauncherIconHelp.kt
  3. 3
      app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt
  4. 0
      app/src/main/res/drawable/ic_launcher1.xml
  5. 0
      app/src/main/res/drawable/ic_launcher2.xml
  6. 0
      app/src/main/res/drawable/ic_launcher2_b.xml
  7. 0
      app/src/main/res/drawable/ic_launcher3.xml
  8. 0
      app/src/main/res/drawable/ic_launcher4.xml
  9. 0
      app/src/main/res/drawable/ic_launcher5.xml
  10. 0
      app/src/main/res/drawable/ic_launcher5_b.xml
  11. 18
      app/src/main/res/drawable/ic_launcher6.xml
  12. 4
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  13. 2
      app/src/main/res/mipmap-anydpi-v26/launcher1.xml
  14. 4
      app/src/main/res/mipmap-anydpi-v26/launcher2.xml
  15. 2
      app/src/main/res/mipmap-anydpi-v26/launcher3.xml
  16. 2
      app/src/main/res/mipmap-anydpi-v26/launcher4.xml
  17. 5
      app/src/main/res/mipmap-anydpi-v26/launcher5.xml
  18. 1
      app/src/main/res/values/array_values.xml
  19. 1
      app/src/main/res/values/arrays.xml

@ -93,6 +93,20 @@
android:resource="@xml/shortcuts"
android:launchMode="singleTask" />
</activity>
<!--图标5-->
<activity
android:name=".ui.welcome.Launcher5"
android:icon="@mipmap/launcher5"
android:enabled="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts"
android:launchMode="singleTask" />
</activity>
<!--主界面-->
<activity
android:name=".ui.main.MainActivity"

@ -18,7 +18,8 @@ object LauncherIconHelp {
ComponentName(App.INSTANCE, Launcher1::class.java.name),
ComponentName(App.INSTANCE, Launcher2::class.java.name),
ComponentName(App.INSTANCE, Launcher3::class.java.name),
ComponentName(App.INSTANCE, Launcher4::class.java.name)
ComponentName(App.INSTANCE, Launcher4::class.java.name),
ComponentName(App.INSTANCE, Launcher5::class.java.name)
)
fun changeIcon(icon: String?) {

@ -59,4 +59,5 @@ open class WelcomeActivity : BaseActivity(R.layout.activity_welcome) {
class Launcher1 : WelcomeActivity()
class Launcher2 : WelcomeActivity()
class Launcher3 : WelcomeActivity()
class Launcher4 : WelcomeActivity()
class Launcher4 : WelcomeActivity()
class Launcher5 : WelcomeActivity()

@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="M50.8,56.9c-0.2,2.4 -2.4,4.2 -4.8,4c-1.2,-0.1 -2.3,-0.7 -3.1,-1.7l8.8,-5.1l0,0l0.5,-0.3c-0.1,-0.2 -0.2,-0.4 -0.3,-0.6c-1.8,-3.1 -5.7,-4.1 -8.7,-2.3c-3.1,1.8 -4.1,5.7 -2.3,8.7c1.8,3.1 5.7,4.1 8.7,2.3c1.8,-1.1 3,-3 3.2,-5.1H50.8zM44.1,52.6c1.7,-1 3.9,-0.7 5.3,0.6L42,57.5C41.6,55.6 42.4,53.6 44.1,52.6z"
android:fillColor="#333333" />
<path
android:pathData="M34.1,55c2.7,-0.6 4.4,-3.4 3.8,-6.1C37.4,46.6 35.4,45 33,45h-7v17.8h1.9V46.9H33c1.8,0 3.1,1.5 3.1,3.3c0,1.6 -1.3,3 -2.9,3.1h-2.1l5.1,9.5h2.2L34.1,55z"
android:fillColor="#2F45A6" />
<path
android:pathData="M61,50.1c-3.5,0.1 -6.3,3.1 -6.1,6.6c0.1,3.3 2.8,6 6.1,6.1h3.2v-1.9H61c-2.5,0 -4.5,-2 -4.5,-4.4c0,-2.5 2,-4.5 4.4,-4.5c2.5,0 4.5,2 4.5,4.4c0,0 0,0 0,0v6.4h1.9v-6.4C67.4,52.9 64.5,50.1 61,50.1L61,50.1z"
android:fillColor="#333333" />
<path
android:pathData="M80.1,45v11.5c0,2.5 -2,4.5 -4.5,4.5c-2.5,0 -4.5,-2 -4.5,-4.5c0,-2.5 2,-4.5 4.4,-4.5c0,0 0,0 0,0h3.2v-1.9h-3.2c-3.5,0 -6.4,2.8 -6.4,6.4c0,3.5 2.8,6.4 6.4,6.4c1.7,0 3.3,-0.7 4.5,-1.8v1.8H82V45H80.1z"
android:fillColor="#333333" />
</vector>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_5b" />
<foreground android:drawable="@drawable/ic_launcher_5" />
<background android:drawable="@drawable/ic_launcher5_b" />
<foreground android:drawable="@drawable/ic_launcher5" />
</adaptive-icon>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/md_yellow_600" />
<foreground android:drawable="@drawable/ic_launcher_1" />
<foreground android:drawable="@drawable/ic_launcher1" />
</adaptive-icon>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_2b" />
<foreground android:drawable="@drawable/ic_launcher_2" />
<background android:drawable="@drawable/ic_launcher2_b" />
<foreground android:drawable="@drawable/ic_launcher2" />
</adaptive-icon>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/md_grey_100" />
<foreground android:drawable="@drawable/ic_launcher_3" />
<foreground android:drawable="@drawable/ic_launcher3" />
</adaptive-icon>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/md_grey_100" />
<foreground android:drawable="@drawable/ic_launcher_4" />
<foreground android:drawable="@drawable/ic_launcher4" />
</adaptive-icon>

@ -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="@color/md_grey_100" />
<foreground android:drawable="@drawable/ic_launcher6" />
</adaptive-icon>

@ -7,6 +7,7 @@
<item>launcher2</item>
<item>launcher3</item>
<item>launcher4</item>
<item>launcher5</item>
</string-array>
<string-array name="screen_time_out_value">

@ -80,6 +80,7 @@
<item>icon2</item>
<item>icon3</item>
<item>icon4</item>
<item>icon5</item>
</string-array>
<string-array name="chinese_mode">

Loading…
Cancel
Save