|
|
@ -6,11 +6,11 @@ import android.text.SpannableString |
|
|
|
import android.text.style.ForegroundColorSpan |
|
|
|
import android.text.style.ForegroundColorSpan |
|
|
|
import android.util.AttributeSet |
|
|
|
import android.util.AttributeSet |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.help.AppConfig |
|
|
|
|
|
|
|
import io.legado.app.help.ReadBookConfig |
|
|
|
import io.legado.app.help.ReadBookConfig |
|
|
|
import io.legado.app.lib.dialogs.alert |
|
|
|
import io.legado.app.lib.dialogs.alert |
|
|
|
import io.legado.app.lib.theme.accentColor |
|
|
|
import io.legado.app.lib.theme.accentColor |
|
|
|
import io.legado.app.ui.widget.text.StrokeTextView |
|
|
|
import io.legado.app.ui.widget.text.StrokeTextView |
|
|
|
|
|
|
|
import io.legado.app.utils.applyTint |
|
|
|
import org.jetbrains.anko.sdk27.listeners.onClick |
|
|
|
import org.jetbrains.anko.sdk27.listeners.onClick |
|
|
|
|
|
|
|
|
|
|
|
class TextFontWeightConverter(context: Context, attrs: AttributeSet?) : StrokeTextView(context, attrs) { |
|
|
|
class TextFontWeightConverter(context: Context, attrs: AttributeSet?) : StrokeTextView(context, attrs) { |
|
|
@ -46,7 +46,7 @@ class TextFontWeightConverter(context: Context, attrs: AttributeSet?) : StrokeTe |
|
|
|
upUi(i) |
|
|
|
upUi(i) |
|
|
|
onChanged?.invoke() |
|
|
|
onChanged?.invoke() |
|
|
|
} |
|
|
|
} |
|
|
|
}.show() |
|
|
|
}.show().applyTint() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun onChanged(unit: () -> Unit) { |
|
|
|
fun onChanged(unit: () -> Unit) { |
|
|
|