优化
This commit is contained in:
@@ -10,6 +10,8 @@ import android.widget.CheckBox
|
||||
import android.widget.LinearLayout
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import io.legado.app.R
|
||||
import io.legado.app.base.VMBaseActivity
|
||||
@@ -72,6 +74,7 @@ import io.legado.app.utils.visible
|
||||
import kotlinx.coroutines.Dispatchers.IO
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import splitties.views.bottomPadding
|
||||
|
||||
class BookInfoActivity :
|
||||
VMBaseActivity<ActivityBookInfoBinding, BookInfoViewModel>(toolBarTheme = Theme.Dark),
|
||||
@@ -161,6 +164,11 @@ class BookInfoActivity :
|
||||
viewModel.waitDialogData.observe(this) { upWaitDialogStatus(it) }
|
||||
viewModel.initData(intent)
|
||||
initViewEvent()
|
||||
ViewCompat.setOnApplyWindowInsetsListener(binding.flAction) { _, windowInsets ->
|
||||
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.navigationBars())
|
||||
binding.flAction.bottomPadding = insets.bottom
|
||||
windowInsets
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/fl_action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/background_menu"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
@@ -382,7 +382,7 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_shelf"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
@@ -396,7 +396,7 @@
|
||||
<io.legado.app.ui.widget.text.AccentBgTextView
|
||||
android:id="@+id/tv_read"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
|
||||
Reference in New Issue
Block a user