更新界面
This commit is contained in:
@@ -184,4 +184,5 @@ object PreferKey {
|
||||
|
||||
const val themePref = "themePref"
|
||||
const val bookshelfSortOrder = "bookshelfSortOrder"
|
||||
const val showBottomView = "showBottomView"
|
||||
}
|
||||
|
||||
@@ -224,6 +224,9 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
val showRSS: Boolean
|
||||
get() = appCtx.getPrefBoolean(PreferKey.showRss, true)
|
||||
|
||||
val showBottomView: Boolean
|
||||
get() = appCtx.getPrefBoolean(PreferKey.showBottomView, true)
|
||||
|
||||
val autoRefreshBook: Boolean
|
||||
get() = appCtx.getPrefBoolean(PreferKey.autoRefresh)
|
||||
|
||||
|
||||
@@ -5,15 +5,12 @@ import android.app.SearchManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.ResolveInfo
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.Menu
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.PopupWindow
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.view.SupportMenuInflater
|
||||
import androidx.appcompat.view.menu.MenuBuilder
|
||||
import androidx.appcompat.view.menu.MenuItemImpl
|
||||
@@ -43,6 +40,7 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
|
||||
private val adapter = Adapter(context).apply {
|
||||
setHasStableIds(true)
|
||||
}
|
||||
|
||||
private val menuItems: List<MenuItemImpl>
|
||||
private val visibleMenuItems = arrayListOf<MenuItemImpl>()
|
||||
private val moreMenuItems = arrayListOf<MenuItemImpl>()
|
||||
@@ -55,13 +53,12 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
|
||||
isTouchable = true
|
||||
isOutsideTouchable = false
|
||||
isFocusable = false
|
||||
animationStyle = R.style.TextActionMenuAnimation
|
||||
|
||||
val myMenu = MenuBuilder(context)
|
||||
val otherMenu = MenuBuilder(context)
|
||||
SupportMenuInflater(context).inflate(R.menu.content_select_action, myMenu)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
onInitializeMenu(otherMenu)
|
||||
}
|
||||
onInitializeMenu(otherMenu)
|
||||
menuItems = myMenu.visibleItems + otherMenu.visibleItems
|
||||
visibleMenuItems.addAll(menuItems.subList(0, 5))
|
||||
moreMenuItems.addAll(menuItems.subList(5, menuItems.size))
|
||||
@@ -114,10 +111,7 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
|
||||
when {
|
||||
startTopY > 500 -> {
|
||||
showAtLocation(
|
||||
view,
|
||||
Gravity.BOTTOM or Gravity.START,
|
||||
startX,
|
||||
windowHeight - startTopY
|
||||
view, Gravity.BOTTOM or Gravity.START, startX, windowHeight - startTopY
|
||||
)
|
||||
}
|
||||
|
||||
@@ -138,28 +132,19 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
|
||||
when {
|
||||
startBottomY > 500 -> {
|
||||
showAtLocation(
|
||||
view,
|
||||
Gravity.TOP or Gravity.START,
|
||||
startX,
|
||||
startTopY - popupHeight
|
||||
view, Gravity.TOP or Gravity.START, startX, startTopY - popupHeight
|
||||
)
|
||||
}
|
||||
|
||||
endBottomY - startBottomY > 500 -> {
|
||||
showAtLocation(
|
||||
view,
|
||||
Gravity.TOP or Gravity.START,
|
||||
startX,
|
||||
startBottomY
|
||||
view, Gravity.TOP or Gravity.START, startX, startBottomY
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
showAtLocation(
|
||||
view,
|
||||
Gravity.TOP or Gravity.START,
|
||||
endX,
|
||||
endBottomY
|
||||
view, Gravity.TOP or Gravity.START, endX, endBottomY
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -233,28 +218,23 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
|
||||
}
|
||||
|
||||
else -> item.intent?.let {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
it.putExtra(Intent.EXTRA_PROCESS_TEXT, callBack.selectedText)
|
||||
context.startActivity(it)
|
||||
}
|
||||
it.putExtra(Intent.EXTRA_PROCESS_TEXT, callBack.selectedText)
|
||||
context.startActivity(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
private fun createProcessTextIntent(): Intent {
|
||||
return Intent()
|
||||
.setAction(Intent.ACTION_PROCESS_TEXT)
|
||||
.setType("text/plain")
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
private fun getSupportedActivities(): List<ResolveInfo> {
|
||||
return context.packageManager
|
||||
.queryIntentActivities(createProcessTextIntent(), 0)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
private fun createProcessTextIntentForResolveInfo(info: ResolveInfo): Intent {
|
||||
return createProcessTextIntent()
|
||||
.putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, false)
|
||||
@@ -266,7 +246,6 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
|
||||
* so that your "PROCESS_TEXT" menu items appear after the
|
||||
* standard selection menu items like Cut, Copy, Paste.
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
private fun onInitializeMenu(menu: Menu) {
|
||||
kotlin.runCatching {
|
||||
var menuItemOrder = 100
|
||||
|
||||
@@ -10,8 +10,6 @@ import io.legato.kazusa.databinding.DialogTipConfigBinding
|
||||
import io.legato.kazusa.help.config.ReadBookConfig
|
||||
import io.legato.kazusa.help.config.ReadTipConfig
|
||||
import io.legato.kazusa.lib.dialogs.selector
|
||||
import io.legato.kazusa.utils.checkByIndex
|
||||
import io.legato.kazusa.utils.getIndexById
|
||||
import io.legato.kazusa.utils.hexString
|
||||
import io.legato.kazusa.utils.observeEvent
|
||||
import io.legato.kazusa.utils.postEvent
|
||||
@@ -41,7 +39,14 @@ class TipConfigDialog : BaseBottomSheetDialogFragment(R.layout.dialog_tip_config
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
binding.rgTitleMode.checkByIndex(ReadBookConfig.titleMode)
|
||||
|
||||
when (ReadBookConfig.titleMode) {
|
||||
0 -> binding.rgTitleMode.check(R.id.rb_title_mode1)
|
||||
1 -> binding.rgTitleMode.check(R.id.rb_title_mode2)
|
||||
2 -> binding.rgTitleMode.check(R.id.rb_title_mode3)
|
||||
else -> { }
|
||||
}
|
||||
|
||||
binding.dsbTitleSize.progress = ReadBookConfig.titleSize
|
||||
binding.dsbTitleTop.progress = ReadBookConfig.titleTopSpacing
|
||||
binding.dsbTitleBottom.progress = ReadBookConfig.titleBottomSpacing
|
||||
@@ -91,9 +96,11 @@ class TipConfigDialog : BaseBottomSheetDialogFragment(R.layout.dialog_tip_config
|
||||
}
|
||||
|
||||
private fun initEvent() = binding.run {
|
||||
rgTitleMode.setOnCheckedChangeListener { _, checkedId ->
|
||||
ReadBookConfig.titleMode = rgTitleMode.getIndexById(checkedId)
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(5))
|
||||
binding.rgTitleMode.setOnCheckedStateChangeListener { group, checkedIds ->
|
||||
if (checkedIds.isNotEmpty()) {
|
||||
ReadBookConfig.titleMode = group.indexOfChild(group.findViewById(checkedIds.first()))
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(5))
|
||||
}
|
||||
}
|
||||
dsbTitleSize.onChanged = {
|
||||
ReadBookConfig.titleSize = it
|
||||
|
||||
@@ -194,7 +194,7 @@ class OtherConfigFragment : PreferenceFragment(),
|
||||
setProcessTextEnable(it.getBoolean(key, true))
|
||||
}
|
||||
|
||||
PreferKey.showDiscovery, PreferKey.showRss -> postEvent(EventBus.NOTIFY_MAIN, true)
|
||||
PreferKey.showDiscovery, PreferKey.showRss, PreferKey.showBottomView -> postEvent(EventBus.NOTIFY_MAIN, true)
|
||||
PreferKey.language -> listView.postDelayed(1000) {
|
||||
appCtx.restart()
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ import kotlin.coroutines.suspendCoroutine
|
||||
import androidx.core.view.get
|
||||
import com.google.android.material.navigation.NavigationBarView
|
||||
import io.legato.kazusa.ui.main.bookshelf.books.BookshelfFragment3
|
||||
import io.legato.kazusa.utils.gone
|
||||
import io.legato.kazusa.utils.visible
|
||||
|
||||
/**
|
||||
* 主界面
|
||||
@@ -382,40 +384,46 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
|
||||
|
||||
|
||||
private fun upBottomMenu() {
|
||||
if (AppConfig.showBottomView)
|
||||
{
|
||||
getNavigationBarView().visible()
|
||||
val showDiscovery = AppConfig.showDiscovery
|
||||
val showRss = AppConfig.showRSS
|
||||
val menu = getNavigationBarView().menu
|
||||
menu.findItem(R.id.menu_discovery).isVisible = showDiscovery
|
||||
menu.findItem(R.id.menu_rss).isVisible = showRss
|
||||
|
||||
val showDiscovery = AppConfig.showDiscovery
|
||||
val showRss = AppConfig.showRSS
|
||||
val menu = getNavigationBarView().menu
|
||||
menu.findItem(R.id.menu_discovery).isVisible = showDiscovery
|
||||
menu.findItem(R.id.menu_rss).isVisible = showRss
|
||||
|
||||
var index = 0
|
||||
if (showDiscovery) {
|
||||
var index = 0
|
||||
if (showDiscovery) {
|
||||
index++
|
||||
realPositions[index] = idExplore
|
||||
}
|
||||
if (showRss) {
|
||||
index++
|
||||
realPositions[index] = idRss
|
||||
}
|
||||
index++
|
||||
realPositions[index] = idExplore
|
||||
realPositions[index] = idMy
|
||||
bottomMenuCount = index + 1
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
if (showRss) {
|
||||
index++
|
||||
realPositions[index] = idRss
|
||||
}
|
||||
index++
|
||||
realPositions[index] = idMy
|
||||
bottomMenuCount = index + 1
|
||||
adapter.notifyDataSetChanged()
|
||||
else getNavigationBarView().gone()
|
||||
}
|
||||
|
||||
private fun upHomePage() {
|
||||
when (AppConfig.defaultHomePage) {
|
||||
"bookshelf" -> {}
|
||||
"explore" -> if (AppConfig.showDiscovery) {
|
||||
"explore" -> if (AppConfig.showDiscovery && AppConfig.showBottomView) {
|
||||
binding.viewPagerMain.setCurrentItem(realPositions.indexOf(idExplore), false)
|
||||
}
|
||||
|
||||
"rss" -> if (AppConfig.showRSS) {
|
||||
"rss" -> if (AppConfig.showRSS && AppConfig.showBottomView) {
|
||||
binding.viewPagerMain.setCurrentItem(realPositions.indexOf(idRss), false)
|
||||
}
|
||||
|
||||
"my" -> binding.viewPagerMain.setCurrentItem(realPositions.indexOf(idMy), false)
|
||||
"my" -> if (AppConfig.showBottomView) {
|
||||
binding.viewPagerMain.setCurrentItem(realPositions.indexOf(idMy), false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -154,8 +154,8 @@ class ExploreAdapter(context: Context, val callBack: CallBack) :
|
||||
}
|
||||
}
|
||||
|
||||
private fun showMenu(view: View, position: Int): Boolean {
|
||||
val source = getItem(position) ?: return true
|
||||
private fun showMenu(view: View, position: Int) {
|
||||
val source = getItem(position) ?: return
|
||||
val popupMenu = PopupMenu(context, view)
|
||||
popupMenu.inflate(R.menu.explore_item)
|
||||
popupMenu.menu.findItem(R.id.menu_login).isVisible = source.hasLoginUrl
|
||||
@@ -180,7 +180,6 @@ class ExploreAdapter(context: Context, val callBack: CallBack) :
|
||||
true
|
||||
}
|
||||
popupMenu.show()
|
||||
return true
|
||||
}
|
||||
|
||||
interface CallBack {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic">
|
||||
<translate
|
||||
android:fromYDelta="100%"
|
||||
android:toYDelta="0%"
|
||||
android:duration="280"/>
|
||||
<alpha
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
android:duration="280"/>
|
||||
</set>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic">
|
||||
<translate
|
||||
android:fromYDelta="0%"
|
||||
android:toYDelta="100%"
|
||||
android:duration="280"/>
|
||||
<alpha
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
android:duration="280"/>
|
||||
</set>
|
||||
@@ -43,54 +43,67 @@
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RadioGroup
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/rg_title_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
app:singleLine="true"
|
||||
app:singleSelection="true"
|
||||
app:selectionRequired="true">
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/rb_title_mode1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dp"
|
||||
android:text="@string/title_left" />
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/rb_title_mode2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dp"
|
||||
android:text="@string/title_center" />
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/rb_title_mode3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dp"
|
||||
android:text="@string/title_hide" />
|
||||
</RadioGroup>
|
||||
|
||||
<io.legato.kazusa.ui.widget.DetailSeekBar
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
<io.legato.kazusa.ui.widget.SimpleCounterView
|
||||
android:id="@+id/dsb_title_size"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:max="10"
|
||||
app:title="@string/title_font_size" />
|
||||
|
||||
<io.legato.kazusa.ui.widget.DetailSeekBar
|
||||
android:id="@+id/dsb_title_top"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:max="100"
|
||||
app:title="@string/title_margin_top" />
|
||||
android:orientation="horizontal">
|
||||
<io.legato.kazusa.ui.widget.SimpleCounterView
|
||||
android:id="@+id/dsb_title_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:max="100"
|
||||
app:title="@string/title_margin_top" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<io.legato.kazusa.ui.widget.SimpleCounterView
|
||||
android:id="@+id/dsb_title_bottom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:max="100"
|
||||
app:title="@string/title_margin_bottom" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<io.legato.kazusa.ui.widget.DetailSeekBar
|
||||
android:id="@+id/dsb_title_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:max="100"
|
||||
app:title="@string/title_margin_bottom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_header_padding"
|
||||
|
||||
@@ -17,16 +17,27 @@
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:id="@+id/tv_empty_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/bookshelf_empty"
|
||||
android:visibility="gone"
|
||||
tools:text="TextView" />
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(๑`^´๑)"
|
||||
android:textSize="30sp"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/bookshelf_empty" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@@ -54,17 +54,29 @@
|
||||
tools:listitem="@layout/item_find_book"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:id="@+id/tv_empty_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="@string/explore_empty"
|
||||
app:layout_anchor="@id/app_bar"
|
||||
app:layout_anchorGravity="bottom|center"
|
||||
app:layout_anchorGravity="center"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:text="TextView" />
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(っ˘ω˘ς )"
|
||||
android:textSize="30sp"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/explore_empty" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -39,20 +39,17 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/flexbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:overScrollMode="never"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="gone"
|
||||
app:dividerDrawable="@drawable/shape_space_divider"
|
||||
app:flexDirection="row"
|
||||
app:flexWrap="wrap"
|
||||
app:showDivider="middle" />
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/flexbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:overScrollMode="never"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="gone"
|
||||
app:dividerDrawable="@drawable/shape_space_divider"
|
||||
app:flexDirection="row"
|
||||
app:flexWrap="wrap"
|
||||
app:showDivider="middle" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,47 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/colorSurfaceContainer"
|
||||
android:padding="8dp">
|
||||
app:cardBackgroundColor="?attr/colorSurfaceContainer"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:flexDirection="row"
|
||||
app:flexWrap="wrap"
|
||||
app:layoutManager="com.google.android.flexbox.FlexboxLayoutManager" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_menu_more"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/more_menu"
|
||||
android:src="@drawable/ic_more_vert"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:id="@+id/recycler_view_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:flexDirection="row"
|
||||
app:flexWrap="wrap"
|
||||
app:layoutManager="com.google.android.flexbox.FlexboxLayoutManager" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_menu_more"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/more_menu"
|
||||
android:src="@drawable/ic_more_vert"
|
||||
android:visibility="gone" />
|
||||
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_seek_title"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<TextView
|
||||
android:id="@+id/preference_title"
|
||||
android:singleLine="true"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
@@ -43,7 +43,7 @@
|
||||
android:text="@string/default1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp" />
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:visibility="gone"
|
||||
android:gravity="right|center_vertical"
|
||||
android:gravity="end|center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="标题"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
<item name="android:layout" tools:ignore="PrivateResource">@layout/m3_alert_dialog</item>
|
||||
</style>
|
||||
|
||||
<style name="TextActionMenuAnimation">
|
||||
<item name="android:windowEnterAnimation">@anim/popup_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/popup_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="ChapterNameText">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
|
||||
@@ -42,6 +42,13 @@
|
||||
android:title="@string/show_rss"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="showBottomView"
|
||||
android:summary="仍可滑动切换页面"
|
||||
android:title="显示底部导航栏"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.NameListPreference
|
||||
android:defaultValue="bookshelf"
|
||||
android:key="defaultHomePage"
|
||||
|
||||
Reference in New Issue
Block a user