pull/34/head
kunfei 5 years ago
parent a33042eda9
commit a4f7413ba3
  1. 4
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt
  2. 129
      app/src/main/res/menu/rss_source.xml
  3. 1
      app/src/main/res/values/strings.xml

@ -14,10 +14,12 @@ import io.legado.app.data.entities.RssSource
import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.rss.source.edit.RssSourceEditActivity
import io.legado.app.utils.getViewModel
import kotlinx.android.synthetic.main.activity_rss_source.*
import kotlinx.android.synthetic.main.view_search.*
import kotlinx.android.synthetic.main.view_title_bar.*
import org.jetbrains.anko.startActivity
class RssSourceActivity : VMBaseActivity<RssSourceViewModel>(R.layout.activity_rss_source),
@ -41,7 +43,7 @@ class RssSourceActivity : VMBaseActivity<RssSourceViewModel>(R.layout.activity_r
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.menu_add_book_source -> startActivity<RssSourceEditActivity>()
}
return super.onCompatOptionsItemSelected(item)
}

@ -1,4 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
</menu>
<item
android:id="@+id/menu_select_action"
android:icon="@drawable/ic_select_all"
android:title="@string/select_action"
app:showAsAction="always"
tools:ignore="AlwaysShowAction">
<menu>
<item
android:id="@+id/menu_select_all"
android:title="@string/select_all"
app:showAsAction="never" />
<item
android:id="@+id/menu_revert_selection"
android:title="@string/revert_selection"
app:showAsAction="never" />
<item
android:id="@+id/menu_enable_selection"
android:title="@string/enable_selection"
app:showAsAction="never" />
<item
android:id="@+id/menu_disable_selection"
android:title="@string/disable_selection"
app:showAsAction="never" />
<item
android:id="@+id/menu_del_selection"
android:title="@string/del_select"
app:showAsAction="never" />
</menu>
</item>
<item
android:id="@+id/menu_group"
android:icon="@drawable/ic_groups"
android:title="@string/menu_action_group"
app:showAsAction="always"
tools:ignore="AlwaysShowAction">
<menu>
<item
android:id="@+id/menu_group_manage"
android:title="@string/group_manage" />
<item
android:id="@+id/action_sort"
android:title="@string/sort">
<menu>
<group
android:id="@+id/menu_group_sort"
android:checkableBehavior="single" />
<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>
<group android:id="@+id/source_group">
</group>
</menu>
</item>
<item
android:id="@+id/menu_add"
android:icon="@drawable/ic_add"
android:title="@string/add_rss_source"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_book_source_local"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_local"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_book_source_onLine"
android:icon="@drawable/ic_import"
android:title="@string/import_book_source_on_line"
app:showAsAction="never" />
<item
android:id="@+id/menu_import_book_source_qr"
android:icon="@drawable/ic_import"
android:title="@string/import_by_qr_code"
app:showAsAction="never" />
<item
android:id="@+id/menu_check_book_source"
android:icon="@drawable/ic_check_source"
android:title="@string/check_select_source"
app:showAsAction="never" />
<item
android:id="@+id/menu_share_wifi"
android:icon="@drawable/ic_share"
android:title="@string/wifi_share"
app:showAsAction="never" />
</menu>

@ -146,6 +146,7 @@
<string name="edit_book_source">编辑书源</string>
<string name="disable_book_source">禁用书源</string>
<string name="add_book_source">新建书源</string>
<string name="add_rss_source">新建订阅源</string>
<string name="book_file_selector">添加书籍</string>
<string name="scan_book_source">扫描</string>
<string name="copy_source">拷贝书源</string>

Loading…
Cancel
Save