history ui调整
This commit is contained in:
parent
1adb1db7a2
commit
47dcc38e46
|
|
@ -59,11 +59,17 @@ class HistoryFragment : BaseBindingFragment<FragmentMainHistoryBinding>() {
|
||||||
)
|
)
|
||||||
orientation = ViewPager2.ORIENTATION_HORIZONTAL
|
orientation = ViewPager2.ORIENTATION_HORIZONTAL
|
||||||
offscreenPageLimit = fragments.size
|
offscreenPageLimit = fragments.size
|
||||||
isUserInputEnabled = false
|
isUserInputEnabled = true
|
||||||
adapter = object : FragmentStateAdapter(this@HistoryFragment) {
|
adapter = object : FragmentStateAdapter(this@HistoryFragment) {
|
||||||
override fun getItemCount() = fragments.size
|
override fun getItemCount() = fragments.size
|
||||||
override fun createFragment(position: Int): Fragment = fragments[position]
|
override fun createFragment(position: Int): Fragment = fragments[position]
|
||||||
}
|
}
|
||||||
|
registerOnPageChangeCallback(object: ViewPager2.OnPageChangeCallback() {
|
||||||
|
override fun onPageSelected(position: Int) {
|
||||||
|
super.onPageSelected(position)
|
||||||
|
binding.tabLayout.setSelectedTab(position, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent" >
|
||||||
android:background="@mipmap/bg_level_1_page" >
|
|
||||||
|
|
||||||
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent" >
|
||||||
android:background="@mipmap/bg_level_1_page" >
|
|
||||||
|
|
||||||
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="@mipmap/bg_level_1_page" >
|
|
||||||
|
|
||||||
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue