Merge branch 'yangyxd-master'

pull/379/head
kunfei 5 years ago
commit 274818598f
  1. 10
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt
  2. 5
      app/src/main/res/drawable/ic_bottom_books.xml
  3. 7
      app/src/main/res/drawable/ic_bottom_books_e.xml
  4. 6
      app/src/main/res/drawable/ic_bottom_books_s.xml
  5. 5
      app/src/main/res/drawable/ic_bottom_explore_black.xml
  6. 5
      app/src/main/res/drawable/ic_bottom_explore_black_e.xml
  7. 9
      app/src/main/res/drawable/ic_bottom_explore_black_s.xml
  8. 5
      app/src/main/res/drawable/ic_bottom_person.xml
  9. 5
      app/src/main/res/drawable/ic_bottom_person_e.xml
  10. 9
      app/src/main/res/drawable/ic_bottom_person_s.xml
  11. 5
      app/src/main/res/drawable/ic_bottom_rss_feed.xml
  12. 9
      app/src/main/res/drawable/ic_bottom_rss_feed_e.xml
  13. 4
      app/src/main/res/drawable/ic_bottom_rss_feed_s.xml
  14. 9
      app/src/main/res/drawable/ic_explore_black_24dp.xml
  15. 9
      app/src/main/res/drawable/ic_library_books_black_24dp.xml
  16. 9
      app/src/main/res/drawable/ic_person_black_24dp.xml
  17. 12
      app/src/main/res/drawable/ic_rss_feed.xml
  18. 8
      app/src/main/res/menu/main_bnv.xml
  19. 2
      app/src/main/res/values/dimens.xml

