From bf0f6438f984fd31a3b304d50c902ea1519c285d Mon Sep 17 00:00:00 2001 From: GKF Date: Thu, 20 Jun 2019 17:43:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/lib/theme/ColorUtils.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/ColorUtils.kt b/app/src/main/java/io/legado/app/lib/theme/ColorUtils.kt index 5d76e6e4e..f3942fba4 100644 --- a/app/src/main/java/io/legado/app/lib/theme/ColorUtils.kt +++ b/app/src/main/java/io/legado/app/lib/theme/ColorUtils.kt @@ -101,9 +101,9 @@ object ColorUtils { * 随机颜色 */ class RandomColor(alpha: Int, lower: Int, upper: Int) { - internal var alpha: Int = 0 - internal var lower: Int = 0 - internal var upper: Int = 0 + private var alpha: Int = 0 + private var lower: Int = 0 + private var upper: Int = 0 //随机数是前闭 后开 val color: Int @@ -124,32 +124,32 @@ object ColorUtils { setUpper(upper) } - fun getAlpha(): Int { + private fun getAlpha(): Int { return alpha } - fun setAlpha(alpha: Int) { + private fun setAlpha(alpha: Int) { var alpha = alpha if (alpha > 255) alpha = 255 if (alpha < 0) alpha = 0 this.alpha = alpha } - fun getLower(): Int { + private fun getLower(): Int { return lower } - fun setLower(lower: Int) { + private fun setLower(lower: Int) { var lower = lower if (lower < 0) lower = 0 this.lower = lower } - fun getUpper(): Int { + private fun getUpper(): Int { return upper } - fun setUpper(upper: Int) { + private fun setUpper(upper: Int) { var upper = upper if (upper > 255) upper = 255 this.upper = upper