6.6.2 - Alpha5 - 主题色设置页面新布局支持显示颜色详情
This commit is contained in:
@@ -0,0 +1,51 @@
|
|||||||
|
package org.autojs.autojs.extension
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.TextView
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
|
import org.autojs.autojs.util.ClipboardUtils
|
||||||
|
import org.autojs.autojs.util.IntentUtils
|
||||||
|
import org.autojs.autojs.util.ViewUtils
|
||||||
|
import org.autojs.autojs6.R
|
||||||
|
|
||||||
|
object MaterialDialogExtensions {
|
||||||
|
|
||||||
|
fun MaterialDialog.makeSettingsLaunchable(viewGetter: (dialog: MaterialDialog) -> View?, packageName: String?) {
|
||||||
|
viewGetter(this)?.setOnClickListener {
|
||||||
|
packageName?.let { pkg ->
|
||||||
|
IntentUtils.goToAppDetailSettings(this.context, pkg)
|
||||||
|
} ?: ViewUtils.showSnack(this.view, R.string.error_app_not_installed)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun MaterialDialog.makeTextCopyable(textViewGetter: (dialog: MaterialDialog) -> TextView?) {
|
||||||
|
makeTextCopyable(textViewGetter(this))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun MaterialDialog.makeTextCopyable(textView: TextView?, textValue: String? = textView?.text?.toString()) {
|
||||||
|
if (textValue != null) {
|
||||||
|
val context = this.context
|
||||||
|
textView?.setOnClickListener {
|
||||||
|
ClipboardUtils.setClip(context, textValue)
|
||||||
|
ViewUtils.showSnack(this.view, "${context.getString(R.string.text_already_copied_to_clip)}: $textValue")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun TextView.setCopyableTextIfAbsent(dialog: MaterialDialog, f: () -> String?) {
|
||||||
|
val textView = this
|
||||||
|
val textValue = f.invoke()
|
||||||
|
if (textView.text == context.getString(R.string.ellipsis_six)) {
|
||||||
|
textView.text = textValue.takeUnless { it.isNullOrBlank() } ?: context.getString(R.string.text_unknown)
|
||||||
|
}
|
||||||
|
dialog.makeTextCopyable(textView, textValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun TextView.setCopyableText(dialog: MaterialDialog, f: () -> String?) {
|
||||||
|
val textView = this
|
||||||
|
val textValue = f.invoke()
|
||||||
|
textView.text = textValue.takeUnless { it.isNullOrBlank() } ?: context.getString(R.string.text_unknown)
|
||||||
|
dialog.makeTextCopyable(textView, textValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -26,14 +26,4 @@ object NumberExtensions {
|
|||||||
.toPlainString()
|
.toPlainString()
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
@JvmOverloads
|
|
||||||
fun Double.roundToAlphaString(scale: Int = 2, keepTrailingZeroForFullAlpha: Boolean = true): String {
|
|
||||||
return toBigDecimal()
|
|
||||||
.setScale(scale, RoundingMode.HALF_UP)
|
|
||||||
.stripTrailingZeros()
|
|
||||||
.toPlainString()
|
|
||||||
.let { if (keepTrailingZeroForFullAlpha && it == "1") "1.0" else it }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,5 +59,4 @@ object StringExtensions {
|
|||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import org.autojs.autojs.extension.ArrayExtensions.toNativeArray
|
|||||||
import org.autojs.autojs.extension.ArrayExtensions.toNativeObject
|
import org.autojs.autojs.extension.ArrayExtensions.toNativeObject
|
||||||
import org.autojs.autojs.extension.FlexibleArray.Companion.component1
|
import org.autojs.autojs.extension.FlexibleArray.Companion.component1
|
||||||
import org.autojs.autojs.extension.FlexibleArray.Companion.component2
|
import org.autojs.autojs.extension.FlexibleArray.Companion.component2
|
||||||
import org.autojs.autojs.extension.NumberExtensions.jsString
|
|
||||||
import org.autojs.autojs.extension.NumberExtensions.roundToAlphaString
|
|
||||||
import org.autojs.autojs.extension.ScriptableExtensions.prop
|
import org.autojs.autojs.extension.ScriptableExtensions.prop
|
||||||
import org.autojs.autojs.extension.ScriptableObjectExtensions.inquire
|
import org.autojs.autojs.extension.ScriptableObjectExtensions.inquire
|
||||||
import org.autojs.autojs.runtime.api.augment.Augmentable
|
import org.autojs.autojs.runtime.api.augment.Augmentable
|
||||||
@@ -30,6 +28,10 @@ import org.autojs.autojs.runtime.exception.ShouldNeverHappenException
|
|||||||
import org.autojs.autojs.runtime.exception.WrappedIllegalArgumentException
|
import org.autojs.autojs.runtime.exception.WrappedIllegalArgumentException
|
||||||
import org.autojs.autojs.theme.ThemeColor
|
import org.autojs.autojs.theme.ThemeColor
|
||||||
import org.autojs.autojs.util.ColorUtils
|
import org.autojs.autojs.util.ColorUtils
|
||||||
|
import org.autojs.autojs.util.ColorUtils.roundToAlphaString
|
||||||
|
import org.autojs.autojs.util.ColorUtils.roundToHueString
|
||||||
|
import org.autojs.autojs.util.ColorUtils.roundToSaturationString
|
||||||
|
import org.autojs.autojs.util.ColorUtils.roundToValueString
|
||||||
import org.autojs.autojs.util.RhinoUtils.coerceBoolean
|
import org.autojs.autojs.util.RhinoUtils.coerceBoolean
|
||||||
import org.autojs.autojs.util.RhinoUtils.ensureNativeArrayLength
|
import org.autojs.autojs.util.RhinoUtils.ensureNativeArrayLength
|
||||||
import org.autojs.autojs.util.RhinoUtils.newNativeObject
|
import org.autojs.autojs.util.RhinoUtils.newNativeObject
|
||||||
@@ -129,11 +131,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
::toHsla.name,
|
::toHsla.name,
|
||||||
::toRgbString.name,
|
::toRgbString.name,
|
||||||
::toRgbaString.name,
|
::toRgbaString.name,
|
||||||
// ::toArgbString.name,
|
::toArgbString.name,
|
||||||
// ::toHsvString.name,
|
::toHsvString.name,
|
||||||
// ::toHsvaString.name,
|
::toHsvaString.name,
|
||||||
// ::toHslString.name,
|
::toHslString.name,
|
||||||
// ::toHslaString.name,
|
::toHslaString.name,
|
||||||
::isSimilar.name,
|
::isSimilar.name,
|
||||||
::isEqual.name,
|
::isEqual.name,
|
||||||
::toColorStateList.name,
|
::toColorStateList.name,
|
||||||
@@ -626,10 +628,10 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - red: ColorComponent <br>
|
* * red: `ColorComponent`
|
||||||
* - green: ColorComponent <br>
|
* * green: `ColorComponent`
|
||||||
* - blue: ColorComponent <br>
|
* * blue: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -639,9 +641,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - o <1> rgbComponents: [ColorComponent, ColorComponent, ColorComponent] <br>
|
* * o <1> rgbComponents: `[ColorComponent, ColorComponent, ColorComponent]`
|
||||||
* - o <2> color: OmniColor <br>
|
* * o <2> color: `OmniColor`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -664,11 +666,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - alpha: ColorComponent <br>
|
* * alpha: `ColorComponent`
|
||||||
* - red: ColorComponent <br>
|
* * red: `ColorComponent`
|
||||||
* - green: ColorComponent <br>
|
* * green: `ColorComponent`
|
||||||
* - blue: ColorComponent <br>
|
* * blue: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -678,9 +680,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - o <1> argbComponents: [ColorComponent, ColorComponent, ColorComponent, ColorComponent] <br>
|
* * o <1> argbComponents: `[ColorComponent, ColorComponent, ColorComponent, ColorComponent]`
|
||||||
* - o <2> colorHex: String (#AARRGGBB) <br>
|
* * o <2> colorHex: `String` (#AARRGGBB)
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -704,11 +706,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - red: ColorComponent <br>
|
* * red: `ColorComponent`
|
||||||
* - green: ColorComponent <br>
|
* * green: `ColorComponent`
|
||||||
* - blue: ColorComponent <br>
|
* * blue: `ColorComponent`
|
||||||
* - alpha: ColorComponent <br>
|
* * alpha: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -718,9 +720,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - rgbComponents: [ColorComponent, ColorComponent, ColorComponent] <br>
|
* * rgbComponents: `[ColorComponent, ColorComponent, ColorComponent]`
|
||||||
* - alpha: ColorComponent <br>
|
* * alpha: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -731,9 +733,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - o <1> rgbaComponents: [ColorComponent, ColorComponent, ColorComponent, ColorComponent] <br>
|
* * o <1> rgbaComponents: `[ColorComponent, ColorComponent, ColorComponent, ColorComponent]`
|
||||||
* - o <2> colorHex: String (#RRGGBBAA) <br>
|
* * o <2> colorHex: `String` (#RRGGBBAA)
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -761,10 +763,10 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - h: ColorComponent <br>
|
* * h: `ColorComponent`
|
||||||
* - s: ColorComponent <br>
|
* * s: `ColorComponent`
|
||||||
* - v: ColorComponent <br>
|
* * v: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -774,8 +776,8 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - hsvComponents: [ColorComponent, ColorComponent, ColorComponent] <br>
|
* * hsvComponents: `[ColorComponent, ColorComponent, ColorComponent]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -797,11 +799,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - h: ColorComponent <br>
|
* * h: `ColorComponent`
|
||||||
* - s: ColorComponent <br>
|
* * s: `ColorComponent`
|
||||||
* - v: ColorComponent <br>
|
* * v: `ColorComponent`
|
||||||
* - a: ColorComponent <br>
|
* * a: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -811,9 +813,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - hsvComponents: [ColorComponent, ColorComponent, ColorComponent] <br>
|
* * hsvComponents: `[ColorComponent, ColorComponent, ColorComponent]`
|
||||||
* - alpha: ColorComponent <br>
|
* * alpha: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -824,8 +826,8 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - hsvaComponents: [ColorComponent, ColorComponent, ColorComponent, ColorComponent] <br>
|
* * hsvaComponents: `[ColorComponent, ColorComponent, ColorComponent, ColorComponent]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -846,10 +848,10 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - h: ColorComponent <br>
|
* * h: `ColorComponent`
|
||||||
* - s: ColorComponent <br>
|
* * s: `ColorComponent`
|
||||||
* - l: ColorComponent <br>
|
* * l: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -859,8 +861,8 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - hslComponents: [ColorComponent, ColorComponent, ColorComponent] <br>
|
* * hslComponents: `[ColorComponent, ColorComponent, ColorComponent]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -882,11 +884,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - h: ColorComponent <br>
|
* * h: `ColorComponent`
|
||||||
* - s: ColorComponent <br>
|
* * s: `ColorComponent`
|
||||||
* - l: ColorComponent <br>
|
* * l: `ColorComponent`
|
||||||
* - a: ColorComponent <br>
|
* * a: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -896,9 +898,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - hslComponents: [ColorComponent, ColorComponent, ColorComponent] <br>
|
* * hslComponents: `[ColorComponent, ColorComponent, ColorComponent]`
|
||||||
* - alpha: ColorComponent <br>
|
* * alpha: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -909,8 +911,8 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - hslaComponents: [ColorComponent, ColorComponent, ColorComponent, ColorComponent] <br>
|
* * hslaComponents: `[ColorComponent, ColorComponent, ColorComponent, ColorComponent]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -987,8 +989,8 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - color: OmniColor <br>
|
* * color: `OmniColor`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -997,9 +999,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - color: OmniColor <br>
|
* * color: `OmniColor`
|
||||||
* - hsvResultContainer: java.lang.Float[] <br>
|
* * hsvResultContainer: `java.lang.Float[]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1015,10 +1017,10 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - r: ColorComponent <br>
|
* * r: `ColorComponent`
|
||||||
* - g: ColorComponent <br>
|
* * g: `ColorComponent`
|
||||||
* - b: ColorComponent <br>
|
* * b: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1027,11 +1029,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - r: ColorComponent <br>
|
* * r: `ColorComponent`
|
||||||
* - g: ColorComponent <br>
|
* * g: `ColorComponent`
|
||||||
* - b: ColorComponent <br>
|
* * b: `ColorComponent`
|
||||||
* - hsvResultContainer: java.lang.Float[] <br>
|
* * hsvResultContainer: `java.lang.Float[]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1053,24 +1055,24 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - color: OmniColor <br>
|
* * color: `OmniColor`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
fun toHsvaRhino(color: Any?): List<Double> {
|
fun toHsvaRhino(color: Any?): List<Double> {
|
||||||
return toHsvaRhino(color, FloatArray(3))
|
return toHsvaRhino(color, FloatArray(4))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - color: OmniColor <br>
|
* * color: `OmniColor`
|
||||||
* - hsvaResultContainer: java.lang.Float[] <br>
|
* * hsvaResultContainer: `java.lang.Float[]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
fun toHsvaRhino(color: Any?, hsvaResultContainer: Any?): List<Double> {
|
fun toHsvaRhino(color: Any?, hsvaResultContainer: Any?): List<Double> {
|
||||||
require(hsvaResultContainer is FloatArray) { "Container argument \"hsvaResultContainer\" must be a Java Float Array for colors.toHsva(r, g, b, a, hsvResultContainer)" }
|
require(hsvaResultContainer is FloatArray) { "Container argument \"hsvaResultContainer\" must be a Java Float Array for colors.toHsva(color, hsvResultContainer)" }
|
||||||
val r = redRhino(color)
|
val r = redRhino(color)
|
||||||
val g = greenRhino(color)
|
val g = greenRhino(color)
|
||||||
val b = blueRhino(color)
|
val b = blueRhino(color)
|
||||||
@@ -1083,11 +1085,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - r: ColorComponent <br>
|
* * r: `ColorComponent`
|
||||||
* - g: ColorComponent <br>
|
* * g: `ColorComponent`
|
||||||
* - b: ColorComponent <br>
|
* * b: `ColorComponent`
|
||||||
* - a: ColorComponent <br>
|
* * a: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1096,12 +1098,12 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - r: ColorComponent <br>
|
* * r: `ColorComponent`
|
||||||
* - g: ColorComponent <br>
|
* * g: `ColorComponent`
|
||||||
* - b: ColorComponent <br>
|
* * b: `ColorComponent`
|
||||||
* - a: ColorComponent <br>
|
* * a: `ColorComponent`
|
||||||
* - hsvaResultContainer: java.lang.Float[] <br>
|
* * hsvaResultContainer: `java.lang.Float[]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1123,8 +1125,8 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - color: OmniColor <br>
|
* * color: `OmniColor`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1133,9 +1135,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - color: OmniColor <br>
|
* * color: `OmniColor`
|
||||||
* - hslResultContainer: java.lang.Float[] <br>
|
* * hslResultContainer: `java.lang.Float[]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1151,10 +1153,10 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - r: ColorComponent <br>
|
* * r: `ColorComponent`
|
||||||
* - g: ColorComponent <br>
|
* * g: `ColorComponent`
|
||||||
* - b: ColorComponent <br>
|
* * b: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1163,11 +1165,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - r: ColorComponent <br>
|
* * r: `ColorComponent`
|
||||||
* - g: ColorComponent <br>
|
* * g: `ColorComponent`
|
||||||
* - b: ColorComponent <br>
|
* * b: `ColorComponent`
|
||||||
* - hslResultContainer: java.lang.Float[] <br>
|
* * hslResultContainer: `java.lang.Float[]`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1187,8 +1189,8 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - color: OmniColor <br>
|
* * color: `OmniColor`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1197,11 +1199,11 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters <br>
|
* Parameters
|
||||||
* - r: ColorComponent <br>
|
* * r: `ColorComponent`
|
||||||
* - g: ColorComponent <br>
|
* * g: `ColorComponent`
|
||||||
* - b: ColorComponent <br>
|
* * b: `ColorComponent`
|
||||||
* - a: ColorComponent <br>
|
* * a: `ColorComponent`
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
@@ -1353,12 +1355,9 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@RhinoFunctionBody
|
@RhinoFunctionBody
|
||||||
fun summaryRhino(color: Any?): String {
|
fun summaryRhino(color: Any?): String = when (alphaDoubleRhino(color)) {
|
||||||
var (r, g, b, a) = toRgbaRhino(color)
|
1.0 -> "Color { ${toHexRhino(color)} | ${toRgbStringRhino(color)} | ${toHslStringRhino(color)} | ${toHsvStringRhino(color)} | int(${toIntRhino(color)}) }"
|
||||||
return when (val doubleA = toDoubleComponent(a)) {
|
else -> "Color { ${toHexRhino(color)} | ${toRgbaString(arrayOf(color))} | ${toHslaString(arrayOf(color))} | ${toHsvaString(arrayOf(color))} | int(${toIntRhino(color)}) }"
|
||||||
1.0 -> "Color { ${toHexRhino(color)} | rgb(${r.jsString}, ${g.jsString}, ${b.jsString}) | int(${toIntRhino(color)}) }"
|
|
||||||
else -> "Color { ${toHexRhino(color)} | rgba(${r.jsString}, ${g.jsString}, ${b.jsString}, ${doubleA.roundToAlphaString()}) | int(${toIntRhino(color)}) }"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun parseRelativePercentage(percentage: Any?): Double {
|
internal fun parseRelativePercentage(percentage: Any?): Double {
|
||||||
@@ -1474,75 +1473,135 @@ object Colors : Augmentable(), SimpleGetterProxy {
|
|||||||
fun toRgbaString(args: Array<out Any?>): String = ensureArgumentsAtMost(args, 2) { argList ->
|
fun toRgbaString(args: Array<out Any?>): String = ensureArgumentsAtMost(args, 2) { argList ->
|
||||||
val (color, options) = argList
|
val (color, options) = argList
|
||||||
|
|
||||||
var keepTrailingZeroForFullAlpha = true
|
val keepTrailingZeroForFullAlpha = when (options) {
|
||||||
|
is NativeObject -> options.inquire<Boolean>("keepTrailingZeroForFullAlpha", ::coerceBoolean) != false
|
||||||
when (options) {
|
is Boolean -> options
|
||||||
is NativeObject -> {
|
else -> true
|
||||||
options.inquire<Boolean>("keepTrailingZeroForFullAlpha", ::coerceBoolean)?.let {
|
|
||||||
keepTrailingZeroForFullAlpha = it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is Boolean -> {
|
|
||||||
keepTrailingZeroForFullAlpha = options
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val list = listOf(redRhino(color), greenRhino(color), blueRhino(color)).map {
|
val list = listOf(redRhino(color), greenRhino(color), blueRhino(color)).map {
|
||||||
it.roundToInt().coerceIn(0..255).toString()
|
it.roundToInt().coerceIn(0..255).toString()
|
||||||
} + alphaDoubleRhino(color).roundToAlphaString(2, keepTrailingZeroForFullAlpha)
|
} + alphaDoubleRhino(color).roundToAlphaString(keepTrailingZeroForFullAlpha = keepTrailingZeroForFullAlpha)
|
||||||
|
|
||||||
list.joinToString(", ", prefix = "rgba(", postfix = ")")
|
list.joinToString(", ", prefix = "rgba(", postfix = ")")
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 格式化 argb 格式为 "argb(a, r, g, b)"
|
@JvmStatic
|
||||||
// fun toArgbString(color: Int): String {
|
@RhinoSingletonFunctionInterface
|
||||||
// val arr = rawToArgb(color)
|
fun toArgbString(args: Array<out Any?>): String = ensureArgumentsAtMost(args, 2) { argList ->
|
||||||
// return "argb(${arr[0]}, ${arr[1]}, ${arr[2]}, ${arr[3]})"
|
val (color, options) = argList
|
||||||
// }
|
|
||||||
//
|
val keepTrailingZeroForFullAlpha = when (options) {
|
||||||
// // 格式化 hsv 格式为 "hsv(h, s%, v%)",其中 h 取整,s 和 v 转换为百分比(整数)
|
is NativeObject -> options.inquire<Boolean>("keepTrailingZeroForFullAlpha", ::coerceBoolean) != false
|
||||||
// fun toHsvString(color: Int): String {
|
is Boolean -> options
|
||||||
// val arr = rawToHsv(color)
|
else -> true
|
||||||
// val h = arr[0].roundToInt()
|
}
|
||||||
// val s = (arr[1] * 100).roundToInt()
|
|
||||||
// val v = (arr[2] * 100).roundToInt()
|
val list = listOf(
|
||||||
// return "hsv($h, ${s}%, ${v}%)"
|
alphaDoubleRhino(color).roundToAlphaString(keepTrailingZeroForFullAlpha = keepTrailingZeroForFullAlpha)
|
||||||
// }
|
) + listOf(redRhino(color), greenRhino(color), blueRhino(color)).map {
|
||||||
//
|
it.roundToInt().coerceIn(0..255).toString()
|
||||||
// // 格式化 hsva 格式为 "hsva(h, s%, v%, a)",其中 a 保留两位小数(或整数)
|
}
|
||||||
// fun toHsvaString(color: Int): String {
|
|
||||||
// val arr = rawToHsva(color)
|
list.joinToString(", ", prefix = "argb(", postfix = ")")
|
||||||
// val h = arr[0].roundToInt()
|
}
|
||||||
// val s = (arr[1] * 100).roundToInt()
|
|
||||||
// val v = (arr[2] * 100).roundToInt()
|
@JvmStatic
|
||||||
// val a = arr[3]
|
@RhinoSingletonFunctionInterface
|
||||||
// val aStr = if (a % 1.0 == 0.0)
|
fun toHsvString(args: Array<out Any?>): String = ensureArgumentsLengthInRange(args, 1..3) {
|
||||||
// a.roundToInt().toString()
|
when (it.size) {
|
||||||
// else
|
1 -> toHsvStringRhino(it[0])
|
||||||
// String.format("%.2f", a)
|
3 -> toHsvStringRhino(it[0], it[1], it[2])
|
||||||
// return "hsva($h, ${s}%, ${v}%, $aStr)"
|
else -> throw WrappedIllegalArgumentException("Invalid arguments ${it.jsArrayBrief()} for colors.toHsvString")
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// // 格式化 hsl 格式为 "hsl(h, s%, l%)"
|
|
||||||
// fun toHslString(color: Int): String {
|
@JvmStatic
|
||||||
// val arr = rawToHsl(color)
|
@RhinoFunctionBody
|
||||||
// val h = arr[0].roundToInt()
|
fun toHsvStringRhino(color: Any?): String {
|
||||||
// val s = (arr[1] * 100).roundToInt()
|
val (r, g, b) = toRgbRhino(color)
|
||||||
// val l = (arr[2] * 100).roundToInt()
|
return toHsvStringRhino(r, g, b)
|
||||||
// return "hsl($h, ${s}%, ${l}%)"
|
}
|
||||||
// }
|
|
||||||
//
|
@JvmStatic
|
||||||
// // 格式化 hsla 格式为 "hsla(h, s%, l%, a)"
|
@RhinoFunctionBody
|
||||||
// fun toHslaString(color: Int): String {
|
fun toHsvStringRhino(r: Any?, g: Any?, b: Any?): String {
|
||||||
// val arr = rawToHsla(color)
|
val (hue, saturation, value) = toHsvRhino(r, g, b)
|
||||||
// val h = arr[0].roundToInt()
|
return listOf(
|
||||||
// val s = (arr[1] * 100).roundToInt()
|
hue.roundToHueString(),
|
||||||
// val l = (arr[2] * 100).roundToInt()
|
saturation.roundToSaturationString(),
|
||||||
// val a = arr[3]
|
value.roundToValueString(),
|
||||||
// val aStr = if (a % 1.0 == 0.0)
|
).joinToString(", ", prefix = "hsv(", postfix = ")")
|
||||||
// a.roundToInt().toString()
|
}
|
||||||
// else
|
|
||||||
// String.format("%.2f", a)
|
@JvmStatic
|
||||||
// return "hsla($h, ${s}%, ${l}%, $aStr)"
|
@RhinoSingletonFunctionInterface
|
||||||
// }
|
fun toHsvaString(args: Array<out Any?>): String = ensureArgumentsAtMost(args, 2) { argList ->
|
||||||
|
val (color, options) = argList
|
||||||
|
val (hue, saturation, value) = toHsvRhino(color)
|
||||||
|
|
||||||
|
val keepTrailingZeroForFullAlpha = when (options) {
|
||||||
|
is NativeObject -> options.inquire<Boolean>("keepTrailingZeroForFullAlpha", ::coerceBoolean) != false
|
||||||
|
is Boolean -> options
|
||||||
|
else -> true
|
||||||
|
}
|
||||||
|
|
||||||
|
val list = listOf(
|
||||||
|
hue.roundToHueString(),
|
||||||
|
saturation.roundToSaturationString(),
|
||||||
|
value.roundToValueString(),
|
||||||
|
) + alphaDoubleRhino(color).roundToAlphaString(keepTrailingZeroForFullAlpha = keepTrailingZeroForFullAlpha)
|
||||||
|
|
||||||
|
list.joinToString(", ", prefix = "hsva(", postfix = ")")
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@RhinoSingletonFunctionInterface
|
||||||
|
fun toHslString(args: Array<out Any?>): String = ensureArgumentsLengthInRange(args, 1..3) {
|
||||||
|
when (it.size) {
|
||||||
|
1 -> toHslStringRhino(it[0])
|
||||||
|
3 -> toHslStringRhino(it[0], it[1], it[2])
|
||||||
|
else -> throw WrappedIllegalArgumentException("Invalid arguments ${it.jsArrayBrief()} for colors.toHslString")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@RhinoFunctionBody
|
||||||
|
fun toHslStringRhino(color: Any?): String {
|
||||||
|
val (r, g, b) = toRgbRhino(color)
|
||||||
|
return toHslStringRhino(r, g, b)
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@RhinoFunctionBody
|
||||||
|
fun toHslStringRhino(r: Any?, g: Any?, b: Any?): String {
|
||||||
|
val (hue, saturation, lightness) = toHslRhino(r, g, b)
|
||||||
|
return listOf(
|
||||||
|
hue.roundToHueString(),
|
||||||
|
saturation.roundToSaturationString(),
|
||||||
|
lightness.roundToValueString(),
|
||||||
|
).joinToString(", ", prefix = "hsl(", postfix = ")")
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@RhinoSingletonFunctionInterface
|
||||||
|
fun toHslaString(args: Array<out Any?>): String = ensureArgumentsAtMost(args, 2) { argList ->
|
||||||
|
val (color, options) = argList
|
||||||
|
val (hue, saturation, lightness) = toHslRhino(color)
|
||||||
|
|
||||||
|
val keepTrailingZeroForFullAlpha = when (options) {
|
||||||
|
is NativeObject -> options.inquire<Boolean>("keepTrailingZeroForFullAlpha", ::coerceBoolean) != false
|
||||||
|
is Boolean -> options
|
||||||
|
else -> true
|
||||||
|
}
|
||||||
|
|
||||||
|
val list = listOf(
|
||||||
|
hue.roundToHueString(),
|
||||||
|
saturation.roundToSaturationString(),
|
||||||
|
lightness.roundToValueString(),
|
||||||
|
) + alphaDoubleRhino(color).roundToAlphaString(keepTrailingZeroForFullAlpha = keepTrailingZeroForFullAlpha)
|
||||||
|
|
||||||
|
list.joinToString(", ", prefix = "hsla(", postfix = ")")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package org.autojs.autojs.theme.app
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View.MeasureSpec.UNSPECIFIED
|
||||||
|
import android.widget.TextView
|
||||||
|
import androidx.annotation.ColorInt
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.core.view.isVisible
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.withContext
|
||||||
|
import org.autojs.autojs.extension.MaterialDialogExtensions.setCopyableText
|
||||||
|
import org.autojs.autojs.runtime.api.augment.colors.Colors
|
||||||
|
import org.autojs.autojs.util.ColorUtils
|
||||||
|
import org.autojs.autojs6.R
|
||||||
|
import org.autojs.autojs6.databinding.ColorInfoDialogListItemBinding
|
||||||
|
|
||||||
|
object ColorInfoDialogManager {
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun showColorInfoDialog(context: Context, @ColorInt color: Int, titleRes: Int = R.string.dialog_title_color_details) {
|
||||||
|
val binding = ColorInfoDialogListItemBinding.inflate(LayoutInflater.from(context))
|
||||||
|
|
||||||
|
val colorWithoutAlpha = color or -0x1000000
|
||||||
|
|
||||||
|
val dialog = MaterialDialog.Builder(context)
|
||||||
|
.title(titleRes)
|
||||||
|
.customView(binding.root, false)
|
||||||
|
.positiveText(R.string.dialog_button_dismiss)
|
||||||
|
.positiveColorRes(R.color.dialog_button_default)
|
||||||
|
.show()
|
||||||
|
|
||||||
|
CoroutineScope(Dispatchers.Main).launch {
|
||||||
|
launch(Dispatchers.IO) {
|
||||||
|
ColorUtils.toHex(colorWithoutAlpha).let { binding.colorHexValue.bindWith(dialog, it) }
|
||||||
|
Colors.toRgbStringRhino(colorWithoutAlpha).let { binding.colorRgbValue.bindWith(dialog, it) }
|
||||||
|
Colors.toHslStringRhino(colorWithoutAlpha).let { binding.colorHslValue.bindWith(dialog, it) }
|
||||||
|
Colors.toHsvStringRhino(colorWithoutAlpha).let { binding.colorHsvValue.bindWith(dialog, it) }
|
||||||
|
ColorUtils.toInt(colorWithoutAlpha).let { binding.colorIntValue.bindWith(dialog, it.toString()) }
|
||||||
|
}
|
||||||
|
withContext(Dispatchers.Main) {
|
||||||
|
restoreEssentialViews(binding)
|
||||||
|
updateGuidelines(binding)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun restoreEssentialViews(binding: ColorInfoDialogListItemBinding) {
|
||||||
|
listOf(
|
||||||
|
binding.colorHexColon to binding.colorHexValue,
|
||||||
|
binding.colorRgbColon to binding.colorRgbValue,
|
||||||
|
binding.colorHslColon to binding.colorHslValue,
|
||||||
|
binding.colorHsvColon to binding.colorHsvValue,
|
||||||
|
binding.colorIntColon to binding.colorIntValue,
|
||||||
|
).forEach { pair ->
|
||||||
|
val (colonView, valueView) = pair
|
||||||
|
colonView.isVisible = true
|
||||||
|
valueView.isVisible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateGuidelines(binding: ColorInfoDialogListItemBinding) {
|
||||||
|
val filteredBindings = listOf(
|
||||||
|
binding.colorHexLabel to binding.colorHexGuideline,
|
||||||
|
binding.colorRgbLabel to binding.colorRgbGuideline,
|
||||||
|
binding.colorHslLabel to binding.colorHslGuideline,
|
||||||
|
binding.colorHsvLabel to binding.colorHsvGuideline,
|
||||||
|
binding.colorIntLabel to binding.colorIntGuideline,
|
||||||
|
).filter { (it.first.parent as? ConstraintLayout)?.isVisible == true }
|
||||||
|
|
||||||
|
val maxWidth = filteredBindings.maxOfOrNull { it.first.apply { measure(UNSPECIFIED, UNSPECIFIED) }.measuredWidth } ?: return
|
||||||
|
|
||||||
|
filteredBindings.forEach { (_, guideline) ->
|
||||||
|
guideline.layoutParams = (guideline.layoutParams as ConstraintLayout.LayoutParams).also {
|
||||||
|
it.guideBegin = maxWidth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private suspend fun TextView.bindWith(dialog: MaterialDialog, text: String) {
|
||||||
|
withContext(Dispatchers.Main) {
|
||||||
|
this@bindWith.setCopyableText(dialog) { text }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -50,8 +50,11 @@ class ColorLibrariesActivity : ColorSelectBaseActivity() {
|
|||||||
MtActivityColorLibrariesBinding.inflate(layoutInflater).let {
|
MtActivityColorLibrariesBinding.inflate(layoutInflater).let {
|
||||||
binding = it
|
binding = it
|
||||||
setContentView(it.root)
|
setContentView(it.root)
|
||||||
setUpToolbar(it.toolbar)
|
|
||||||
setUpAppBar(it.appBar, it.appBarContainer)
|
setUpAppBar(it.appBar, it.appBarContainer)
|
||||||
|
it.toolbar.let { toolbar ->
|
||||||
|
setUpToolbar(toolbar)
|
||||||
|
toolbar.setOnLongClickListener { true.also { showThemeColorDetails() } }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.colorLibrariesRecyclerView.let {
|
binding.colorLibrariesRecyclerView.let {
|
||||||
@@ -120,15 +123,15 @@ class ColorLibrariesActivity : ColorSelectBaseActivity() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.action_new_color_library -> {
|
R.id.action_new_color_library -> {
|
||||||
ViewUtils.showToast(this, R.string.text_under_development_title)
|
ViewUtils.showToast(this, R.string.text_under_development)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.action_import_color_library -> {
|
R.id.action_import_color_library -> {
|
||||||
ViewUtils.showToast(this, R.string.text_under_development_title)
|
ViewUtils.showToast(this, R.string.text_under_development)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.action_clone_color_library -> {
|
R.id.action_clone_color_library -> {
|
||||||
ViewUtils.showToast(this, R.string.text_under_development_title)
|
ViewUtils.showToast(this, R.string.text_under_development)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.action_locate_current_theme_color -> {
|
R.id.action_locate_current_theme_color -> {
|
||||||
|
|||||||
@@ -4,15 +4,17 @@ import android.annotation.SuppressLint
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
|
import org.autojs.autojs.theme.app.ColorLibrariesActivity.Companion.PresetColorLibrary
|
||||||
import org.autojs.autojs6.R
|
import org.autojs.autojs6.R
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
class ColorLibraryAdapter(
|
class ColorLibraryAdapter(
|
||||||
private var libraries: List<ColorLibrariesActivity.Companion.PresetColorLibrary>,
|
private var libraries: List<PresetColorLibrary>,
|
||||||
private val onItemClick: (ColorLibrariesActivity.Companion.PresetColorLibrary) -> Unit,
|
private val onItemClick: (PresetColorLibrary) -> Unit,
|
||||||
) : RecyclerView.Adapter<ColorLibraryViewHolder>() {
|
) : RecyclerView.Adapter<ColorLibraryViewHolder>() {
|
||||||
|
|
||||||
fun updateData(newLibraries: List<ColorLibrariesActivity.Companion.PresetColorLibrary>) {
|
fun updateData(newLibraries: List<PresetColorLibrary>) {
|
||||||
libraries = newLibraries
|
libraries = newLibraries
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
@@ -26,7 +28,17 @@ class ColorLibraryAdapter(
|
|||||||
override fun onBindViewHolder(holder: ColorLibraryViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ColorLibraryViewHolder, position: Int) {
|
||||||
val library = libraries[position]
|
val library = libraries[position]
|
||||||
holder.bind(library)
|
holder.bind(library)
|
||||||
holder.itemView.setOnClickListener { onItemClick(library) }
|
holder.itemView.setOnClickListener {
|
||||||
|
when {
|
||||||
|
library.isIntelligent -> MaterialDialog.Builder(holder.itemView.context)
|
||||||
|
.title(R.string.text_under_development_title)
|
||||||
|
.content(R.string.text_under_development_content)
|
||||||
|
.positiveText(R.string.dialog_button_dismiss)
|
||||||
|
.positiveColorRes(R.color.dialog_button_default)
|
||||||
|
.show()
|
||||||
|
else -> onItemClick(library)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount() = libraries.size
|
override fun getItemCount() = libraries.size
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package org.autojs.autojs.theme.app
|
package org.autojs.autojs.theme.app
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.autojs.autojs.theme.ThemeColorManager
|
import org.autojs.autojs.theme.ThemeColorManager
|
||||||
|
import org.autojs.autojs.theme.app.ColorLibrariesActivity.Companion.PresetColorLibrary
|
||||||
import org.autojs.autojs.util.ColorUtils
|
import org.autojs.autojs.util.ColorUtils
|
||||||
import org.autojs.autojs6.R
|
import org.autojs.autojs6.R
|
||||||
|
|
||||||
@@ -18,11 +20,19 @@ class ColorLibraryViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
|
|||||||
private val libraryName: TextView = itemView.findViewById(R.id.name)
|
private val libraryName: TextView = itemView.findViewById(R.id.name)
|
||||||
private val description: TextView = itemView.findViewById(R.id.description)
|
private val description: TextView = itemView.findViewById(R.id.description)
|
||||||
|
|
||||||
fun bind(library: ColorLibrariesActivity.Companion.PresetColorLibrary) {
|
fun bind(library: PresetColorLibrary) {
|
||||||
libraryName.text = context.getString(library.nameRes)
|
libraryName.text = context.getString(library.nameRes)
|
||||||
|
|
||||||
|
description.text = when {
|
||||||
|
library.isIntelligent -> {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
"[ ${context.getString(R.string.text_under_development)} ]"
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
val size = library.colors.size
|
val size = library.colors.size
|
||||||
description.text = resources.getQuantityString(R.plurals.text_items_total_sum, size, size)
|
resources.getQuantityString(R.plurals.text_items_total_sum, size, size)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val adjustedContrastColor = ColorUtils.adjustColorForContrast(context.getColor(R.color.window_background), ThemeColorManager.colorPrimary, 2.3)
|
val adjustedContrastColor = ColorUtils.adjustColorForContrast(context.getColor(R.color.window_background), ThemeColorManager.colorPrimary, 2.3)
|
||||||
when {
|
when {
|
||||||
|
|||||||
@@ -249,6 +249,14 @@ abstract class ColorSelectBaseActivity : BaseActivity() {
|
|||||||
.show(supportFragmentManager, "ColorPickerTagForColorLibraries")
|
.show(supportFragmentManager, "ColorPickerTagForColorLibraries")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected fun showColorDetails(color: Int, titleRes: Int = R.string.dialog_title_color_details) {
|
||||||
|
ColorInfoDialogManager.showColorInfoDialog(this, color, titleRes)
|
||||||
|
}
|
||||||
|
|
||||||
|
protected fun showThemeColorDetails() {
|
||||||
|
showColorDetails(ThemeColorManager.colorPrimary, R.string.dialog_title_theme_color_details)
|
||||||
|
}
|
||||||
|
|
||||||
private fun savePrefsForLibraries() {
|
private fun savePrefsForLibraries() {
|
||||||
Pref.putInt(KEY_SELECTED_COLOR_LIBRARY_ID, COLOR_LIBRARY_ID_PALETTE)
|
Pref.putInt(KEY_SELECTED_COLOR_LIBRARY_ID, COLOR_LIBRARY_ID_PALETTE)
|
||||||
Pref.putInt(KEY_SELECTED_COLOR_LIBRARY_ITEM_ID, 0)
|
Pref.putInt(KEY_SELECTED_COLOR_LIBRARY_ITEM_ID, 0)
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ public class EditorMenu {
|
|||||||
builder.itemsDisabledIndices(i);
|
builder.itemsDisabledIndices(i);
|
||||||
MaterialDialog built = builder.build();
|
MaterialDialog built = builder.build();
|
||||||
assert built.getItems() != null;
|
assert built.getItems() != null;
|
||||||
built.getItems().set(i, built.getItems().get(i) + " (" + builder.getContext().getString(R.string.text_under_development_title).toLowerCase(Language.getPrefLanguage().getLocale()) + ")");
|
built.getItems().set(i, built.getItems().get(i) + " (" + builder.getContext().getString(R.string.text_under_development).toLowerCase(Language.getPrefLanguage().getLocale()) + ")");
|
||||||
built.show();
|
built.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class LogActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
R.id.action_settings -> {
|
R.id.action_settings -> {
|
||||||
// TODO by SuperMonster003 on Jul 3, 2023.
|
// TODO by SuperMonster003 on Jul 3, 2023.
|
||||||
showToast(this, R.string.text_under_development_title)
|
showToast(this, R.string.text_under_development)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import android.content.Context
|
|||||||
import android.content.pm.PackageManager.GET_META_DATA
|
import android.content.pm.PackageManager.GET_META_DATA
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
|
||||||
import android.view.View.MeasureSpec.UNSPECIFIED
|
import android.view.View.MeasureSpec.UNSPECIFIED
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import com.afollestad.materialdialogs.DialogAction
|
import com.afollestad.materialdialogs.DialogAction
|
||||||
@@ -19,11 +16,12 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
import org.autojs.autojs.extension.MaterialDialogExtensions.makeSettingsLaunchable
|
||||||
|
import org.autojs.autojs.extension.MaterialDialogExtensions.makeTextCopyable
|
||||||
|
import org.autojs.autojs.extension.MaterialDialogExtensions.setCopyableTextIfAbsent
|
||||||
import org.autojs.autojs.pio.PFiles
|
import org.autojs.autojs.pio.PFiles
|
||||||
import org.autojs.autojs.runtime.api.AppUtils
|
import org.autojs.autojs.runtime.api.AppUtils
|
||||||
import org.autojs.autojs.util.ClipboardUtils
|
|
||||||
import org.autojs.autojs.util.IntentUtils
|
import org.autojs.autojs.util.IntentUtils
|
||||||
import org.autojs.autojs.util.ViewUtils
|
|
||||||
import org.autojs.autojs6.R
|
import org.autojs.autojs6.R
|
||||||
import org.autojs.autojs6.databinding.ApkFileInfoDialogListItemBinding
|
import org.autojs.autojs6.databinding.ApkFileInfoDialogListItemBinding
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -36,13 +34,13 @@ object ApkInfoDialogManager {
|
|||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
fun showApkInfoDialog(context: Context, apkFile: File) {
|
fun showApkInfoDialog(context: Context, apkFile: File) {
|
||||||
val binding = ApkFileInfoDialogListItemBinding.inflate(LayoutInflater.from(context))
|
val binding = ApkFileInfoDialogListItemBinding.inflate(LayoutInflater.from(context))
|
||||||
val root = binding.root as ViewGroup
|
|
||||||
|
|
||||||
val apkFilePath = apkFile.absolutePath
|
val apkFilePath = apkFile.absolutePath
|
||||||
|
val packageManager = context.packageManager
|
||||||
|
|
||||||
val dialog = MaterialDialog.Builder(context)
|
val dialog = MaterialDialog.Builder(context)
|
||||||
.title(apkFile.name)
|
.title(apkFile.name)
|
||||||
.customView(root, false)
|
.customView(binding.root, false)
|
||||||
.autoDismiss(false)
|
.autoDismiss(false)
|
||||||
.iconRes(R.drawable.ic_three_dots_outline_small)
|
.iconRes(R.drawable.ic_three_dots_outline_small)
|
||||||
.limitIconToDefaultSize()
|
.limitIconToDefaultSize()
|
||||||
@@ -58,8 +56,6 @@ object ApkInfoDialogManager {
|
|||||||
.onNegative { materialDialog, _ -> materialDialog.dismiss() }
|
.onNegative { materialDialog, _ -> materialDialog.dismiss() }
|
||||||
.show()
|
.show()
|
||||||
|
|
||||||
val packageManager = context.packageManager
|
|
||||||
|
|
||||||
CoroutineScope(Dispatchers.Main).launch {
|
CoroutineScope(Dispatchers.Main).launch {
|
||||||
val packageInfo = withContext(Dispatchers.IO) {
|
val packageInfo = withContext(Dispatchers.IO) {
|
||||||
runCatching { packageManager.getPackageArchiveInfo(apkFilePath, GET_META_DATA) }.getOrNull()
|
runCatching { packageManager.getPackageArchiveInfo(apkFilePath, GET_META_DATA) }.getOrNull()
|
||||||
@@ -91,7 +87,7 @@ object ApkInfoDialogManager {
|
|||||||
val installedPackageName: String? = packageName?.let { pkg ->
|
val installedPackageName: String? = packageName?.let { pkg ->
|
||||||
AppUtils.getInstalledVersionInfo(pkg)?.let { versionInfo ->
|
AppUtils.getInstalledVersionInfo(pkg)?.let { versionInfo ->
|
||||||
binding.installedVersionParent.isVisible = true
|
binding.installedVersionParent.isVisible = true
|
||||||
binding.installedVersionValue.setTextIfAbsent(dialog) { context.getString(R.string.text_full_version_info, versionInfo.versionName, versionInfo.versionCode) }
|
binding.installedVersionValue.setCopyableTextIfAbsent(dialog) { context.getString(R.string.text_full_version_info, versionInfo.versionName, versionInfo.versionCode) }
|
||||||
pkg /* returns as installedPackageName */
|
pkg /* returns as installedPackageName */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,19 +98,19 @@ object ApkInfoDialogManager {
|
|||||||
when {
|
when {
|
||||||
versionName != null -> {
|
versionName != null -> {
|
||||||
binding.versionPlaceholderLabel.text = context.getString(R.string.text_version)
|
binding.versionPlaceholderLabel.text = context.getString(R.string.text_version)
|
||||||
binding.versionPlaceholderValue.setTextIfAbsent(dialog) { context.getString(R.string.text_full_version_info, versionName, versionCode) }
|
binding.versionPlaceholderValue.setCopyableTextIfAbsent(dialog) { context.getString(R.string.text_full_version_info, versionName, versionCode) }
|
||||||
}
|
}
|
||||||
versionCode != null -> {
|
versionCode != null -> {
|
||||||
binding.versionPlaceholderLabel.text = context.getString(R.string.text_version_code)
|
binding.versionPlaceholderLabel.text = context.getString(R.string.text_version_code)
|
||||||
binding.versionPlaceholderValue.setTextIfAbsent(dialog) { "$versionCode" }
|
binding.versionPlaceholderValue.setCopyableTextIfAbsent(dialog) { "$versionCode" }
|
||||||
}
|
}
|
||||||
else -> binding.versionPlaceholderValue.setTextIfAbsent(dialog) { null }
|
else -> binding.versionPlaceholderValue.setCopyableTextIfAbsent(dialog) { null }
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.packageNameValue.setTextIfAbsent(dialog) { packageName }
|
binding.packageNameValue.setCopyableTextIfAbsent(dialog) { packageName }
|
||||||
binding.deviceSdkValue.setTextIfAbsent(dialog) { "${Build.VERSION.SDK_INT}" }
|
binding.deviceSdkValue.setCopyableTextIfAbsent(dialog) { "${Build.VERSION.SDK_INT}" }
|
||||||
binding.fileSizeValue.setTextIfAbsent(dialog) { fileSize }
|
binding.fileSizeValue.setCopyableTextIfAbsent(dialog) { fileSize }
|
||||||
binding.signatureSchemeValue.setTextIfAbsent(dialog) { signatureScheme }
|
binding.signatureSchemeValue.setCopyableTextIfAbsent(dialog) { signatureScheme }
|
||||||
|
|
||||||
dialog.setIcon(applicationInfo?.apply {
|
dialog.setIcon(applicationInfo?.apply {
|
||||||
sourceDir = apkFilePath
|
sourceDir = apkFilePath
|
||||||
@@ -126,10 +122,10 @@ object ApkInfoDialogManager {
|
|||||||
|
|
||||||
val apkInfo = getApkInfo(apkFile)
|
val apkInfo = getApkInfo(apkFile)
|
||||||
|
|
||||||
binding.labelNameValue.setTextIfAbsent(dialog) { apkInfo?.label }
|
binding.labelNameValue.setCopyableTextIfAbsent(dialog) { apkInfo?.label }
|
||||||
binding.packageNameValue.setTextIfAbsent(dialog) { apkInfo?.packageName }
|
binding.packageNameValue.setCopyableTextIfAbsent(dialog) { apkInfo?.packageName }
|
||||||
binding.minSdkValue.setTextIfAbsent(dialog) { apkInfo?.minSdkVersion?.toString() }
|
binding.minSdkValue.setCopyableTextIfAbsent(dialog) { apkInfo?.minSdkVersion?.toString() }
|
||||||
binding.targetSdkValue.setTextIfAbsent(dialog) { apkInfo?.targetSdkVersion?.toString() }
|
binding.targetSdkValue.setCopyableTextIfAbsent(dialog) { apkInfo?.targetSdkVersion?.toString() }
|
||||||
|
|
||||||
if (apkInfo != null) dialog.getActionButton(DialogAction.NEUTRAL).let { neutralButton ->
|
if (apkInfo != null) dialog.getActionButton(DialogAction.NEUTRAL).let { neutralButton ->
|
||||||
neutralButton.isVisible = true
|
neutralButton.isVisible = true
|
||||||
@@ -155,37 +151,6 @@ object ApkInfoDialogManager {
|
|||||||
}.getOrNull()
|
}.getOrNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun MaterialDialog.makeSettingsLaunchable(viewGetter: (dialog: MaterialDialog) -> View?, packageName: String?) {
|
|
||||||
viewGetter(this)?.setOnClickListener {
|
|
||||||
packageName?.let { pkg ->
|
|
||||||
IntentUtils.goToAppDetailSettings(this.context, pkg)
|
|
||||||
} ?: ViewUtils.showSnack(this.view, R.string.error_app_not_installed)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun MaterialDialog.makeTextCopyable(textViewGetter: (dialog: MaterialDialog) -> TextView?) {
|
|
||||||
makeTextCopyable(textViewGetter(this))
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun MaterialDialog.makeTextCopyable(textView: TextView?, textValue: String? = textView?.text?.toString()) {
|
|
||||||
if (textValue != null) {
|
|
||||||
val context = this.context
|
|
||||||
textView?.setOnClickListener {
|
|
||||||
ClipboardUtils.setClip(context, textValue)
|
|
||||||
ViewUtils.showSnack(this.view, "${context.getString(R.string.text_already_copied_to_clip)}: $textValue")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun TextView.setTextIfAbsent(dialog: MaterialDialog, f: () -> String?) {
|
|
||||||
val textView = this
|
|
||||||
val textValue = f.invoke()
|
|
||||||
if (textView.text == context.getString(R.string.ellipsis_six)) {
|
|
||||||
textView.text = textValue ?: context.getString(R.string.text_unknown)
|
|
||||||
}
|
|
||||||
dialog.makeTextCopyable(textView, textValue)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun restoreEssentialViews(binding: ApkFileInfoDialogListItemBinding, context: Context) {
|
private fun restoreEssentialViews(binding: ApkFileInfoDialogListItemBinding, context: Context) {
|
||||||
listOf(
|
listOf(
|
||||||
Triple(binding.labelNameLabel, binding.labelNameColon, binding.labelNameValue) to R.string.text_label_name,
|
Triple(binding.labelNameLabel, binding.labelNameColon, binding.labelNameValue) to R.string.text_label_name,
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View.MeasureSpec.UNSPECIFIED
|
import android.view.View.MeasureSpec.UNSPECIFIED
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
@@ -16,6 +15,8 @@ import kotlinx.coroutines.async
|
|||||||
import kotlinx.coroutines.awaitAll
|
import kotlinx.coroutines.awaitAll
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
import org.autojs.autojs.extension.MaterialDialogExtensions.makeTextCopyable
|
||||||
|
import org.autojs.autojs.extension.MaterialDialogExtensions.setCopyableText
|
||||||
import org.autojs.autojs.model.explorer.ExplorerItem
|
import org.autojs.autojs.model.explorer.ExplorerItem
|
||||||
import org.autojs.autojs.util.ViewUtils
|
import org.autojs.autojs.util.ViewUtils
|
||||||
import org.autojs.autojs6.R
|
import org.autojs.autojs6.R
|
||||||
@@ -33,11 +34,10 @@ object MediaInfoDialogManager {
|
|||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
fun showMediaInfoDialog(context: Context, explorerItem: ExplorerItem) {
|
fun showMediaInfoDialog(context: Context, explorerItem: ExplorerItem) {
|
||||||
val binding = MediaFileInfoDialogListItemBinding.inflate(LayoutInflater.from(context))
|
val binding = MediaFileInfoDialogListItemBinding.inflate(LayoutInflater.from(context))
|
||||||
val root = binding.root as ViewGroup
|
|
||||||
|
|
||||||
val dialog = MaterialDialog.Builder(context)
|
val dialog = MaterialDialog.Builder(context)
|
||||||
.title(explorerItem.name)
|
.title(explorerItem.name)
|
||||||
.customView(root, false)
|
.customView(binding.root, false)
|
||||||
.autoDismiss(false)
|
.autoDismiss(false)
|
||||||
.iconRes(R.drawable.transparent)
|
.iconRes(R.drawable.transparent)
|
||||||
.limitIconToDefaultSize()
|
.limitIconToDefaultSize()
|
||||||
@@ -60,38 +60,38 @@ object MediaInfoDialogManager {
|
|||||||
|
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, GENERAL, "FileSize/String").let {
|
mediaInfo(filePath, GENERAL, "FileSize/String").let {
|
||||||
binding.fileSizeValue.bindWith(it)
|
binding.fileSizeValue.bindWith(dialog, it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, GENERAL, "Duration/String").let { binding.durationValue.bindWith(it) }
|
mediaInfo(filePath, GENERAL, "Duration/String").let { binding.durationValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, GENERAL, "Album").let { binding.albumValue.bindWith(it) }
|
mediaInfo(filePath, GENERAL, "Album").let { binding.albumValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, GENERAL, "Track").let { binding.trackNameValue.bindWith(it) }
|
mediaInfo(filePath, GENERAL, "Track").let { binding.trackNameValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, GENERAL, "Performer").let { binding.performerValue.bindWith(it) }
|
mediaInfo(filePath, GENERAL, "Performer").let { binding.performerValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, AUDIO, "BitRate/String").let { binding.bitRateForAudioValue.bindWith(it) }
|
mediaInfo(filePath, AUDIO, "BitRate/String").let { binding.bitRateForAudioValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, VIDEO, "BitRate/String").let { binding.bitRateForVideoValue.bindWith(it) }
|
mediaInfo(filePath, VIDEO, "BitRate/String").let { binding.bitRateForVideoValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, VIDEO, "DisplayAspectRatio/String").let { binding.aspectRatioValue.bindWith(it) }
|
mediaInfo(filePath, VIDEO, "DisplayAspectRatio/String").let { binding.aspectRatioValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
mediaInfo(filePath, VIDEO, "FrameRate").let { binding.frameRateValue.bindWith(it) }
|
mediaInfo(filePath, VIDEO, "FrameRate").let { binding.frameRateValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
val deferredVideoWidth = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Width") }
|
val deferredVideoWidth = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Width") }
|
||||||
val deferredVideoHeight = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Height") }
|
val deferredVideoHeight = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Height") }
|
||||||
val (width, height) = awaitAll(deferredVideoWidth, deferredVideoHeight)
|
val (width, height) = awaitAll(deferredVideoWidth, deferredVideoHeight)
|
||||||
binding.resolutionValue.bindWith(if (width.isNotEmpty() && height.isNotEmpty()) "$width × $height" else "")
|
binding.resolutionValue.bindWith(dialog, if (width.isNotEmpty() && height.isNotEmpty()) "$width × $height" else "")
|
||||||
}
|
}
|
||||||
|
|
||||||
when {
|
when {
|
||||||
@@ -123,6 +123,7 @@ object MediaInfoDialogManager {
|
|||||||
restoreEssentialViews(binding, context)
|
restoreEssentialViews(binding, context)
|
||||||
updateGuidelines(binding)
|
updateGuidelines(binding)
|
||||||
updateSplitLineVisibility(binding)
|
updateSplitLineVisibility(binding)
|
||||||
|
dialog.makeTextCopyable { it.titleView }
|
||||||
}
|
}
|
||||||
|
|
||||||
when (val containerFormat = deferredContainerFormat.await()) {
|
when (val containerFormat = deferredContainerFormat.await()) {
|
||||||
@@ -134,9 +135,9 @@ object MediaInfoDialogManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
containerFormat.let { binding.containerFormatValue.bindWith(it) }
|
containerFormat.let { binding.containerFormatValue.bindWith(dialog, it) }
|
||||||
deferredAudioFormat.await().let { binding.audioFormatValue.bindWith(it) }
|
deferredAudioFormat.await().let { binding.audioFormatValue.bindWith(dialog, it) }
|
||||||
deferredVideoFormat.await().let { binding.videoFormatValue.bindWith(it) }
|
deferredVideoFormat.await().let { binding.videoFormatValue.bindWith(dialog, it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,12 +183,12 @@ object MediaInfoDialogManager {
|
|||||||
binding.performerParent.isVisible = true
|
binding.performerParent.isVisible = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER", "unused")
|
||||||
private fun setViewsAsMediaMenuPlaceholder(binding: MediaFileInfoDialogListItemBinding) {
|
private fun setViewsAsMediaMenuPlaceholder(binding: MediaFileInfoDialogListItemBinding) {
|
||||||
/* Nothing to do yet. */
|
/* Nothing to do yet. */
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER", "unused")
|
||||||
private fun setViewsAsLeastPlaceholder(binding: MediaFileInfoDialogListItemBinding) {
|
private fun setViewsAsLeastPlaceholder(binding: MediaFileInfoDialogListItemBinding) {
|
||||||
/* Nothing to do yet. */
|
/* Nothing to do yet. */
|
||||||
}
|
}
|
||||||
@@ -252,8 +253,10 @@ object MediaInfoDialogManager {
|
|||||||
).any { it.isVisible }
|
).any { it.isVisible }
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun TextView.bindWith(text: String) {
|
private suspend fun TextView.bindWith(dialog: MaterialDialog, text: String) {
|
||||||
withContext(Dispatchers.Main) { this@bindWith.text = text.takeUnless { text.isEmpty() } ?: context.getString(R.string.text_unknown) }
|
withContext(Dispatchers.Main) {
|
||||||
|
this@bindWith.setCopyableText(dialog) { text }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private operator fun MediaInfo.invoke(filePath: String, streamKind: MediaInfo.StreamKind, parameter: String): String {
|
private operator fun MediaInfo.invoke(filePath: String, streamKind: MediaInfo.StreamKind, parameter: String): String {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import androidx.core.graphics.ColorUtils
|
|||||||
import org.autojs.autojs.app.GlobalAppContext
|
import org.autojs.autojs.app.GlobalAppContext
|
||||||
import org.autojs.autojs.core.image.ColorTable
|
import org.autojs.autojs.core.image.ColorTable
|
||||||
import org.autojs.autojs.theme.ThemeColor
|
import org.autojs.autojs.theme.ThemeColor
|
||||||
|
import java.math.RoundingMode
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
import kotlin.text.RegexOption.IGNORE_CASE
|
import kotlin.text.RegexOption.IGNORE_CASE
|
||||||
|
|
||||||
@@ -419,4 +420,41 @@ object ColorUtils {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@JvmOverloads
|
||||||
|
fun Double.roundToAlphaString(scale: Int = 1, keepTrailingZeroForFullAlpha: Boolean = true): String {
|
||||||
|
return toBigDecimal()
|
||||||
|
.setScale(scale, RoundingMode.HALF_UP)
|
||||||
|
.stripTrailingZeros()
|
||||||
|
.toPlainString()
|
||||||
|
.let { if (keepTrailingZeroForFullAlpha && it == "1") "1.0" else it }
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@JvmOverloads
|
||||||
|
fun Double.roundToHueString(scale: Int = 0): String {
|
||||||
|
return toBigDecimal()
|
||||||
|
.setScale(scale, RoundingMode.HALF_UP)
|
||||||
|
.stripTrailingZeros()
|
||||||
|
.toPlainString()
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@JvmOverloads
|
||||||
|
fun Double.roundToSaturationString(scale: Int = 1): String {
|
||||||
|
return (this * 100.0).toBigDecimal()
|
||||||
|
.setScale(scale, RoundingMode.HALF_UP)
|
||||||
|
.stripTrailingZeros()
|
||||||
|
.toPlainString() + "%"
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@JvmOverloads
|
||||||
|
fun Double.roundToValueString(scale: Int = 1): String {
|
||||||
|
return (this * 100.0).toBigDecimal()
|
||||||
|
.setScale(scale, RoundingMode.HALF_UP)
|
||||||
|
.stripTrailingZeros()
|
||||||
|
.toPlainString() + "%"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
369
app/src/main/res/layout/color_info_dialog_list_item.xml
Normal file
369
app/src/main/res/layout/color_info_dialog_list_item.xml
Normal file
@@ -0,0 +1,369 @@
|
|||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:focusable="true"
|
||||||
|
android:clickable="true"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:minHeight="@dimen/ref_md_listitem_height"
|
||||||
|
android:paddingBottom="@dimen/ref_md_listitem_vertical_margin"
|
||||||
|
android:paddingTop="@dimen/ref_md_listitem_vertical_margin">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/color_hex_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/ref_md_dialog_frame_margin"
|
||||||
|
android:layout_marginStart="@dimen/ref_md_listitem_margin_left"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/color_rgb_parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/color_hex_guideline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_begin="100dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hex_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:text="@string/literal_hex_uppercase"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_hex_guideline" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hex_colon"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="4dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginHorizontal="4sp"
|
||||||
|
android:text="@string/symbol_colon"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_hex_label"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_hex_value" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hex_value"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:text="@string/ellipsis_six"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:paddingTop="0dp"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_hex_colon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/color_rgb_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/ref_md_dialog_frame_margin"
|
||||||
|
android:layout_marginStart="@dimen/ref_md_listitem_margin_left"
|
||||||
|
android:layout_marginTop="4sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/color_hex_parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/color_hsl_parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/color_rgb_guideline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_begin="100dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_rgb_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:text="@string/literal_rgb_uppercase"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_rgb_guideline" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_rgb_colon"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="4dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginHorizontal="4sp"
|
||||||
|
android:text="@string/symbol_colon"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_rgb_label"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_rgb_value" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_rgb_value"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:text="@string/ellipsis_six"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:paddingTop="0dp"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_rgb_colon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/color_hsl_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/ref_md_dialog_frame_margin"
|
||||||
|
android:layout_marginStart="@dimen/ref_md_listitem_margin_left"
|
||||||
|
android:layout_marginTop="4sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/color_rgb_parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/color_hsv_parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/color_hsl_guideline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_begin="100dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hsl_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:text="@string/literal_hsl_uppercase"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_hsl_guideline" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hsl_colon"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="4dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginHorizontal="4sp"
|
||||||
|
android:text="@string/symbol_colon"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_hsl_label"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_hsl_value" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hsl_value"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:text="@string/ellipsis_six"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:paddingTop="0dp"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_hsl_colon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/color_hsv_parent"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/ref_md_dialog_frame_margin"
|
||||||
|
android:layout_marginStart="@dimen/ref_md_listitem_margin_left"
|
||||||
|
android:layout_marginTop="4sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/color_hsl_parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/color_int_parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/color_hsv_guideline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_begin="100dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hsv_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:text="@string/literal_hsv_uppercase"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_hsv_guideline" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hsv_colon"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="4dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginHorizontal="4sp"
|
||||||
|
android:text="@string/symbol_colon"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_hsv_label"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_hsv_value" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_hsv_value"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:text="@string/ellipsis_six"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:paddingTop="0dp"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_hsv_colon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/color_int_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/ref_md_dialog_frame_margin"
|
||||||
|
android:layout_marginStart="@dimen/ref_md_listitem_margin_left"
|
||||||
|
android:layout_marginTop="4sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/color_hsv_parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/color_int_guideline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_begin="100dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_int_label"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:text="@string/literal_color_int"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_int_guideline" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_int_colon"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="4dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginHorizontal="4sp"
|
||||||
|
android:text="@string/symbol_colon"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_int_label"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/color_int_value" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/color_int_value"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:text="@string/ellipsis_six"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:paddingTop="0dp"
|
||||||
|
android:lineSpacingExtra="2dp"
|
||||||
|
android:textSize="@dimen/ref_md_listitem_textsize"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/color_int_colon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -859,7 +859,8 @@
|
|||||||
<string name="text_unavailable">غير متوفره</string>
|
<string name="text_unavailable">غير متوفره</string>
|
||||||
<string name="text_unavailable_abi_for">واجهة برمجة التطبيقات \"%s\" غير متوفرة</string>
|
<string name="text_unavailable_abi_for">واجهة برمجة التطبيقات \"%s\" غير متوفرة</string>
|
||||||
<string name="text_under_development_content">ستكون الميزة جاهزة للاستخدام في التحديثات القليلة التالية</string>
|
<string name="text_under_development_content">ستكون الميزة جاهزة للاستخدام في التحديثات القليلة التالية</string>
|
||||||
<string name="text_under_development_title">تحت التطوير</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">تحت التطوير</string>
|
||||||
<string name="text_undo">الغاء التحميل</string>
|
<string name="text_undo">الغاء التحميل</string>
|
||||||
<string name="text_undo_simplified">ينسحب</string>
|
<string name="text_undo_simplified">ينسحب</string>
|
||||||
<string name="text_unknown">غير معروف</string>
|
<string name="text_unknown">غير معروف</string>
|
||||||
@@ -938,5 +939,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -855,7 +855,8 @@
|
|||||||
<string name="text_unavailable">Unavailable</string>
|
<string name="text_unavailable">Unavailable</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" is unavailable</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" is unavailable</string>
|
||||||
<string name="text_under_development_content">The feature will be ready to use in the next few updates</string>
|
<string name="text_under_development_content">The feature will be ready to use in the next few updates</string>
|
||||||
<string name="text_under_development_title">Under development</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">Under development</string>
|
||||||
<string name="text_undo">Undo</string>
|
<string name="text_undo">Undo</string>
|
||||||
<string name="text_undo_simplified">Undo</string>
|
<string name="text_undo_simplified">Undo</string>
|
||||||
<string name="text_unknown">Unknown</string>
|
<string name="text_unknown">Unknown</string>
|
||||||
@@ -934,5 +935,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -858,7 +858,8 @@
|
|||||||
<string name="text_unavailable">No disponible</string>
|
<string name="text_unavailable">No disponible</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" no está disponible</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" no está disponible</string>
|
||||||
<string name="text_under_development_content">La función estará lista para su uso en las próximas actualizaciones</string>
|
<string name="text_under_development_content">La función estará lista para su uso en las próximas actualizaciones</string>
|
||||||
<string name="text_under_development_title">En desarrollo</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">En desarrollo</string>
|
||||||
<string name="text_undo">Revocar</string>
|
<string name="text_undo">Revocar</string>
|
||||||
<string name="text_undo_simplified">Revoc</string>
|
<string name="text_undo_simplified">Revoc</string>
|
||||||
<string name="text_unknown">Desconocido</string>
|
<string name="text_unknown">Desconocido</string>
|
||||||
@@ -937,5 +938,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -858,7 +858,8 @@
|
|||||||
<string name="text_unavailable">Indisponible</string>
|
<string name="text_unavailable">Indisponible</string>
|
||||||
<string name="text_unavailable_abi_for">L\'ABI \"%s\" n\'est pas disponible</string>
|
<string name="text_unavailable_abi_for">L\'ABI \"%s\" n\'est pas disponible</string>
|
||||||
<string name="text_under_development_content">La fonctionnalité sera prête à être utilisée dans les prochaines mises à jour</string>.
|
<string name="text_under_development_content">La fonctionnalité sera prête à être utilisée dans les prochaines mises à jour</string>.
|
||||||
<string name="text_under_development_title">En cours de développement</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">En cours de développement</string>
|
||||||
<string name="text_undo">Révoquer</string>
|
<string name="text_undo">Révoquer</string>
|
||||||
<string name="text_undo_simplified">Révoq</string>
|
<string name="text_undo_simplified">Révoq</string>
|
||||||
<string name="text_unknown">Inconnu</string>
|
<string name="text_unknown">Inconnu</string>
|
||||||
@@ -937,5 +938,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -858,7 +858,8 @@
|
|||||||
<string name="text_unavailable">使用できません</string>
|
<string name="text_unavailable">使用できません</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" は使用できません</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" は使用できません</string>
|
||||||
<string name="text_under_development_content">この機能は, 次の数回のアップデートで使用できるようになる予定です</string>
|
<string name="text_under_development_content">この機能は, 次の数回のアップデートで使用できるようになる予定です</string>
|
||||||
<string name="text_under_development_title">開発中</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">開発中</string>
|
||||||
<string name="text_undo">元に戻す</string>
|
<string name="text_undo">元に戻す</string>
|
||||||
<string name="text_undo_simplified">戻る</string>
|
<string name="text_undo_simplified">戻る</string>
|
||||||
<string name="text_unknown">不明</string>
|
<string name="text_unknown">不明</string>
|
||||||
@@ -937,5 +938,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -859,7 +859,8 @@
|
|||||||
<string name="text_unavailable">사용할 수 없음</string>
|
<string name="text_unavailable">사용할 수 없음</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" 를 사용할 수 없습니다</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" 를 사용할 수 없습니다</string>
|
||||||
<string name="text_under_development_content">기능은 다음 몇 가지 업데이트에서 사용할 준비가됩니다.</string>
|
<string name="text_under_development_content">기능은 다음 몇 가지 업데이트에서 사용할 준비가됩니다.</string>
|
||||||
<string name="text_under_development_title">개발중인</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">개발중인</string>
|
||||||
<string name="text_undo">실행 취소</string>
|
<string name="text_undo">실행 취소</string>
|
||||||
<string name="text_undo_simplified">뒤</string>
|
<string name="text_undo_simplified">뒤</string>
|
||||||
<string name="text_unknown">알 수 없음</string>
|
<string name="text_unknown">알 수 없음</string>
|
||||||
@@ -938,5 +939,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -858,7 +858,8 @@
|
|||||||
<string name="text_unavailable">Недоступно</string>
|
<string name="text_unavailable">Недоступно</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" недоступен</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" недоступен</string>
|
||||||
<string name="text_under_development_content">Функция будет готова к использованию в ближайших обновлениях</string>
|
<string name="text_under_development_content">Функция будет готова к использованию в ближайших обновлениях</string>
|
||||||
<string name="text_under_development_title">В стадии разработки</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">В стадии разработки</string>
|
||||||
<string name="text_undo">Отозвать</string>
|
<string name="text_undo">Отозвать</string>
|
||||||
<string name="text_undo_simplified">Верни</string>
|
<string name="text_undo_simplified">Верни</string>
|
||||||
<string name="text_unknown">Неизвестно</string>
|
<string name="text_unknown">Неизвестно</string>
|
||||||
@@ -937,5 +938,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -857,7 +857,8 @@
|
|||||||
<string name="text_unavailable">不可用</string>
|
<string name="text_unavailable">不可用</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" 不可用</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" 不可用</string>
|
||||||
<string name="text_under_development_content">將在後續版本實現當前功能</string>
|
<string name="text_under_development_content">將在後續版本實現當前功能</string>
|
||||||
<string name="text_under_development_title">開發中</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">開發中</string>
|
||||||
<string name="text_undo">撤銷</string>
|
<string name="text_undo">撤銷</string>
|
||||||
<string name="text_undo_simplified">撤銷</string>
|
<string name="text_undo_simplified">撤銷</string>
|
||||||
<string name="text_unknown">未知</string>
|
<string name="text_unknown">未知</string>
|
||||||
@@ -936,5 +937,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -857,7 +857,8 @@
|
|||||||
<string name="text_unavailable">不可用</string>
|
<string name="text_unavailable">不可用</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" 不可用</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" 不可用</string>
|
||||||
<string name="text_under_development_content">將在後續版本實現當前功能</string>
|
<string name="text_under_development_content">將在後續版本實現當前功能</string>
|
||||||
<string name="text_under_development_title">開發中</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">開發中</string>
|
||||||
<string name="text_undo">撤銷</string>
|
<string name="text_undo">撤銷</string>
|
||||||
<string name="text_undo_simplified">撤銷</string>
|
<string name="text_undo_simplified">撤銷</string>
|
||||||
<string name="text_unknown">未知</string>
|
<string name="text_unknown">未知</string>
|
||||||
@@ -936,5 +937,7 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -854,7 +854,8 @@
|
|||||||
<string name="text_unavailable">不可用</string>
|
<string name="text_unavailable">不可用</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" 不可用</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" 不可用</string>
|
||||||
<string name="text_under_development_content">将在后续版本实现当前功能</string>
|
<string name="text_under_development_content">将在后续版本实现当前功能</string>
|
||||||
<string name="text_under_development_title">开发中</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">开发中</string>
|
||||||
<string name="text_undo">撤销</string>
|
<string name="text_undo">撤销</string>
|
||||||
<string name="text_undo_simplified">撤销</string>
|
<string name="text_undo_simplified">撤销</string>
|
||||||
<string name="text_unknown">未知</string>
|
<string name="text_unknown">未知</string>
|
||||||
@@ -936,5 +937,7 @@
|
|||||||
<string name="text_failed_to_locate">定位失败</string>
|
<string name="text_failed_to_locate">定位失败</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">无法定位主题色所在颜色库</string>
|
<string name="content_failed_to_locate_library_for_theme_color">无法定位主题色所在颜色库</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">无法确定主题色条目的索引值</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">无法确定主题色条目的索引值</string>
|
||||||
|
<string name="dialog_title_color_details">颜色详情</string>
|
||||||
|
<string name="dialog_title_theme_color_details">主题色详情</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1080,7 +1080,8 @@
|
|||||||
<string name="text_unavailable">Unavailable</string>
|
<string name="text_unavailable">Unavailable</string>
|
||||||
<string name="text_unavailable_abi_for">ABI \"%s\" is unavailable</string>
|
<string name="text_unavailable_abi_for">ABI \"%s\" is unavailable</string>
|
||||||
<string name="text_under_development_content">The feature will be ready to use in the next few updates</string>
|
<string name="text_under_development_content">The feature will be ready to use in the next few updates</string>
|
||||||
<string name="text_under_development_title">Under development</string>
|
<string name="text_under_development_title">@string/text_under_development</string>
|
||||||
|
<string name="text_under_development">Under development</string>
|
||||||
<string name="text_undo">Undo</string>
|
<string name="text_undo">Undo</string>
|
||||||
<string name="text_undo_simplified">Undo</string>
|
<string name="text_undo_simplified">Undo</string>
|
||||||
<string name="text_unknown">Unknown</string>
|
<string name="text_unknown">Unknown</string>
|
||||||
@@ -1178,5 +1179,12 @@
|
|||||||
<string name="text_failed_to_locate">Failed to locate</string>
|
<string name="text_failed_to_locate">Failed to locate</string>
|
||||||
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
<string name="content_failed_to_locate_library_for_theme_color">Failed to locate the color library for the theme color</string>
|
||||||
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
<string name="content_failed_to_determine_index_of_theme_color_item">Failed to determine the index of the theme color item</string>
|
||||||
|
<string name="dialog_title_color_details">Color details</string>
|
||||||
|
<string name="dialog_title_theme_color_details">Theme color details</string>
|
||||||
|
<string name="literal_color_int" translatable="false">ColorInt</string>
|
||||||
|
<string name="literal_hsv_uppercase" translatable="false">HSV</string>
|
||||||
|
<string name="literal_hsl_uppercase" translatable="false">HSL</string>
|
||||||
|
<string name="literal_rgb_uppercase" translatable="false">RGB</string>
|
||||||
|
<string name="literal_hex_uppercase" translatable="false">HEX</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#Tue Apr 01 11:11:49 CST 2025
|
#Wed Apr 02 00:47:54 CST 2025
|
||||||
BUILD_TIME=1743477109699
|
BUILD_TIME=1743526074171
|
||||||
COMPILE_SDK_VERSION=35
|
COMPILE_SDK_VERSION=35
|
||||||
JAVA_VERSION=23
|
JAVA_VERSION=23
|
||||||
JAVA_VERSION_MIN_RADICAL=0
|
JAVA_VERSION_MIN_RADICAL=0
|
||||||
@@ -17,6 +17,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
|
|||||||
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
|
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
|
||||||
TARGET_SDK_VERSION=35
|
TARGET_SDK_VERSION=35
|
||||||
TARGET_SDK_VERSION_INRT=29
|
TARGET_SDK_VERSION_INRT=29
|
||||||
VERSION_BUILD=3090
|
VERSION_BUILD=3095
|
||||||
VERSION_NAME=6.6.2 Alpha5
|
VERSION_NAME=6.6.2 Alpha5
|
||||||
VSCODE_EXT_REQUIRED_VERSION=1.0.8
|
VSCODE_EXT_REQUIRED_VERSION=1.0.8
|
||||||
|
|||||||
Reference in New Issue
Block a user