Revert some KTX extension changes

These weren't exactly 1:1 replacements. Might be related to #7391.
This commit is contained in:
arkon 2022-06-30 22:13:31 -04:00
parent f26cfa58e4
commit b9e108eb4d
3 changed files with 5 additions and 7 deletions

View File

@ -3,11 +3,11 @@ package eu.kanade.tachiyomi.ui.reader
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.graphics.Color import android.graphics.Color
import android.text.Spannable
import android.text.SpannableString import android.text.SpannableString
import android.text.style.ScaleXSpan import android.text.style.ScaleXSpan
import android.util.AttributeSet import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatTextView import androidx.appcompat.widget.AppCompatTextView
import androidx.core.text.set
import eu.kanade.tachiyomi.widget.OutlineSpan import eu.kanade.tachiyomi.widget.OutlineSpan
/** /**
@ -31,10 +31,10 @@ class PageIndicatorTextView(
// Also add a bit of spacing between each character, as the stroke overlaps them // Also add a bit of spacing between each character, as the stroke overlaps them
val finalText = SpannableString(currText.asIterable().joinToString("\u00A0")).apply { val finalText = SpannableString(currText.asIterable().joinToString("\u00A0")).apply {
// Apply text outline // Apply text outline
set(1, length - 1, spanOutline) setSpan(spanOutline, 1, length - 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
for (i in 1..lastIndex step 2) { for (i in 1..lastIndex step 2) {
set(i, i + 1, ScaleXSpan(0.2f)) setSpan(ScaleXSpan(0.2f), i, i + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
} }
} }

View File

@ -9,7 +9,6 @@ import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import android.widget.LinearLayout import android.widget.LinearLayout
import androidx.appcompat.widget.AppCompatTextView import androidx.appcompat.widget.AppCompatTextView
import androidx.core.view.updatePadding
import com.google.android.material.progressindicator.CircularProgressIndicator import com.google.android.material.progressindicator.CircularProgressIndicator
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.reader.model.ChapterTransition import eu.kanade.tachiyomi.ui.reader.model.ChapterTransition
@ -56,7 +55,7 @@ class PagerTransitionHolder(
orientation = VERTICAL orientation = VERTICAL
gravity = Gravity.CENTER gravity = Gravity.CENTER
val sidePadding = 64.dpToPx val sidePadding = 64.dpToPx
updatePadding(left = sidePadding, right = sidePadding) setPadding(sidePadding, 0, sidePadding, 0)
val transitionView = ReaderTransitionView(context) val transitionView = ReaderTransitionView(context)
addView(transitionView) addView(transitionView)

View File

@ -12,7 +12,6 @@ import android.util.AttributeSet
import android.view.animation.LinearInterpolator import android.view.animation.LinearInterpolator
import android.widget.TextView import android.widget.TextView
import androidx.annotation.FloatRange import androidx.annotation.FloatRange
import androidx.core.graphics.drawable.updateBounds
import androidx.core.graphics.withTranslation import androidx.core.graphics.withTranslation
import androidx.lifecycle.coroutineScope import androidx.lifecycle.coroutineScope
import androidx.lifecycle.findViewTreeLifecycleOwner import androidx.lifecycle.findViewTreeLifecycleOwner
@ -93,7 +92,7 @@ class TachiyomiAppBarLayout @JvmOverloads constructor(
override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) { override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
super.onLayout(changed, l, t, r, b) super.onLayout(changed, l, t, r, b)
statusBarForeground?.updateBounds(right = width, bottom = paddingTop) statusBarForeground?.setBounds(0, 0, width, paddingTop)
} }
override fun onOffsetChanged(offset: Int) { override fun onOffsetChanged(offset: Int) {