From 3a52f4590c1040f570b392b1dce49ce140ce24dd Mon Sep 17 00:00:00 2001 From: limuyang Date: Tue, 4 Jul 2023 12:52:19 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../photolibrary/widget/LPPSmoothCheckBox.kt | 12 ++++++------ .../res/drawable-hdpi/ic_check_white_18dp.png | Bin 152 -> 0 bytes .../res/drawable-mdpi/ic_check_white_18dp.png | Bin 146 -> 0 bytes .../res/drawable-xhdpi/ic_check_white_18dp.png | Bin 181 -> 0 bytes .../res/drawable-xxhdpi/ic_check_white_18dp.png | Bin 236 -> 0 bytes .../res/drawable-xxxhdpi/ic_check_white_18dp.png | Bin 276 -> 0 bytes 6 files changed, 6 insertions(+), 6 deletions(-) delete mode 100755 photolibrary/src/main/res/drawable-hdpi/ic_check_white_18dp.png delete mode 100755 photolibrary/src/main/res/drawable-mdpi/ic_check_white_18dp.png delete mode 100755 photolibrary/src/main/res/drawable-xhdpi/ic_check_white_18dp.png delete mode 100755 photolibrary/src/main/res/drawable-xxhdpi/ic_check_white_18dp.png delete mode 100755 photolibrary/src/main/res/drawable-xxxhdpi/ic_check_white_18dp.png diff --git a/photolibrary/src/main/java/top/limuyang2/photolibrary/widget/LPPSmoothCheckBox.kt b/photolibrary/src/main/java/top/limuyang2/photolibrary/widget/LPPSmoothCheckBox.kt index 9a66939..b4f4e07 100755 --- a/photolibrary/src/main/java/top/limuyang2/photolibrary/widget/LPPSmoothCheckBox.kt +++ b/photolibrary/src/main/java/top/limuyang2/photolibrary/widget/LPPSmoothCheckBox.kt @@ -19,7 +19,7 @@ import kotlin.math.sqrt * */ -class LPPSmoothCheckBox @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : View(context, attrs, defStyleAttr), Checkable { +internal class LPPSmoothCheckBox @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : View(context, attrs, defStyleAttr), Checkable { private lateinit var mTickPaint: Paint private lateinit var mFloorPaint: Paint @@ -74,7 +74,7 @@ class LPPSmoothCheckBox @JvmOverloads constructor(context: Context, attrs: Attri } - override fun onSaveInstanceState(): Parcelable? { + override fun onSaveInstanceState(): Parcelable { val bundle = Bundle() bundle.putParcelable(KEY_INSTANCE_STATE, super.onSaveInstanceState()) bundle.putBoolean(KEY_INSTANCE_STATE, isChecked) @@ -135,13 +135,13 @@ class LPPSmoothCheckBox @JvmOverloads constructor(context: Context, attrs: Attri private fun measureSize(measureSpec: Int): Int { val defSize = dp2px(context, DEF_DRAW_SIZE.toFloat()) - val specSize = View.MeasureSpec.getSize(measureSpec) - val specMode = View.MeasureSpec.getMode(measureSpec) + val specSize = MeasureSpec.getSize(measureSpec) + val specMode = MeasureSpec.getMode(measureSpec) var result = 0 when (specMode) { - View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.AT_MOST -> result = defSize.coerceAtMost(specSize) - View.MeasureSpec.EXACTLY -> result = specSize + MeasureSpec.UNSPECIFIED, MeasureSpec.AT_MOST -> result = defSize.coerceAtMost(specSize) + MeasureSpec.EXACTLY -> result = specSize } return result } diff --git a/photolibrary/src/main/res/drawable-hdpi/ic_check_white_18dp.png b/photolibrary/src/main/res/drawable-hdpi/ic_check_white_18dp.png deleted file mode 100755 index 08dbac9d3578a992e6f9711ea7bc9259847aa389..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^(jd&i0wmS%+S~(D@t!V@Ar_~T6C_wm*#GDL+dX;l z%g_Ji|Hpb<|MLHT^M5X7ugmq-lT81n|FIWcp)fsU_Kkn2;P z;rt^PnzR4-B~3VNI!Vkwpm#}DQ`QtoT{RCjhCut7rDpeTegIm<;OXk;vd$@?2>|#_ BI?Vt8 diff --git a/photolibrary/src/main/res/drawable-mdpi/ic_check_white_18dp.png b/photolibrary/src/main/res/drawable-mdpi/ic_check_white_18dp.png deleted file mode 100755 index ad1484767f791343581dfcdd35cfca4d0962c280..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|mB0XIkLp07OCrAW6*nj9h^MBC~ z+JS%mKls1;zg5fB7mva}efXcvqx%0RhxW$5|G(|mp0c(jlrzBT$N$#<_Z?0x@cOc0 wH`5{=$$p_7oBsd5{~(YlbX$AFBu5s8zIoop+rE^W0WD$hboFyt=akR{058fu|k0wldT1B8K8ji-xah{y4_S9bF@81T3TmS5N? z#C(9Q$LV3`iyt|zzNMK?OD+gTJ2maGvJ86jqI1fWJrY@L@@dRh+8HxyC3MfUOIWFC zSzj(@_&m4jkH)bAn}wUwn%lHbyQcPAEcKb)b;T<=reaCi=lz``&(3vDxn&&?DHulII0e{ z{C)H>r(rG|rQ9*iWu-(!7^S%ERGKrPlsj}eGfKIAi#r=qJ>08@0j1o|iBfLsM1649 mREzVV^gVB!s3?k}zv~IfJrzvItflq<0000i*jo}i373|mq*}I4NcaPr1vPBqUj4{So^{}zU z+2V@M76*V4(wk$0gq_FHCw*~rLF6PjJvrp8;xy!tvzjxILyidcxS;vzge%E8;0~bA zCza(K@t8(4No6@FJiXx|O)AO}!Fe{GAi-fQe6!HylPYi`B&W#9B~|3)kkD4;1WDtE zgcdi2M1XboCryi6C~+>FcwG}oCT5=CqmNX1W4MP8OZ|2BU#~0BugB|7-NjF ae|iA|xq+-YC!0F}0000