diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index a76bebc8d..6543c1896 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -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(), BottomNavigationView.OnNavig 0 -> BookshelfFragment() 1 -> FindBookFragment() 2 -> RssFragment() - else -> MyConfigFragment() + else -> MyFragment() } } diff --git a/app/src/main/java/io/legado/app/ui/main/myconfig/MyConfigFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt similarity index 90% rename from app/src/main/java/io/legado/app/ui/main/myconfig/MyConfigFragment.kt rename to app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt index 1b8b81452..92b27f3ed 100644 --- a/app/src/main/java/io/legado/app/ui/main/myconfig/MyConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt @@ -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) diff --git a/app/src/main/java/io/legado/app/ui/main/myconfig/PreferenceFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/PreferenceFragment.kt similarity index 92% rename from app/src/main/java/io/legado/app/ui/main/myconfig/PreferenceFragment.kt rename to app/src/main/java/io/legado/app/ui/main/my/PreferenceFragment.kt index 98b399c1c..50071d5e7 100644 --- a/app/src/main/java/io/legado/app/ui/main/myconfig/PreferenceFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/PreferenceFragment.kt @@ -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() "setting" -> context?.startActivity( Pair("configType", ConfigViewModel.TYPE_CONFIG) ) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7b31c6f36..6b4eb4487 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -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" /> + +