@ -3,6 +3,8 @@ package io.legado.app.ui.main
import android.os.Bundle
import android.view.KeyEvent
import android.view.MenuItem
import androidx.core.view.forEach
import androidx.core.view.forEachIndexed
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
@ -94,6 +96,14 @@ class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main),
bottom_navigation_view.menu.getItem(3).isChecked = true
}
}
// bottom_navigation_view.menu.forEachIndexed { index, item ->
// if (item.isChecked)
// item.icon = getDrawable(res[1][index])
// else
// item.icon = getDrawable(res[0][index])
// }
}
override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean {

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_bottom_books_e" android:state_checked="false"></item>
<item android:drawable="@drawable/ic_bottom_books_s" android:state_checked="true"></item>
</selector>

@ -0,0 +1,7 @@
<vector android:height="24dp" android:viewportHeight="18"
android:viewportWidth="18" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#2F45A6" android:pathData="M15.8,18h-0.5c-1.2,0 -2.2,-1 -2.2,-2.2v-8.5c0,-1.2 1,-2.2 2.2,-2.2h0.5c1.2,0 2.2,1 2.2,2.2v8.5C18,17 17,18 15.8,18zM15.2,6.5c-0.4,0 -0.8,0.3 -0.8,0.8v8.5c0,0.4 0.3,0.8 0.8,0.8h0.5c0.4,0 0.8,-0.3 0.8,-0.8v-8.5c0,-0.4 -0.3,-0.8 -0.8,-0.8L15.2,6.5z"/>
<path android:fillColor="#2F45A6" android:pathData="M9.2,18h-0.5c-1.2,0 -2.2,-1 -2.2,-2.2v-13.5c0,-1.2 1,-2.2 2.2,-2.2h0.5c1.2,0 2.2,1 2.2,2.2v13.5C11.5,17 10.5,18 9.2,18zM8.8,1.5c-0.4,0 -0.8,0.3 -0.8,0.8v13.5c0,0.4 0.3,0.8 0.8,0.8h0.5c0.4,0 0.8,-0.3 0.8,-0.8v-13.5c0,-0.4 -0.3,-0.8 -0.8,-0.8L8.8,1.5z"/>
<path android:fillColor="#2F45A6" android:pathData="M2.8,18h-0.5c-1.2,0 -2.2,-1 -2.2,-2.2v-10.5c0,-1.2 1,-2.2 2.2,-2.2h0.5c1.2,0 2.2,1 2.2,2.2v10.5C5,17 4,18 2.8,18zM2.2,4.5c-0.4,0 -0.8,0.3 -0.8,0.8v10.5c0,0.4 0.3,0.8 0.8,0.8h0.5c0.4,0 0.8,-0.3 0.8,-0.8v-10.5c0,-0.4 -0.3,-0.8 -0.8,-0.8L2.2,4.5z"/>
<path android:fillColor="#2F45A6" android:pathData="M8.5,13h1c0.3,0 0.5,0.2 0.5,0.5v0.5c0,0.3 -0.2,0.5 -0.5,0.5h-1c-0.3,0 -0.5,-0.2 -0.5,-0.5v-0.5C8,13.2 8.2,13 8.5,13z"/>
</vector>

@ -0,0 +1,6 @@
<vector android:height="24dp" android:viewportHeight="18"
android:viewportWidth="18" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#C8D0D9" android:pathData="M14.5,5h2C17.3,5 18,5.7 18,6.5v10c0,0.8 -0.7,1.5 -1.5,1.5h-2c-0.8,0 -1.5,-0.7 -1.5,-1.5v-10C13,5.7 13.7,5 14.5,5z"/>
<path android:fillColor="#C8D0D9" android:pathData="M1.5,3h2C4.3,3 5,3.7 5,4.5v12C5,17.3 4.3,18 3.5,18h-2C0.7,18 0,17.3 0,16.5v-12C0,3.7 0.7,3 1.5,3z"/>
<path android:fillColor="#C8D0D9" android:pathData="M10,0H8C7.2,0 6.5,0.7 6.5,1.5v15C6.5,17.3 7.2,18 8,18h2c0.8,0 1.5,-0.7 1.5,-1.5v-15C11.5,0.7 10.8,0 10,0zM10,14c0,0.3 -0.2,0.5 -0.5,0.5h-1C8.2,14.5 8,14.3 8,14v-0.5C8,13.2 8.2,13 8.5,13h1c0.3,0 0.5,0.2 0.5,0.5V14z"/>
</vector>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_bottom_explore_black_e" android:state_checked="false"></item>
<item android:drawable="@drawable/ic_bottom_explore_black_s" android:state_checked="true"></item>
</selector>

@ -0,0 +1,5 @@
<vector android:height="24dp" android:viewportHeight="18"
android:viewportWidth="18" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#959ECA" android:pathData="M9,18c-5,0 -9,-4 -9,-9c0,-5 4,-9 9,-9c5,0 9,4 9,9C18,14 14,18 9,18zM9,1.5C4.9,1.5 1.5,4.9 1.5,9s3.4,7.5 7.5,7.5s7.5,-3.4 7.5,-7.5S13.1,1.5 9,1.5z"/>
<path android:fillColor="#959ECA" android:pathData="M10.5,10c0.3,-0.5 0.7,-2.1 1.4,-4.8l0,0c0,-0.1 0,-0.2 -0.1,-0.2c-0.1,0 -0.1,0 -0.2,0C9.3,6.8 8,8 7.8,8.5c-0.4,0.7 -0.2,1.7 0.6,2.1C9.1,11 10,10.8 10.5,10z"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M9,0C4,0 0,4 0,9s4,9 9,9s9,-4 9,-9S14,0 9,0zM10.5,10c-0.4,0.7 -1.4,1 -2.1,0.6c-0.7,-0.4 -1,-1.4 -0.6,-2.1C8,8 9.3,6.8 11.6,5c0,0 0.1,-0.1 0.2,0c0.1,0 0.2,0.1 0.1,0.2C11.2,7.9 10.7,9.5 10.5,10z"
android:fillColor="#C8D0D9"/>
</vector>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_bottom_person_e" android:state_checked="false"></item>
<item android:drawable="@drawable/ic_bottom_person_s" android:state_checked="true"></item>
</selector>

@ -0,0 +1,5 @@
<vector android:height="24dp" android:viewportHeight="18"
android:viewportWidth="16" android:width="21.333334dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#959ECA" android:pathData="M8,8C5.8,8 4,6.2 4,4s1.8,-4 4,-4c2.2,0 4,1.8 4,4S10.2,8 8,8zM8,1.5C6.6,1.5 5.5,2.6 5.5,4S6.6,6.5 8,6.5c1.4,0 2.5,-1.1 2.5,-2.5S9.4,1.5 8,1.5z"/>
<path android:fillColor="#959ECA" android:pathData="M14.5,18h-13c-0.4,0 -0.8,-0.2 -1.1,-0.4S0,16.9 0,16.5V14c0,-1.1 0.4,-2.1 1.2,-2.8C1.9,10.4 2.9,10 4,10h8c1.1,0 2.1,0.4 2.8,1.2c0.8,0.8 1.2,1.8 1.2,2.8v2.5c0,0.4 -0.2,0.8 -0.4,1.1S14.9,18 14.5,18zM4,11.5c-0.7,0 -1.3,0.3 -1.8,0.7c-0.5,0.5 -0.7,1.1 -0.7,1.8v2.5h13V14c0,-0.7 -0.3,-1.3 -0.7,-1.8c-0.5,-0.5 -1.1,-0.7 -1.8,-0.7H4z"/>
</vector>

@ -0,0 +1,9 @@
<vector android:height="24dp" android:viewportHeight="18"
android:viewportWidth="16" android:width="21.333334dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#C8D0D9" android:fillType="evenOdd"
android:pathData="M8,4m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="#C8D0D9" android:fillType="evenOdd"
android:pathData="M4,10L12,10C14.2091,10 16,11.7909 16,14L16,16.5C16,17.3284 15.3284,18 14.5,18L1.5,18C0.6716,18 0,17.3284 0,16.5L0,14C-0,11.7909 1.7909,10 4,10Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_bottom_rss_feed_e" android:state_checked="false"></item>
<item android:drawable="@drawable/ic_bottom_rss_feed_s" android:state_checked="true"></item>
</selector>

@ -0,0 +1,9 @@
<vector android:height="24dp" android:viewportHeight="18"
android:viewportWidth="16" android:width="21.333334dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#5A5F64" android:fillType="nonZero"
android:pathData="M13.9991,0L2.0009,0C0.896,0 0,0.907 0,2.025L0,17.1C0,17.6133 0.4143,18 0.8871,18C0.9792,18 1.0748,17.9842 1.1704,17.9525L6.8756,15.6797C7.2404,15.5566 7.6211,15.4951 8,15.4951C8.3789,15.4951 8.7596,15.5566 9.1244,15.6797L14.8296,17.9525C14.9234,17.9842 15.019,18 15.1129,18C15.5857,18 16,17.6133 16,17.1L16,2.025C16,0.907 15.104,0 13.9991,0ZM14.3993,16.0699L9.7211,14.2049L9.6804,14.1891L9.6397,14.175C9.1102,13.9957 8.5595,13.9061 8,13.9061C7.4405,13.9061 6.8898,13.9975 6.3603,14.175L6.3196,14.1891L6.2789,14.2049L1.6007,16.0699L1.6007,2.025C1.6007,1.7842 1.7795,1.5891 2.0009,1.5891L13.9991,1.5891C14.2205,1.5891 14.3993,1.7842 14.3993,2.025L14.3993,16.0699Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
<path android:fillColor="#5A5F64" android:fillType="nonZero"
android:pathData="M10.947,6.4961L8.7863,6.4961L8.7863,4.1914C8.7863,3.7417 8.4349,3.375 8,3.375C7.5668,3.375 7.2137,3.7399 7.2137,4.1914L7.2137,6.4961L5.053,6.4961C4.6198,6.4961 4.2667,6.861 4.2667,7.3125C4.2667,7.7622 4.6181,8.1289 5.053,8.1289L7.2137,8.1289L7.2137,10.4336C7.2137,10.8833 7.5651,11.25 8,11.25C8.4332,11.25 8.7863,10.8851 8.7863,10.4336L8.7863,8.1289L10.947,8.1289C11.3802,8.1289 11.7333,7.764 11.7333,7.3125C11.7333,6.8628 11.3819,6.4961 10.947,6.4961L10.947,6.4961Z"
android:strokeColor="#00000000" android:strokeWidth="1"/>
</vector>

@ -0,0 +1,4 @@
<vector android:height="24dp" android:viewportHeight="18"
android:viewportWidth="16" android:width="21.333334dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#C8D0D9" android:pathData="M14,0H2C0.9,0 0,0.9 0,2v15.1C0,17.6 0.4,18 0.9,18c0.1,0 0.2,0 0.3,0l5.7,-2.3c0.4,-0.1 0.7,-0.2 1.1,-0.2s0.8,0.1 1.1,0.2l5.7,2.3c0.1,0 0.2,0 0.3,0c0.5,0 0.9,-0.4 0.9,-0.9V2C16,0.9 15.1,0 14,0zM11,8.8H8.8V11c0,0.4 -0.3,0.8 -0.8,0.8S7.2,11.4 7.2,11V8.8H5C4.6,8.8 4.2,8.4 4.2,8S4.6,7.2 5,7.2h2.2V5c0,-0.4 0.3,-0.8 0.8,-0.8S8.8,4.6 8.8,5v2.2H11c0.4,0 0.8,0.3 0.8,0.8S11.4,8.8 11,8.8z"/>
</vector>

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,10.9c-0.61,0 -1.1,0.49 -1.1,1.1s0.49,1.1 1.1,1.1c0.61,0 1.1,-0.49 1.1,-1.1s-0.49,-1.1 -1.1,-1.1zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM14.19,14.19L6,18l3.81,-8.19L18,6l-3.81,8.19z"/>
</vector>

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M4,6L2,6v14c0,1.1 0.9,2 2,2h14v-2L4,20L4,6zM20,2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM19,11L9,11L9,9h10v2zM15,15L9,15v-2h6v2zM19,7L9,7L9,5h10v2z"/>
</vector>

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>

@ -1,12 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M6.18,17.82m-2.18,0a2.18,2.18 0,1 1,4.36 0a2.18,2.18 0,1 1,-4.36 0" />
<path
android:fillColor="#FF000000"
android:pathData="M4,4.44v2.83c7.03,0 12.73,5.7 12.73,12.73h2.83c0,-8.59 -6.97,-15.56 -15.56,-15.56zM4,10.1v2.83c3.9,0 7.07,3.17 7.07,7.07h2.83c0,-5.47 -4.43,-9.9 -9.9,-9.9z" />
</vector>

@ -5,19 +5,19 @@
<item
android:id="@+id/menu_bookshelf"
android:icon="@drawable/ic_library_books_black_24dp"
android:icon="@drawable/ic_bottom_books"
android:title="@string/bookshelf"/>
<item
android:id="@+id/menu_find_book"
android:icon="@drawable/ic_explore_black_24dp"
android:icon="@drawable/ic_bottom_explore_black"
android:title="@string/find"/>
<item
android:id="@+id/menu_rss"
android:icon="@drawable/ic_rss_feed"
android:icon="@drawable/ic_bottom_rss_feed"
android:title="@string/rss" />
<item
android:id="@+id/menu_my_config"
android:icon="@drawable/ic_person_black_24dp"
android:icon="@drawable/ic_bottom_person"
android:title="@string/my"/>
</menu>

@ -35,4 +35,6 @@
<dimen name="fastscroll_scrollbar_margin_bottom">8dp</dimen>
<dimen name="fastscroll_scrollbar_padding_start">8dp</dimen>
<dimen name="fastscroll_scrollbar_padding_end">8dp</dimen>
<dimen name="fixed_height_bottom_padding">8dp</dimen>
</resources>
Loading…
Cancel
Save