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.lib.theme.ColorUtils
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
@ -69,6 +71,10 @@ abstract class BaseActivity<VM : ViewModel> : AppCompatActivity() {
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.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"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="never"/>
<item android:id="@+id/action_test"
android:title="测试"
android:icon="@drawable/ic_search"
android:orderInCategory="100"
app:showAsAction="never"/>
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools">
<item
android:id="@+id/action_select_all"
android:icon="@drawable/ic_select_all"
android:title="@string/select_all"
app:showAsAction="always"
tools:ignore="AlwaysShowAction"/>
<item
android:id="@+id/action_group"
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>

@ -2,14 +2,33 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings"
android:title="筛选"
android:orderInCategory="100"
app:showAsAction="always"/>
<item android:id="@+id/action_test"
android:title="测试"
android:icon="@drawable/ic_search"
android:orderInCategory="100"
app:showAsAction="never"/>
<item
android:id="@+id/action_add_local"
android:icon="@drawable/ic_add"
android:title="@string/book_local"
app:showAsAction="never"/>
<item
android:id="@+id/action_add_url"
android:icon="@drawable/ic_add_online"
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>

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

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

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

Loading…
Cancel
Save