From cf6d11bd36118946cb2dfd246a62d257ebae04ae Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:00:32 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/main/MainActivity.kt | 5 --- .../java/io/legado/app/ui/main/MyFragment.kt | 7 ---- .../main/{ => bookshelf}/BookshelfFragment.kt | 2 +- .../{ => booksource}/BookSourceFragment.kt | 2 +- .../main/{ => findbook}/FindBookFragment.kt | 2 +- .../app/ui/main/myconfig/MyConfigFragment.kt | 7 ++++ app/src/main/res/layout/activity_main.xml | 29 ++++++++------ app/src/main/res/layout/content_main.xml | 21 ---------- ...fragment_my.xml => fragment_my_config.xml} | 0 app/src/main/res/menu/activity_main_bnv.xml | 23 +++++++++++ .../main/res/menu/activity_main_drawer.xml | 38 ------------------- 11 files changed, 50 insertions(+), 86 deletions(-) delete mode 100644 app/src/main/java/io/legado/app/ui/main/MyFragment.kt rename app/src/main/java/io/legado/app/ui/main/{ => bookshelf}/BookshelfFragment.kt (66%) rename app/src/main/java/io/legado/app/ui/main/{ => booksource}/BookSourceFragment.kt (65%) rename app/src/main/java/io/legado/app/ui/main/{ => findbook}/FindBookFragment.kt (66%) create mode 100644 app/src/main/java/io/legado/app/ui/main/myconfig/MyConfigFragment.kt delete mode 100644 app/src/main/res/layout/content_main.xml rename app/src/main/res/layout/{fragment_my.xml => fragment_my_config.xml} (100%) create mode 100644 app/src/main/res/menu/activity_main_bnv.xml delete mode 100644 app/src/main/res/menu/activity_main_drawer.xml 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 4a602e66b..ea8c5b55e 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 @@ -1,6 +1,5 @@ package io.legado.app.ui.main -import android.content.Intent import android.os.Bundle import android.view.Menu import android.view.MenuItem @@ -9,9 +8,7 @@ import io.legado.app.base.BaseActivity import io.legado.app.help.permission.Permissions import io.legado.app.help.permission.PermissionsCompat import io.legado.app.help.storage.Restore -import io.legado.app.ui.search.SearchActivity import io.legado.app.utils.getViewModel -import kotlinx.android.synthetic.main.activity_main.* class MainActivity : BaseActivity() { override val viewModel: MainViewModel @@ -21,8 +18,6 @@ class MainActivity : BaseActivity() { get() = R.layout.activity_main override fun onViewModelCreated(viewModel: MainViewModel, savedInstanceState: Bundle?) { - fab.setOnClickListener { startActivity(Intent(this, SearchActivity::class.java)) } - } diff --git a/app/src/main/java/io/legado/app/ui/main/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/MyFragment.kt deleted file mode 100644 index 9cdcbaad6..000000000 --- a/app/src/main/java/io/legado/app/ui/main/MyFragment.kt +++ /dev/null @@ -1,7 +0,0 @@ -package io.legado.app.ui.main - -import androidx.fragment.app.Fragment - -class MyFragment : Fragment() { - -} \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt similarity index 66% rename from app/src/main/java/io/legado/app/ui/main/BookshelfFragment.kt rename to app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index 9d3199a81..bccb43d32 100644 --- a/app/src/main/java/io/legado/app/ui/main/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.main +package io.legado.app.ui.main.bookshelf import androidx.fragment.app.Fragment diff --git a/app/src/main/java/io/legado/app/ui/main/BookSourceFragment.kt b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt similarity index 65% rename from app/src/main/java/io/legado/app/ui/main/BookSourceFragment.kt rename to app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt index 65ff53f67..873857fb7 100644 --- a/app/src/main/java/io/legado/app/ui/main/BookSourceFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.main +package io.legado.app.ui.main.booksource import androidx.fragment.app.Fragment diff --git a/app/src/main/java/io/legado/app/ui/main/FindBookFragment.kt b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt similarity index 66% rename from app/src/main/java/io/legado/app/ui/main/FindBookFragment.kt rename to app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt index 87a6ff499..174f3bd5f 100644 --- a/app/src/main/java/io/legado/app/ui/main/FindBookFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.main +package io.legado.app.ui.main.findbook import androidx.fragment.app.Fragment 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/myconfig/MyConfigFragment.kt new file mode 100644 index 000000000..ece63851b --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/main/myconfig/MyConfigFragment.kt @@ -0,0 +1,7 @@ +package io.legado.app.ui.main.myconfig + +import androidx.fragment.app.Fragment + +class MyConfigFragment : Fragment() { + +} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 6791f4943..9ece2fc5d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -7,20 +7,25 @@ android:layout_height="match_parent" tools:context=".ui.main.MainActivity"> - + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - + - + + + diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml deleted file mode 100644 index 1e7c273e2..000000000 --- a/app/src/main/res/layout/content_main.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_my.xml b/app/src/main/res/layout/fragment_my_config.xml similarity index 100% rename from app/src/main/res/layout/fragment_my.xml rename to app/src/main/res/layout/fragment_my_config.xml diff --git a/app/src/main/res/menu/activity_main_bnv.xml b/app/src/main/res/menu/activity_main_bnv.xml new file mode 100644 index 000000000..e84417fa0 --- /dev/null +++ b/app/src/main/res/menu/activity_main_bnv.xml @@ -0,0 +1,23 @@ + + + + + + + + + diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml deleted file mode 100644 index 7aa2f3126..000000000 --- a/app/src/main/res/menu/activity_main_drawer.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - -