pull/32/head
kunfei 5 years ago
parent 90056bf000
commit bab6267395
  1. 4
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt
  3. 4
      app/src/main/java/io/legado/app/ui/main/my/PreferenceFragment.kt
  4. 2
      app/src/main/res/layout/activity_main.xml
  5. 0
      app/src/main/res/menu/main_bnv.xml
  6. 5
      app/src/main/res/xml/pref_main.xml

@ -19,7 +19,7 @@ import io.legado.app.lib.theme.Selector
import io.legado.app.lib.theme.ThemeStore
import io.legado.app.ui.main.bookshelf.BookshelfFragment
import io.legado.app.ui.main.findbook.FindBookFragment
import io.legado.app.ui.main.myconfig.MyConfigFragment
import io.legado.app.ui.main.my.MyFragment
import io.legado.app.ui.main.rss.RssFragment
import io.legado.app.utils.getCompatColor
import io.legado.app.utils.getPrefInt
@ -104,7 +104,7 @@ class MainActivity : BaseActivity<MainViewModel>(), BottomNavigationView.OnNavig
0 -> BookshelfFragment()
1 -> FindBookFragment()
2 -> RssFragment()
else -> MyConfigFragment()
else -> MyFragment()
}
}

@ -1,4 +1,4 @@
package io.legado.app.ui.main.myconfig
package io.legado.app.ui.main.my
import android.os.Bundle
import android.view.Menu
@ -10,7 +10,7 @@ import io.legado.app.ui.search.SearchActivity
import kotlinx.android.synthetic.main.view_title_bar.*
import org.jetbrains.anko.startActivity
class MyConfigFragment : BaseFragment(R.layout.fragment_my_config) {
class MyFragment : BaseFragment(R.layout.fragment_my_config) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
setSupportToolbar(toolbar)

@ -1,4 +1,4 @@
package io.legado.app.ui.main.myconfig
package io.legado.app.ui.main.my
import android.content.SharedPreferences
import android.os.Bundle
@ -8,6 +8,7 @@ import io.legado.app.App
import io.legado.app.R
import io.legado.app.ui.about.AboutActivity
import io.legado.app.ui.about.DonateActivity
import io.legado.app.ui.booksource.BookSourceActivity
import io.legado.app.ui.config.ConfigActivity
import io.legado.app.ui.config.ConfigViewModel
import org.jetbrains.anko.startActivity
@ -40,6 +41,7 @@ class PreferenceFragment : PreferenceFragmentCompat(),
override fun onPreferenceTreeClick(preference: Preference?): Boolean {
preference?.let {
when (preference.key) {
"bookSourceManage" -> context?.startActivity<BookSourceActivity>()
"setting" -> context?.startActivity<ConfigActivity>(
Pair("configType", ConfigViewModel.TYPE_CONFIG)
)

@ -11,7 +11,7 @@
android:elevation="6dp"
android:background="@color/background"
app:labelVisibilityMode="labeled"
app:menu="@menu/activity_main_bnv"
app:menu="@menu/main_bnv"
app:layout_constraintBottom_toBottomOf="parent" />
<androidx.viewpager.widget.ViewPager

@ -14,6 +14,11 @@
android:title="Web服务"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="bookSourceManage"
android:title="书源管理"
app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATEPreferenceCategory
android:title="设置"
app:iconSpaceReserved="false">

Loading…
Cancel
Save