优化
This commit is contained in:
@@ -111,7 +111,6 @@ import io.legado.app.utils.isAbsUrl
|
|||||||
import io.legado.app.utils.isTrue
|
import io.legado.app.utils.isTrue
|
||||||
import io.legado.app.utils.launch
|
import io.legado.app.utils.launch
|
||||||
import io.legado.app.utils.navigationBarGravity
|
import io.legado.app.utils.navigationBarGravity
|
||||||
import io.legado.app.utils.navigationBarHeight
|
|
||||||
import io.legado.app.utils.observeEvent
|
import io.legado.app.utils.observeEvent
|
||||||
import io.legado.app.utils.observeEventSticky
|
import io.legado.app.utils.observeEventSticky
|
||||||
import io.legado.app.utils.postEvent
|
import io.legado.app.utils.postEvent
|
||||||
@@ -297,7 +296,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
if (!ReadBook.inBookshelf) {
|
if (!ReadBook.inBookshelf) {
|
||||||
viewModel.removeFromBookshelf(null)
|
viewModel.removeFromBookshelf(null)
|
||||||
}
|
}
|
||||||
viewModel.initData(intent ?: return)
|
viewModel.initData(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
||||||
@@ -776,7 +775,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
override fun showTextActionMenu() {
|
override fun showTextActionMenu() {
|
||||||
val navigationBarHeight =
|
val navigationBarHeight =
|
||||||
if (!ReadBookConfig.hideNavigationBar && navigationBarGravity == Gravity.BOTTOM)
|
if (!ReadBookConfig.hideNavigationBar && navigationBarGravity == Gravity.BOTTOM)
|
||||||
navigationBarHeight else 0
|
binding.navigationBar.height else 0
|
||||||
textActionMenu.show(
|
textActionMenu.show(
|
||||||
binding.textMenuPosition,
|
binding.textMenuPosition,
|
||||||
binding.root.height + navigationBarHeight,
|
binding.root.height + navigationBarHeight,
|
||||||
@@ -1341,7 +1340,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
}
|
}
|
||||||
val navigationBarHeight =
|
val navigationBarHeight =
|
||||||
if (!ReadBookConfig.hideNavigationBar && navigationBarGravity == Gravity.BOTTOM)
|
if (!ReadBookConfig.hideNavigationBar && navigationBarGravity == Gravity.BOTTOM)
|
||||||
navigationBarHeight else 0
|
binding.navigationBar.height else 0
|
||||||
popupAction.showAtLocation(
|
popupAction.showAtLocation(
|
||||||
binding.readView, Gravity.BOTTOM or Gravity.LEFT, x.toInt(),
|
binding.readView, Gravity.BOTTOM or Gravity.LEFT, x.toInt(),
|
||||||
binding.root.height + navigationBarHeight - y.toInt()
|
binding.root.height + navigationBarHeight - y.toInt()
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ class ReadMenu @JvmOverloads constructor(
|
|||||||
private val callBack: CallBack get() = activity as CallBack
|
private val callBack: CallBack get() = activity as CallBack
|
||||||
private val binding = ViewReadMenuBinding.inflate(LayoutInflater.from(context), this, true)
|
private val binding = ViewReadMenuBinding.inflate(LayoutInflater.from(context), this, true)
|
||||||
private var confirmSkipToChapter: Boolean = false
|
private var confirmSkipToChapter: Boolean = false
|
||||||
|
private var isMenuOutAnimating = false
|
||||||
private val menuTopIn: Animation by lazy {
|
private val menuTopIn: Animation by lazy {
|
||||||
loadAnimation(context, R.anim.anim_readbook_top_in)
|
loadAnimation(context, R.anim.anim_readbook_top_in)
|
||||||
}
|
}
|
||||||
@@ -151,6 +152,7 @@ class ReadMenu @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
private val menuOutListener = object : Animation.AnimationListener {
|
private val menuOutListener = object : Animation.AnimationListener {
|
||||||
override fun onAnimationStart(animation: Animation) {
|
override fun onAnimationStart(animation: Animation) {
|
||||||
|
isMenuOutAnimating = true
|
||||||
binding.vwMenuBg.setOnClickListener(null)
|
binding.vwMenuBg.setOnClickListener(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,6 +161,7 @@ class ReadMenu @JvmOverloads constructor(
|
|||||||
binding.titleBar.invisible()
|
binding.titleBar.invisible()
|
||||||
binding.bottomMenu.invisible()
|
binding.bottomMenu.invisible()
|
||||||
canShowMenu = false
|
canShowMenu = false
|
||||||
|
isMenuOutAnimating = false
|
||||||
onMenuOutEnd?.invoke()
|
onMenuOutEnd?.invoke()
|
||||||
callBack.upSystemUiVisibility()
|
callBack.upSystemUiVisibility()
|
||||||
}
|
}
|
||||||
@@ -309,6 +312,9 @@ class ReadMenu @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun runMenuOut(anim: Boolean = !AppConfig.isEInkMode, onMenuOutEnd: (() -> Unit)? = null) {
|
fun runMenuOut(anim: Boolean = !AppConfig.isEInkMode, onMenuOutEnd: (() -> Unit)? = null) {
|
||||||
|
if (isMenuOutAnimating) {
|
||||||
|
return
|
||||||
|
}
|
||||||
callBack.onMenuHide()
|
callBack.onMenuHide()
|
||||||
this.onMenuOutEnd = onMenuOutEnd
|
this.onMenuOutEnd = onMenuOutEnd
|
||||||
if (this.isVisible) {
|
if (this.isVisible) {
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class SearchMenu @JvmOverloads constructor(
|
|||||||
Selector.colorBuild().setDefaultColor(bgColor)
|
Selector.colorBuild().setDefaultColor(bgColor)
|
||||||
.setPressedColor(ColorUtils.darkenColor(bgColor)).create()
|
.setPressedColor(ColorUtils.darkenColor(bgColor)).create()
|
||||||
private var onMenuOutEnd: (() -> Unit)? = null
|
private var onMenuOutEnd: (() -> Unit)? = null
|
||||||
|
private var isMenuOutAnimating = false
|
||||||
|
|
||||||
private val searchResultList: MutableList<SearchResult> = mutableListOf()
|
private val searchResultList: MutableList<SearchResult> = mutableListOf()
|
||||||
private var currentSearchResultIndex: Int = -1
|
private var currentSearchResultIndex: Int = -1
|
||||||
@@ -94,18 +95,18 @@ class SearchMenu @JvmOverloads constructor(
|
|||||||
|
|
||||||
fun runMenuIn() {
|
fun runMenuIn() {
|
||||||
this.visible()
|
this.visible()
|
||||||
binding.llSearchBaseInfo.visible()
|
binding.llBottomMenu.visible()
|
||||||
binding.llBottomBg.visible()
|
|
||||||
binding.vwMenuBg.visible()
|
binding.vwMenuBg.visible()
|
||||||
binding.llSearchBaseInfo.startAnimation(menuBottomIn)
|
binding.llBottomMenu.startAnimation(menuBottomIn)
|
||||||
binding.llBottomBg.startAnimation(menuBottomIn)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun runMenuOut(onMenuOutEnd: (() -> Unit)? = null) {
|
fun runMenuOut(onMenuOutEnd: (() -> Unit)? = null) {
|
||||||
|
if (isMenuOutAnimating) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.onMenuOutEnd = onMenuOutEnd
|
this.onMenuOutEnd = onMenuOutEnd
|
||||||
if (this.isVisible) {
|
if (this.isVisible) {
|
||||||
binding.llSearchBaseInfo.startAnimation(menuBottomOut)
|
binding.llBottomMenu.startAnimation(menuBottomOut)
|
||||||
binding.llBottomBg.startAnimation(menuBottomOut)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,12 +217,13 @@ class SearchMenu @JvmOverloads constructor(
|
|||||||
//隐藏菜单
|
//隐藏菜单
|
||||||
menuBottomOut.setAnimationListener(object : Animation.AnimationListener {
|
menuBottomOut.setAnimationListener(object : Animation.AnimationListener {
|
||||||
override fun onAnimationStart(animation: Animation) {
|
override fun onAnimationStart(animation: Animation) {
|
||||||
|
isMenuOutAnimating = true
|
||||||
binding.vwMenuBg.setOnClickListener(null)
|
binding.vwMenuBg.setOnClickListener(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAnimationEnd(animation: Animation) {
|
override fun onAnimationEnd(animation: Animation) {
|
||||||
binding.llSearchBaseInfo.invisible()
|
isMenuOutAnimating = false
|
||||||
binding.llBottomBg.invisible()
|
binding.llBottomMenu.invisible()
|
||||||
binding.vwMenuBg.invisible()
|
binding.vwMenuBg.invisible()
|
||||||
binding.vwMenuBg.setOnClickListener { runMenuOut() }
|
binding.vwMenuBg.setOnClickListener { runMenuOut() }
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,11 @@ class AutoReadDialog : BaseDialogFragment(R.layout.dialog_auto_read) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) = binding.run {
|
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) = binding.run {
|
||||||
(activity as ReadBookActivity).bottomDialog++
|
val bottomDialog = (activity as ReadBookActivity).bottomDialog++
|
||||||
|
if (bottomDialog > 0) {
|
||||||
|
dismiss()
|
||||||
|
return
|
||||||
|
}
|
||||||
val bg = requireContext().bottomBackground
|
val bg = requireContext().bottomBackground
|
||||||
val isLight = ColorUtils.isColorLight(bg)
|
val isLight = ColorUtils.isColorLight(bg)
|
||||||
val textColor = requireContext().getPrimaryTextColor(isLight)
|
val textColor = requireContext().getPrimaryTextColor(isLight)
|
||||||
|
|||||||
@@ -49,7 +49,11 @@ class ReadAloudDialog : BaseDialogFragment(R.layout.dialog_read_aloud) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
(activity as ReadBookActivity).bottomDialog++
|
val bottomDialog = (activity as ReadBookActivity).bottomDialog++
|
||||||
|
if (bottomDialog > 0) {
|
||||||
|
dismiss()
|
||||||
|
return
|
||||||
|
}
|
||||||
val bg = requireContext().bottomBackground
|
val bg = requireContext().bottomBackground
|
||||||
val isLight = ColorUtils.isColorLight(bg)
|
val isLight = ColorUtils.isColorLight(bg)
|
||||||
val textColor = requireContext().getPrimaryTextColor(isLight)
|
val textColor = requireContext().getPrimaryTextColor(isLight)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
android:contentDescription="@string/content"
|
android:contentDescription="@string/content"
|
||||||
tools:layout_editor_absoluteX="0dp"
|
tools:layout_editor_absoluteX="0dp"
|
||||||
tools:layout_editor_absoluteY="0dp"
|
tools:layout_editor_absoluteY="0dp"
|
||||||
tools:visibility="invisible"/>
|
tools:visibility="invisible" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/fabLeft"
|
android:id="@+id/fabLeft"
|
||||||
@@ -53,224 +53,230 @@
|
|||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_search_base_info"
|
android:id="@+id/ll_bottom_menu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="36dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/background_menu"
|
android:orientation="vertical"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingRight="10dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/ll_bottom_bg">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_search_content_up"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:contentDescription="@string/go_to_top"
|
|
||||||
android:src="@drawable/ic_arrow_drop_up"
|
|
||||||
android:tooltipText="@string/go_to_top"
|
|
||||||
app:tint="@color/primaryText"
|
|
||||||
tools:ignore="UnusedAttribute" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_search_content_down"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:contentDescription="@string/go_to_bottom"
|
|
||||||
android:src="@drawable/ic_arrow_drop_down"
|
|
||||||
android:tooltipText="@string/go_to_bottom"
|
|
||||||
app:tint="@color/primaryText"
|
|
||||||
tools:ignore="UnusedAttribute" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_current_search_info"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:ellipsize="middle"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingRight="10dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="@color/primaryText"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_bottom_bg"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:baselineAligned="false"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:importantForAccessibility="no" />
|
|
||||||
|
|
||||||
<!--结果按钮-->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_search_results"
|
android:id="@+id/ll_search_base_info"
|
||||||
android:layout_width="50dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="36dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="@color/background_menu"
|
||||||
android:clickable="true"
|
android:gravity="center_vertical"
|
||||||
android:contentDescription="结果"
|
android:orientation="horizontal"
|
||||||
android:focusable="true"
|
android:paddingLeft="10dp"
|
||||||
android:orientation="vertical"
|
android:paddingRight="10dp">
|
||||||
android:paddingBottom="7dp">
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_search_results"
|
android:id="@+id/iv_search_content_up"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="36dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/go_to_top"
|
||||||
|
android:src="@drawable/ic_arrow_drop_up"
|
||||||
|
android:tooltipText="@string/go_to_top"
|
||||||
|
app:tint="@color/primaryText"
|
||||||
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_search_content_down"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/go_to_bottom"
|
||||||
|
android:src="@drawable/ic_arrow_drop_down"
|
||||||
|
android:tooltipText="@string/go_to_bottom"
|
||||||
|
app:tint="@color/primaryText"
|
||||||
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_current_search_info"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:ellipsize="middle"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/primaryText"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_bottom_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:importantForAccessibility="no" />
|
||||||
|
|
||||||
|
<!--结果按钮-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_search_results"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:clickable="true"
|
||||||
android:contentDescription="结果"
|
android:contentDescription="结果"
|
||||||
android:src="@drawable/ic_toc"
|
android:focusable="true"
|
||||||
app:tint="@color/primaryText"
|
android:orientation="vertical"
|
||||||
tools:ignore="NestedWeights" />
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_search_results"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:text="结果"
|
|
||||||
android:textColor="@color/primaryText"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<View
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_width="0dp"
|
android:id="@+id/iv_search_results"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_weight="2" />
|
android:layout_height="0dp"
|
||||||
<!--调节按钮-->
|
android:layout_weight="1"
|
||||||
<LinearLayout
|
android:contentDescription="结果"
|
||||||
android:id="@+id/ll_main_menu"
|
android:src="@drawable/ic_toc"
|
||||||
android:layout_width="50dp"
|
app:tint="@color/primaryText"
|
||||||
android:layout_height="50dp"
|
tools:ignore="NestedWeights" />
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:clickable="true"
|
|
||||||
android:contentDescription="@string/read_aloud"
|
|
||||||
android:focusable="true"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingBottom="7dp">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<TextView
|
||||||
android:id="@+id/iv_main_menu"
|
android:id="@+id/tv_search_results"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_gravity="center_horizontal"
|
||||||
android:contentDescription="@string/main_menu"
|
android:layout_marginTop="3dp"
|
||||||
android:src="@drawable/ic_menu"
|
android:maxLines="1"
|
||||||
app:tint="@color/primaryText"
|
android:text="结果"
|
||||||
tools:ignore="NestedWeights" />
|
android:textColor="@color/primaryText"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_main_menu"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:text="@string/main_menu"
|
|
||||||
android:textColor="@color/primaryText"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="2" />
|
android:layout_weight="2" />
|
||||||
<!--界面按钮-->
|
<!--调节按钮-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_search_exit"
|
android:id="@+id/ll_main_menu"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:contentDescription="退出"
|
android:contentDescription="@string/read_aloud"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="7dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_search_exit"
|
android:id="@+id/iv_main_menu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:contentDescription="@string/main_menu"
|
||||||
|
android:src="@drawable/ic_menu"
|
||||||
|
app:tint="@color/primaryText"
|
||||||
|
tools:ignore="NestedWeights" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_main_menu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@string/main_menu"
|
||||||
|
android:textColor="@color/primaryText"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
<!--界面按钮-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_search_exit"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:clickable="true"
|
||||||
android:contentDescription="退出"
|
android:contentDescription="退出"
|
||||||
android:src="@drawable/ic_auto_page_stop"
|
android:focusable="true"
|
||||||
app:tint="@color/primaryText"
|
android:orientation="vertical"
|
||||||
tools:ignore="NestedWeights" />
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_search_exit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:contentDescription="退出"
|
||||||
|
android:src="@drawable/ic_auto_page_stop"
|
||||||
|
app:tint="@color/primaryText"
|
||||||
|
tools:ignore="NestedWeights" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_search_exit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="退出"
|
||||||
|
android:textColor="@color/primaryText"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- <View-->
|
||||||
|
<!-- android:layout_width="0dp"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- android:layout_weight="2" />-->
|
||||||
|
<!-- <!–设置按钮–>-->
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:id="@+id/ll_setting"-->
|
||||||
|
<!-- android:layout_width="50dp"-->
|
||||||
|
<!-- android:layout_height="50dp"-->
|
||||||
|
<!-- android:background="?android:attr/selectableItemBackgroundBorderless"-->
|
||||||
|
<!-- android:clickable="true"-->
|
||||||
|
<!-- android:contentDescription="@string/setting"-->
|
||||||
|
<!-- android:focusable="true"-->
|
||||||
|
<!-- android:orientation="vertical"-->
|
||||||
|
<!-- android:paddingBottom="7dp">-->
|
||||||
|
|
||||||
|
<!-- <androidx.appcompat.widget.AppCompatImageView-->
|
||||||
|
<!-- android:id="@+id/iv_setting"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="0dp"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- android:contentDescription="@string/aloud_config"-->
|
||||||
|
<!-- android:src="@drawable/ic_settings"-->
|
||||||
|
<!-- app:tint="@color/primaryText"-->
|
||||||
|
<!-- tools:ignore="NestedWeights" />-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/tv_setting"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_gravity="center_horizontal"-->
|
||||||
|
<!-- android:layout_marginTop="3dp"-->
|
||||||
|
<!-- android:maxLines="1"-->
|
||||||
|
<!-- android:text="@string/setting"-->
|
||||||
|
<!-- android:textColor="@color/primaryText"-->
|
||||||
|
<!-- android:textSize="12sp" />-->
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:importantForAccessibility="no" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_search_exit"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:text="退出"
|
|
||||||
android:textColor="@color/primaryText"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- <View-->
|
|
||||||
<!-- android:layout_width="0dp"-->
|
|
||||||
<!-- android:layout_height="match_parent"-->
|
|
||||||
<!-- android:layout_weight="2" />-->
|
|
||||||
<!-- <!–设置按钮–>-->
|
|
||||||
<!-- <LinearLayout-->
|
|
||||||
<!-- android:id="@+id/ll_setting"-->
|
|
||||||
<!-- android:layout_width="50dp"-->
|
|
||||||
<!-- android:layout_height="50dp"-->
|
|
||||||
<!-- android:background="?android:attr/selectableItemBackgroundBorderless"-->
|
|
||||||
<!-- android:clickable="true"-->
|
|
||||||
<!-- android:contentDescription="@string/setting"-->
|
|
||||||
<!-- android:focusable="true"-->
|
|
||||||
<!-- android:orientation="vertical"-->
|
|
||||||
<!-- android:paddingBottom="7dp">-->
|
|
||||||
|
|
||||||
<!-- <androidx.appcompat.widget.AppCompatImageView-->
|
|
||||||
<!-- android:id="@+id/iv_setting"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="0dp"-->
|
|
||||||
<!-- android:layout_weight="1"-->
|
|
||||||
<!-- android:contentDescription="@string/aloud_config"-->
|
|
||||||
<!-- android:src="@drawable/ic_settings"-->
|
|
||||||
<!-- app:tint="@color/primaryText"-->
|
|
||||||
<!-- tools:ignore="NestedWeights" />-->
|
|
||||||
|
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:id="@+id/tv_setting"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:layout_gravity="center_horizontal"-->
|
|
||||||
<!-- android:layout_marginTop="3dp"-->
|
|
||||||
<!-- android:maxLines="1"-->
|
|
||||||
<!-- android:text="@string/setting"-->
|
|
||||||
<!-- android:textColor="@color/primaryText"-->
|
|
||||||
<!-- android:textSize="12sp" />-->
|
|
||||||
<!-- </LinearLayout>-->
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:importantForAccessibility="no" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user