Merge branch 'master' of https://github.com/gedoor/legado into desirepath

pull/32/head
Invinciblelee 6 years ago
commit 4479b936ba
  1. 8
      app/src/main/java/io/legado/app/base/BaseActivity.kt
  2. 113
      app/src/main/res/menu/book_source.xml
  3. 39
      app/src/main/res/menu/bookshelf.xml
  4. 7
      app/src/main/res/menu/find_book.xml
  5. 2
      app/src/main/res/values/colors.xml
  6. 2
      app/src/main/res/xml/pref_config_theme.xml

@ -11,6 +11,8 @@ import androidx.lifecycle.ViewModel
import io.legado.app.R import io.legado.app.R
import io.legado.app.lib.theme.ColorUtils import io.legado.app.lib.theme.ColorUtils
import io.legado.app.lib.theme.ThemeStore import io.legado.app.lib.theme.ThemeStore
import io.legado.app.utils.getCompatColor
import io.legado.app.utils.getPrefBoolean
import io.legado.app.utils.setIconColor import io.legado.app.utils.setIconColor
@ -69,6 +71,10 @@ abstract class BaseActivity<VM : ViewModel> : AppCompatActivity() {
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS or WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION) window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS or WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.statusBarColor = Color.TRANSPARENT if (getPrefBoolean("transparentStatusBar", false)) {
window.statusBarColor = Color.TRANSPARENT
} else {
window.statusBarColor = getCompatColor(R.color.status_bar_bag)
}
} }
} }

@ -1,15 +1,104 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools">
<item android:id="@+id/action_settings"
android:title="@string/action_settings" <item
android:orderInCategory="100" android:id="@+id/action_select_all"
app:showAsAction="never"/> android:icon="@drawable/ic_select_all"
android:title="@string/select_all"
app:showAsAction="always"
<item android:id="@+id/action_test" tools:ignore="AlwaysShowAction"/>
android:title="测试"
android:icon="@drawable/ic_search" <item
android:orderInCategory="100" android:id="@+id/action_group"
app:showAsAction="never"/> android:icon="@drawable/ic_groups"
android:title="@string/menu_action_group"
app:showAsAction="always"
tools:ignore="AlwaysShowAction">
<menu>
<group android:id="@+id/source_group">
</group>
</menu>
</item>
<item
android:id="@+id/action_sort"
android:icon="@drawable/ic_format_line_spacing"
android:title="@string/sort"
app:showAsAction="always"
tools:ignore="AlwaysShowAction">
<menu>
<item
android:id="@+id/sort_manual"
android:checkable="true"
android:title="@string/sort_manual"/>
<item
android:id="@+id/sort_auto"
android:checkable="true"
android:title="@string/sort_auto"/>
<item
android:id="@+id/sort_pin_yin"
android:checkable="true"
android:title="@string/sort_pin_yin"/>
</menu>
</item>
<item
android:id="@+id/action_add_book_source"
android:icon="@drawable/ic_add"
android:title="@string/add_book_source"
app:showAsAction="never"/>
<item
android:id="@+id/action_import_book_source_local"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_local"
app:showAsAction="never"/>
<item
android:id="@+id/action_import_book_source_onLine"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_on_line"
app:showAsAction="never"/>
<item
android:id="@+id/action_import_book_source_rwm"
android:icon="@drawable/ic_import"
android:title="@string/import_by_qr_code"
app:showAsAction="never"/>
<item
android:id="@+id/action_revert_selection"
android:icon="@drawable/ic_swap_outline_24dp"
android:title="@string/revert_selection"
app:showAsAction="never"/>
<item
android:id="@+id/action_del_select"
android:icon="@drawable/ic_clear_all"
android:title="@string/del_select"
app:showAsAction="never"/>
<item
android:id="@+id/action_check_book_source"
android:icon="@drawable/ic_check_source"
android:title="@string/check_select_source"
app:showAsAction="never"/>
<item
android:id="@+id/action_share_wifi"
android:icon="@drawable/ic_share"
android:title="@string/wifi_share"
app:showAsAction="never"/>
</menu> </menu>

@ -2,14 +2,33 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings" <item
android:title="筛选" android:id="@+id/action_add_local"
android:orderInCategory="100" android:icon="@drawable/ic_add"
app:showAsAction="always"/> android:title="@string/book_local"
app:showAsAction="never"/>
<item android:id="@+id/action_test"
android:title="测试" <item
android:icon="@drawable/ic_search" android:id="@+id/action_add_url"
android:orderInCategory="100" android:icon="@drawable/ic_add_online"
app:showAsAction="never"/> android:title="@string/add_url"
app:showAsAction="never"/>
<item
android:id="@+id/action_download_all"
android:icon="@drawable/ic_download_line"
android:title="@string/download_all"
app:showAsAction="never"/>
<item
android:id="@+id/action_list_grid"
android:icon="@drawable/ic_view_quilt"
android:title="@string/action_list_grid"
app:showAsAction="never"/>
<item
android:id="@+id/action_arrange_bookshelf"
android:icon="@drawable/ic_arrange"
android:title="@string/arrange_bookshelf"
app:showAsAction="never"/>
</menu> </menu>

@ -1,15 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings" <item android:id="@+id/action_settings"
android:title="@string/action_settings" android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="never"/> app:showAsAction="never"/>
<item android:id="@+id/action_test"
android:title="测试"
android:icon="@drawable/ic_search"
android:orderInCategory="100"
app:showAsAction="never"/>
</menu> </menu>

@ -44,7 +44,7 @@
<!-- 分格线背景色 --> <!-- 分格线背景色 -->
<color name="bg_divider_line">#FFD4D4D4</color> <color name="bg_divider_line">#FFD4D4D4</color>
<!--statusBarBackground--> <!--statusBarBackground-->
<color name="status_bar_bag">#64000000</color> <color name="status_bar_bag">#4D000000</color>
<color name="navigation_bar_bag">#f4f4f4</color> <color name="navigation_bar_bag">#f4f4f4</color>
<!--base-color--> <!--base-color-->

@ -6,7 +6,7 @@
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.lib.theme.prefs.ATESwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="immersionStatusBar" android:key="transparentStatusBar"
android:summary="@string/status_bar_immersion" android:summary="@string/status_bar_immersion"
android:title="@string/immersion_status_bar" android:title="@string/immersion_status_bar"
app:iconSpaceReserved="false"/> app:iconSpaceReserved="false"/>

Loading…
Cancel
Save