pull/433/head
gedoor 4 years ago
parent a1ce3797e3
commit ce64e6269e
  1. 3
      app/build.gradle
  2. 4
      app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt
  3. 13
      app/src/main/res/layout/activity_main.xml
  4. 11
      app/src/main/res/layout/fragment_bookshelf.xml
  5. 0
      app/src/main/res/layout/fragment_explore.xml

@ -129,8 +129,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.media:media:1.2.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
//2.02bug,
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.google.android.material:material:1.2.1'

@ -24,7 +24,7 @@ import io.legado.app.ui.book.source.edit.BookSourceEditActivity
import io.legado.app.utils.getViewModel
import io.legado.app.utils.splitNotBlank
import io.legado.app.utils.startActivity
import kotlinx.android.synthetic.main.fragment_find_book.*
import kotlinx.android.synthetic.main.fragment_explore.*
import kotlinx.android.synthetic.main.view_search.*
import kotlinx.android.synthetic.main.view_title_bar.*
import java.text.Collator
@ -32,7 +32,7 @@ import java.text.Collator
/**
* 发现界面
*/
class ExploreFragment : VMBaseFragment<ExploreViewModel>(R.layout.fragment_find_book),
class ExploreFragment : VMBaseFragment<ExploreViewModel>(R.layout.fragment_explore),
ExploreAdapter.CallBack {
override val viewModel: ExploreViewModel
get() = getViewModel(ExploreViewModel::class.java)

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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:orientation="vertical">
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager_main"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view"
app:layout_constraintTop_toTopOf="parent" />
android:layout_weight="1" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation_view"
@ -17,7 +17,6 @@
android:layout_height="50dp"
android:background="@color/background"
app:labelVisibilityMode="unlabeled"
app:menu="@menu/main_bnv"
app:layout_constraintBottom_toBottomOf="parent" />
app:menu="@menu/main_bnv" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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"
@ -11,14 +11,11 @@
android:layout_height="wrap_content"
app:attachToActivity="false"
app:title="@string/bookshelf"
app:contentLayout="@layout/view_tab_layout_min"
app:layout_constraintTop_toTopOf="parent" />
app:contentLayout="@layout/view_tab_layout_min" />
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager_bookshelf"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/title_bar"
app:layout_constraintBottom_toBottomOf="parent" />
android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
Loading…
Cancel
Save