页眉处标题未正常截断 #303
This commit is contained in:
@@ -179,16 +179,30 @@ class PageView(context: Context) : FrameLayout(context) {
|
|||||||
ReadTipConfig.apply {
|
ReadTipConfig.apply {
|
||||||
tvHeaderLeft.isGone = tipHeaderLeft == none
|
tvHeaderLeft.isGone = tipHeaderLeft == none
|
||||||
tvHeaderMiddle.isGone = tipHeaderMiddle == none
|
tvHeaderMiddle.isGone = tipHeaderMiddle == none
|
||||||
if (tvHeaderLeft.isGone && tvHeaderMiddle.isGone)
|
if (tipHeaderRight == none) {
|
||||||
tvHeaderRight.isGone = tipHeaderRight == none
|
if (tipHeaderMiddle == none && tipHeaderLeft == none) {
|
||||||
else
|
tvHeaderRight.isGone = true
|
||||||
tvHeaderRight.isInvisible = tipHeaderRight == none
|
} else {
|
||||||
|
tvHeaderRight.isGone = false
|
||||||
|
tvHeaderRight.batteryMode = BatteryView.BatteryMode.EMPTY
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tvHeaderRight.isGone = false
|
||||||
|
tvHeaderRight.batteryMode = BatteryView.BatteryMode.NO_BATTERY
|
||||||
|
}
|
||||||
tvFooterLeft.isGone = tipFooterLeft == none
|
tvFooterLeft.isGone = tipFooterLeft == none
|
||||||
tvFooterMiddle.isGone = tipFooterMiddle == none
|
tvFooterMiddle.isGone = tipFooterMiddle == none
|
||||||
if (tvFooterLeft.isGone && tvFooterMiddle.isGone)
|
if (tipFooterRight == none) {
|
||||||
tvFooterRight.isGone = tipFooterRight == none
|
if (tipFooterLeft == none && tipFooterMiddle == none) {
|
||||||
else
|
tvFooterRight.isGone = true
|
||||||
tvFooterRight.isInvisible = tipFooterRight == none
|
} else {
|
||||||
|
tvFooterRight.isGone = false
|
||||||
|
tvFooterRight.batteryMode = BatteryView.BatteryMode.EMPTY
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tvFooterRight.isGone = false
|
||||||
|
tvFooterRight.batteryMode = BatteryView.BatteryMode.NO_BATTERY
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tvTitle = getTipView(ReadTipConfig.chapterTitle)?.apply {
|
tvTitle = getTipView(ReadTipConfig.chapterTitle)?.apply {
|
||||||
tag = ReadTipConfig.chapterTitle
|
tag = ReadTipConfig.chapterTitle
|
||||||
|
|||||||
@@ -15,17 +15,24 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<io.legado.app.ui.widget.image.CoverImageView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/iv_cover"
|
android:id="@+id/cd_cover"
|
||||||
android:layout_width="70dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="98dp"
|
android:layout_height="wrap_content"
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/image_cover_default"
|
app:strokeWidth="0dp"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
tools:ignore="ImageContrastCheck" />
|
<io.legado.app.ui.widget.image.CoverImageView
|
||||||
|
android:id="@+id/iv_cover"
|
||||||
|
android:layout_width="70dp"
|
||||||
|
android:layout_height="98dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/image_cover_default"
|
||||||
|
tools:ignore="ImageContrastCheck" />
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/rl_loading"
|
android:id="@+id/rl_loading"
|
||||||
@@ -36,9 +43,9 @@
|
|||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_cover"
|
app:layout_constraintTop_toTopOf="@id/cd_cover"
|
||||||
app:layout_constraintStart_toStartOf="@id/iv_cover"
|
app:layout_constraintStart_toStartOf="@id/cd_cover"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_cover" />
|
app:layout_constraintEnd_toEndOf="@id/cd_cover" />
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/cd_unread"
|
android:id="@+id/cd_unread"
|
||||||
@@ -49,8 +56,8 @@
|
|||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:strokeWidth="0dp"
|
app:strokeWidth="0dp"
|
||||||
app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_cover"
|
app:layout_constraintTop_toTopOf="@id/cd_cover"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_cover">
|
app:layout_constraintEnd_toEndOf="@id/cd_cover">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_unread"
|
android:id="@+id/tv_unread"
|
||||||
@@ -74,7 +81,7 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_cover"
|
app:layout_constraintStart_toEndOf="@id/cd_cover"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/arrow_icon"
|
android:id="@+id/arrow_icon"
|
||||||
android:layout_width="12dp"
|
android:layout_width="12dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="12dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
|
|||||||
Reference in New Issue
Block a user