From 4ce8709e7152117bbe822bbf5829336ad9b2f82b Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 10:34:52 +0800 Subject: [PATCH 01/17] up --- app/build.gradle | 34 +++++++++++++++++-- .../main/res/layout/fragment_book_source.xml | 7 ++++ .../main/res/layout/fragment_bookshelf.xml | 7 ++++ .../main/res/layout/fragment_find_book.xml | 7 ++++ app/src/main/res/layout/fragment_my.xml | 7 ++++ 5 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/layout/fragment_book_source.xml create mode 100644 app/src/main/res/layout/fragment_bookshelf.xml create mode 100644 app/src/main/res/layout/fragment_find_book.xml create mode 100644 app/src/main/res/layout/fragment_my.xml diff --git a/app/build.gradle b/app/build.gradle index 41b50ac59..66c464856 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,21 +7,51 @@ androidExtensions { experimental = true } +static def releaseTime() { + return new Date().format("yy.MMddHH", TimeZone.getTimeZone("GMT+8")) +} + +def name = "legado" +def version = "0." + releaseTime() +def gitCommits = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim()) + android { compileSdkVersion 28 + signingConfigs { + myConfig { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_KEY_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_STORE_PASSWORD + } + } defaultConfig { applicationId "io.legado.app" minSdkVersion 21 targetSdkVersion 28 - versionCode 1 - versionName "1.0" + versionCode gitCommits + versionName version testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + project.ext.set("archivesBaseName", name + "_" + version) } buildTypes { release { + signingConfig signingConfigs.myConfig minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } + debug { + signingConfig signingConfigs.myConfig + applicationIdSuffix '.debug' + versionNameSuffix 'debug' + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + android.applicationVariants.all { variant -> + variant.outputs.all { + outputFileName = "${name}_${defaultConfig.versionName}.apk" + } + } } compileOptions { diff --git a/app/src/main/res/layout/fragment_book_source.xml b/app/src/main/res/layout/fragment_book_source.xml new file mode 100644 index 000000000..fb3d8a258 --- /dev/null +++ b/app/src/main/res/layout/fragment_book_source.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_bookshelf.xml b/app/src/main/res/layout/fragment_bookshelf.xml new file mode 100644 index 000000000..fb3d8a258 --- /dev/null +++ b/app/src/main/res/layout/fragment_bookshelf.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_find_book.xml b/app/src/main/res/layout/fragment_find_book.xml new file mode 100644 index 000000000..fb3d8a258 --- /dev/null +++ b/app/src/main/res/layout/fragment_find_book.xml @@ -0,0 +1,7 @@ + + + + \ 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.xml new file mode 100644 index 000000000..fb3d8a258 --- /dev/null +++ b/app/src/main/res/layout/fragment_my.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file From cf6d11bd36118946cb2dfd246a62d257ebae04ae Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:00:32 +0800 Subject: [PATCH 02/17] 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 @@ - - - - - - - - - - - - - - - - - - From 994e3840f1ddfd42de9eaa6739b191e725e1012b Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:13:56 +0800 Subject: [PATCH 03/17] up --- app/src/main/res/layout/activity_main.xml | 6 +++--- app/src/main/res/menu/activity_main_bnv.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 9ece2fc5d..6af97ab21 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -17,14 +17,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content" app:menu="@menu/activity_main_bnv" - tools:layout_editor_absoluteX="-16dp" app:layout_constraintBottom_toBottomOf="parent"/> + android:layout_height="0dp" + app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view" + app:layout_constraintTop_toTopOf="parent"/> diff --git a/app/src/main/res/menu/activity_main_bnv.xml b/app/src/main/res/menu/activity_main_bnv.xml index e84417fa0..6dc764516 100644 --- a/app/src/main/res/menu/activity_main_bnv.xml +++ b/app/src/main/res/menu/activity_main_bnv.xml @@ -1,7 +1,7 @@ + tools:showIn="bottom_navigation_view"> Date: Mon, 3 Jun 2019 15:20:51 +0800 Subject: [PATCH 04/17] up --- app/src/main/res/layout/activity_main.xml | 1 + app/src/main/res/menu/activity_main_bnv.xml | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 6af97ab21..380fbd2c6 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -16,6 +16,7 @@ android:id="@+id/bottom_navigation_view" android:layout_width="match_parent" android:layout_height="wrap_content" + app:labelVisibilityMode="labeled" app:menu="@menu/activity_main_bnv" app:layout_constraintBottom_toBottomOf="parent"/> diff --git a/app/src/main/res/menu/activity_main_bnv.xml b/app/src/main/res/menu/activity_main_bnv.xml index 6dc764516..4260d59db 100644 --- a/app/src/main/res/menu/activity_main_bnv.xml +++ b/app/src/main/res/menu/activity_main_bnv.xml @@ -6,18 +6,18 @@ + android:title="书架"/> + android:title="发现"/> + android:title="书源"/> + android:title="我的"/> From f0decfbd755a6a3b4883ef541667a50dba14a284 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:23:14 +0800 Subject: [PATCH 05/17] up --- app/src/main/res/layout/activity_main.xml | 37 +++++++++-------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 380fbd2c6..cb2e375bc 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,32 +1,25 @@ - + app:layout_behavior="@string/appbar_scrolling_view_behavior"> - + android:layout_height="wrap_content" + app:labelVisibilityMode="labeled" + app:menu="@menu/activity_main_bnv" + app:layout_constraintBottom_toBottomOf="parent"/> - - - + - + - From 854e683b345504282fe303bd5cf8a048eceae933 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:24:25 +0800 Subject: [PATCH 06/17] up --- app/src/main/res/layout/activity_main.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index cb2e375bc..3c2f1c569 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -3,8 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent" - app:layout_behavior="@string/appbar_scrolling_view_behavior"> + android:layout_height="match_parent"> Date: Mon, 3 Jun 2019 15:31:48 +0800 Subject: [PATCH 07/17] up --- app/src/main/res/layout/activity_main.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 3c2f1c569..7df564f19 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -9,6 +9,7 @@ android:id="@+id/bottom_navigation_view" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@color/background" app:labelVisibilityMode="labeled" app:menu="@menu/activity_main_bnv" app:layout_constraintBottom_toBottomOf="parent"/> From be8c37260574fef9f9bd52fff875af2a8e6ab344 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:39:16 +0800 Subject: [PATCH 08/17] up --- .../legado/app/ui/main/bookshelf/BookshelfFragment.kt | 11 +++++++++++ .../app/ui/main/booksource/BookSourceFragment.kt | 9 +++++++++ .../legado/app/ui/main/findbook/FindBookFragment.kt | 9 +++++++++ .../legado/app/ui/main/myconfig/MyConfigFragment.kt | 9 +++++++++ 4 files changed, 38 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index bccb43d32..6abb1f85a 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -1,7 +1,18 @@ package io.legado.app.ui.main.bookshelf +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup import androidx.fragment.app.Fragment +import io.legado.app.R class BookshelfFragment : Fragment() { + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + return inflater.inflate(R.layout.fragment_bookshelf, container) + } + + + } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt index 873857fb7..492f0490a 100644 --- a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt @@ -1,7 +1,16 @@ package io.legado.app.ui.main.booksource +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup import androidx.fragment.app.Fragment +import io.legado.app.R class BookSourceFragment : Fragment() { + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + return inflater.inflate(R.layout.fragment_book_source, container) + } + } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt index 174f3bd5f..2b04f05c2 100644 --- a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt @@ -1,7 +1,16 @@ package io.legado.app.ui.main.findbook +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup import androidx.fragment.app.Fragment +import io.legado.app.R class FindBookFragment : Fragment() { + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + return inflater.inflate(R.layout.fragment_find_book, container) + } + } \ No newline at end of file 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 index ece63851b..216b2ab33 100644 --- 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 @@ -1,7 +1,16 @@ package io.legado.app.ui.main.myconfig +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup import androidx.fragment.app.Fragment +import io.legado.app.R class MyConfigFragment : Fragment() { + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + return inflater.inflate(R.layout.fragment_my_config, container) + } + } \ No newline at end of file From 5f7e8673e5034f4b2a42960d57437ede7ffe0b62 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:46:01 +0800 Subject: [PATCH 09/17] up --- .../java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt | 3 +++ .../io/legado/app/ui/main/booksource/BookSourceFragment.kt | 4 ++++ .../java/io/legado/app/ui/main/findbook/FindBookFragment.kt | 4 ++++ .../java/io/legado/app/ui/main/myconfig/MyConfigFragment.kt | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index 6abb1f85a..348f286fb 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -13,6 +13,9 @@ class BookshelfFragment : Fragment() { return inflater.inflate(R.layout.fragment_bookshelf, container) } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt index 492f0490a..ccbfd00fb 100644 --- a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt @@ -13,4 +13,8 @@ class BookSourceFragment : Fragment() { return inflater.inflate(R.layout.fragment_book_source, container) } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } + } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt index 2b04f05c2..0bb4a42ce 100644 --- a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt @@ -13,4 +13,8 @@ class FindBookFragment : Fragment() { return inflater.inflate(R.layout.fragment_find_book, container) } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } + } \ No newline at end of file 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 index 216b2ab33..154b21ab6 100644 --- 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 @@ -13,4 +13,8 @@ class MyConfigFragment : Fragment() { return inflater.inflate(R.layout.fragment_my_config, container) } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } + } \ No newline at end of file From a06ccdd920f0fd21458f80fd7e4c3284e99df2ee Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 15:52:57 +0800 Subject: [PATCH 10/17] up --- .../main/java/io/legado/app/ui/main/MainActivity.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 ea8c5b55e..549a8be9b 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 @@ -3,14 +3,17 @@ package io.legado.app.ui.main import android.os.Bundle import android.view.Menu import android.view.MenuItem +import com.google.android.material.bottomnavigation.BottomNavigationView import io.legado.app.R 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.utils.getViewModel +import kotlinx.android.synthetic.main.activity_main.* + +class MainActivity : BaseActivity(), BottomNavigationView.OnNavigationItemSelectedListener { -class MainActivity : BaseActivity() { override val viewModel: MainViewModel get() = getViewModel(MainViewModel::class.java) @@ -18,7 +21,13 @@ class MainActivity : BaseActivity() { get() = R.layout.activity_main override fun onViewModelCreated(viewModel: MainViewModel, savedInstanceState: Bundle?) { + bottom_navigation_view.setOnNavigationItemSelectedListener(this) + } + + override fun onNavigationItemSelected(item: MenuItem): Boolean { + + return false } override fun onCompatCreateOptionsMenu(menu: Menu): Boolean { From ce16f0a1b74840e66219da4a694a295dbfb9e1b5 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 16:10:19 +0800 Subject: [PATCH 11/17] up --- .../java/io/legado/app/ui/main/MainActivity.kt | 16 ++++++++++++++-- app/src/main/res/menu/activity_main_bnv.xml | 8 ++++---- 2 files changed, 18 insertions(+), 6 deletions(-) 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 549a8be9b..8b1a203a4 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 @@ -25,8 +25,20 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig } override fun onNavigationItemSelected(item: MenuItem): Boolean { - - + when (item.itemId) { + R.id.menu_bookshelf -> { + view_pager_main.currentItem = 0 + } + R.id.menu_find_book -> { + view_pager_main.currentItem = 1 + } + R.id.menu_book_source -> { + view_pager_main.currentItem = 3 + } + R.id.menu_my_config -> { + view_pager_main.currentItem = 4 + } + } return false } diff --git a/app/src/main/res/menu/activity_main_bnv.xml b/app/src/main/res/menu/activity_main_bnv.xml index 4260d59db..757656941 100644 --- a/app/src/main/res/menu/activity_main_bnv.xml +++ b/app/src/main/res/menu/activity_main_bnv.xml @@ -4,19 +4,19 @@ tools:showIn="bottom_navigation_view"> From 66616dd915132df996e3721662ef95d797997eb5 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 16:11:45 +0800 Subject: [PATCH 12/17] up --- .../java/io/legado/app/ui/main/MainActivity.kt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) 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 8b1a203a4..0daa58ad6 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 @@ -26,18 +26,10 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig override fun onNavigationItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.menu_bookshelf -> { - view_pager_main.currentItem = 0 - } - R.id.menu_find_book -> { - view_pager_main.currentItem = 1 - } - R.id.menu_book_source -> { - view_pager_main.currentItem = 3 - } - R.id.menu_my_config -> { - view_pager_main.currentItem = 4 - } + R.id.menu_bookshelf -> view_pager_main.currentItem = 0 + R.id.menu_find_book -> view_pager_main.currentItem = 1 + R.id.menu_book_source -> view_pager_main.currentItem = 2 + R.id.menu_my_config -> view_pager_main.currentItem = 3 } return false } From 8b4dee923292fc90ede542ef0d4b14826ad8cb2a Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 17:11:13 +0800 Subject: [PATCH 13/17] up --- .../io/legado/app/ui/main/MainActivity.kt | 46 ++++++++++++++++++- .../ui/main/bookshelf/BookshelfFragment.kt | 19 +++----- .../ui/main/booksource/BookSourceFragment.kt | 19 +++----- .../app/ui/main/findbook/FindBookFragment.kt | 19 +++----- .../app/ui/main/myconfig/MyConfigFragment.kt | 19 +++----- 5 files changed, 73 insertions(+), 49 deletions(-) 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 0daa58ad6..ea95d0256 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 @@ -3,16 +3,26 @@ package io.legado.app.ui.main import android.os.Bundle import android.view.Menu import android.view.MenuItem +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentPagerAdapter +import androidx.viewpager.widget.ViewPager import com.google.android.material.bottomnavigation.BottomNavigationView import io.legado.app.R 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.main.bookshelf.BookshelfFragment +import io.legado.app.ui.main.booksource.BookSourceFragment +import io.legado.app.ui.main.findbook.FindBookFragment +import io.legado.app.ui.main.myconfig.MyConfigFragment import io.legado.app.utils.getViewModel import kotlinx.android.synthetic.main.activity_main.* -class MainActivity : BaseActivity(), BottomNavigationView.OnNavigationItemSelectedListener { +class MainActivity : BaseActivity(), BottomNavigationView.OnNavigationItemSelectedListener, + ViewPager.OnPageChangeListener { + private val mFragmentList: ArrayList = ArrayList() override val viewModel: MainViewModel get() = getViewModel(MainViewModel::class.java) @@ -21,6 +31,13 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig get() = R.layout.activity_main override fun onViewModelCreated(viewModel: MainViewModel, savedInstanceState: Bundle?) { + mFragmentList.add(BookshelfFragment()) + mFragmentList.add(FindBookFragment()) + mFragmentList.add(BookSourceFragment()) + mFragmentList.add(MyConfigFragment()) + view_pager_main.adapter = + TabFragmentPageAdapter(supportFragmentManager, FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) + view_pager_main.addOnPageChangeListener(this) bottom_navigation_view.setOnNavigationItemSelectedListener(this) } @@ -50,4 +67,31 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig .onGranted { Restore.importYueDuData(this) }.request() } + override fun onPageScrollStateChanged(state: Int) { + + } + + + override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { + + } + + + override fun onPageSelected(position: Int) { + bottom_navigation_view.menu.getItem(position).isChecked = true + } + + inner class TabFragmentPageAdapter internal constructor(fm: FragmentManager, behavior: Int) : + FragmentPagerAdapter(fm, behavior) { + + override fun getItem(position: Int): Fragment { + return mFragmentList[position] + } + + override fun getCount(): Int { + return mFragmentList.size + } + + } + } diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index 348f286fb..4d9c7492f 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -1,21 +1,16 @@ package io.legado.app.ui.main.bookshelf -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup import androidx.fragment.app.Fragment -import io.legado.app.R class BookshelfFragment : Fragment() { - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - return inflater.inflate(R.layout.fragment_bookshelf, container) - } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - } +// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { +// return inflater.inflate(R.layout.fragment_bookshelf, container) +// } +// +// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { +// super.onViewCreated(view, savedInstanceState) +// } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt index ccbfd00fb..85c0c7110 100644 --- a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt @@ -1,20 +1,15 @@ package io.legado.app.ui.main.booksource -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup import androidx.fragment.app.Fragment -import io.legado.app.R class BookSourceFragment : Fragment() { - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - return inflater.inflate(R.layout.fragment_book_source, container) - } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - } +// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { +// return inflater.inflate(R.layout.fragment_book_source, container) +// } +// +// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { +// super.onViewCreated(view, savedInstanceState) +// } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt index 0bb4a42ce..f37d79941 100644 --- a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt @@ -1,20 +1,15 @@ package io.legado.app.ui.main.findbook -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup import androidx.fragment.app.Fragment -import io.legado.app.R class FindBookFragment : Fragment() { - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - return inflater.inflate(R.layout.fragment_find_book, container) - } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - } +// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { +// return inflater.inflate(R.layout.fragment_find_book, container) +// } +// +// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { +// super.onViewCreated(view, savedInstanceState) +// } } \ No newline at end of file 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 index 154b21ab6..6bd23077c 100644 --- 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 @@ -1,20 +1,15 @@ package io.legado.app.ui.main.myconfig -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup import androidx.fragment.app.Fragment -import io.legado.app.R class MyConfigFragment : Fragment() { - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - return inflater.inflate(R.layout.fragment_my_config, container) - } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - } +// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { +// return inflater.inflate(R.layout.fragment_my_config, container) +// } +// +// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { +// super.onViewCreated(view, savedInstanceState) +// } } \ No newline at end of file From b580de08b3d76a70f815d7c0d09f1f9aa578d574 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 17:24:11 +0800 Subject: [PATCH 14/17] up --- .../java/io/legado/app/ui/main/MainActivity.kt | 8 ++++---- .../app/ui/main/bookshelf/BookshelfFragment.kt | 14 ++++++-------- .../app/ui/main/booksource/BookSourceFragment.kt | 14 ++++++-------- .../app/ui/main/findbook/FindBookFragment.kt | 14 ++++++-------- .../app/ui/main/myconfig/MyConfigFragment.kt | 14 ++++++-------- 5 files changed, 28 insertions(+), 36 deletions(-) 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 ea95d0256..4b1a01ef4 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 @@ -31,10 +31,10 @@ class MainActivity : BaseActivity(), BottomNavigationView.OnNavig get() = R.layout.activity_main override fun onViewModelCreated(viewModel: MainViewModel, savedInstanceState: Bundle?) { - mFragmentList.add(BookshelfFragment()) - mFragmentList.add(FindBookFragment()) - mFragmentList.add(BookSourceFragment()) - mFragmentList.add(MyConfigFragment()) + mFragmentList.add(BookshelfFragment(R.layout.fragment_bookshelf)) + mFragmentList.add(FindBookFragment(R.layout.fragment_find_book)) + mFragmentList.add(BookSourceFragment(R.layout.fragment_book_source)) + mFragmentList.add(MyConfigFragment(R.layout.fragment_my_config)) view_pager_main.adapter = TabFragmentPageAdapter(supportFragmentManager, FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) view_pager_main.addOnPageChangeListener(this) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index 4d9c7492f..f47c26989 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -1,16 +1,14 @@ package io.legado.app.ui.main.bookshelf +import android.os.Bundle +import android.view.View import androidx.fragment.app.Fragment -class BookshelfFragment : Fragment() { +class BookshelfFragment(contentLayoutId: Int) : Fragment(contentLayoutId) { -// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { -// return inflater.inflate(R.layout.fragment_bookshelf, container) -// } -// -// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { -// super.onViewCreated(view, savedInstanceState) -// } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt index 85c0c7110..c7700907b 100644 --- a/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/booksource/BookSourceFragment.kt @@ -1,15 +1,13 @@ package io.legado.app.ui.main.booksource +import android.os.Bundle +import android.view.View import androidx.fragment.app.Fragment -class BookSourceFragment : Fragment() { +class BookSourceFragment(contentLayoutId: Int) : Fragment(contentLayoutId) { -// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { -// return inflater.inflate(R.layout.fragment_book_source, container) -// } -// -// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { -// super.onViewCreated(view, savedInstanceState) -// } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt index f37d79941..1f82bde48 100644 --- a/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/findbook/FindBookFragment.kt @@ -1,15 +1,13 @@ package io.legado.app.ui.main.findbook +import android.os.Bundle +import android.view.View import androidx.fragment.app.Fragment -class FindBookFragment : Fragment() { +class FindBookFragment(contentLayoutId: Int) : Fragment(contentLayoutId) { -// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { -// return inflater.inflate(R.layout.fragment_find_book, container) -// } -// -// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { -// super.onViewCreated(view, savedInstanceState) -// } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } } \ No newline at end of file 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 index 6bd23077c..af07504b3 100644 --- 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 @@ -1,15 +1,13 @@ package io.legado.app.ui.main.myconfig +import android.os.Bundle +import android.view.View import androidx.fragment.app.Fragment -class MyConfigFragment : Fragment() { +class MyConfigFragment(contentLayoutId: Int) : Fragment(contentLayoutId) { -// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { -// return inflater.inflate(R.layout.fragment_my_config, container) -// } -// -// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { -// super.onViewCreated(view, savedInstanceState) -// } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } } \ No newline at end of file From 1dff884cc94df318657aeae403ad87ee6beb4096 Mon Sep 17 00:00:00 2001 From: GKF Date: Mon, 3 Jun 2019 17:33:00 +0800 Subject: [PATCH 15/17] up --- app/src/main/res/layout/fragment_book_source.xml | 8 ++++++++ app/src/main/res/layout/fragment_bookshelf.xml | 8 ++++++++ app/src/main/res/layout/fragment_find_book.xml | 8 ++++++++ app/src/main/res/layout/fragment_my_config.xml | 8 ++++++++ app/src/main/res/values/strings.xml | 1 + 5 files changed, 33 insertions(+) diff --git a/app/src/main/res/layout/fragment_book_source.xml b/app/src/main/res/layout/fragment_book_source.xml index fb3d8a258..a845edf1a 100644 --- a/app/src/main/res/layout/fragment_book_source.xml +++ b/app/src/main/res/layout/fragment_book_source.xml @@ -1,7 +1,15 @@ + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_bookshelf.xml b/app/src/main/res/layout/fragment_bookshelf.xml index fb3d8a258..2360d6d70 100644 --- a/app/src/main/res/layout/fragment_bookshelf.xml +++ b/app/src/main/res/layout/fragment_bookshelf.xml @@ -1,7 +1,15 @@ + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_find_book.xml b/app/src/main/res/layout/fragment_find_book.xml index fb3d8a258..4c8e1609e 100644 --- a/app/src/main/res/layout/fragment_find_book.xml +++ b/app/src/main/res/layout/fragment_find_book.xml @@ -1,7 +1,15 @@ + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_my_config.xml b/app/src/main/res/layout/fragment_my_config.xml index fb3d8a258..a4b260fa9 100644 --- a/app/src/main/res/layout/fragment_my_config.xml +++ b/app/src/main/res/layout/fragment_my_config.xml @@ -1,7 +1,15 @@ + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index aaf582f1a..8fd365498 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -45,6 +45,7 @@ 列表/网格 书城 添加本地 + 书源 书源管理 设置 主题设置 From 2a7351e761ad1998d1ccdc008d8ecc9abcf00969 Mon Sep 17 00:00:00 2001 From: GKF Date: Tue, 4 Jun 2019 11:28:31 +0800 Subject: [PATCH 16/17] up --- app/src/main/res/values/ids.xml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 app/src/main/res/values/ids.xml diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml new file mode 100644 index 000000000..0d2c4cc40 --- /dev/null +++ b/app/src/main/res/values/ids.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From fde31cd94271eb1fec253a0cbc854e9005657c84 Mon Sep 17 00:00:00 2001 From: GKF Date: Tue, 4 Jun 2019 11:45:02 +0800 Subject: [PATCH 17/17] up --- app/src/main/res/layout/activity_main.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7df564f19..a0730b697 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -3,7 +3,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:fitsSystemWindows="true">