File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
java/dev/wendyyanto/library Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2828 app : layout_constraintLeft_toLeftOf =" parent"
2929 app : layout_constraintRight_toRightOf =" parent"
3030 app : layout_constraintTop_toBottomOf =" @id/ll_dummy"
31- app : layout_id =" @layout/layout_multiple_textview"
31+ app : layout_res =" @layout/layout_multiple_textview"
3232 app : parent_layout_id =" @id/cl_parent" />
3333
3434 </androidx .constraintlayout.widget.ConstraintLayout>
Original file line number Diff line number Diff line change @@ -40,15 +40,15 @@ class LazyLoadComponent @JvmOverloads constructor(
4040 try {
4141 parentResId =
4242 typeArray.getResourceId(R .styleable.LazyLoadComponent_parent_layout_id , - 1 )
43- val layoutResId = typeArray.getResourceId(R .styleable.LazyLoadComponent_layout_id , - 1 )
44- if (layoutResId == - 1 ) {
43+ val layoutRes = typeArray.getResourceId(R .styleable.LazyLoadComponent_layout_res , - 1 )
44+ if (layoutRes == - 1 ) {
4545 throw IllegalArgumentException (LAYOUT_RESOURCE_IS_INVALID )
4646 }
4747 if (parentResId == - 1 ) {
4848 throw IllegalArgumentException (PARENT_RESOURCE_ID_IS_INVALID )
4949 }
5050 with (viewStub) {
51- layoutResource = layoutResId
51+ layoutResource = layoutRes
5252 addView(this )
5353 }
5454 } finally {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<resources >
33 <declare-styleable name =" LazyLoadComponent" >
4- <attr name =" layout_id " format =" reference" />
4+ <attr name =" layout_res " format =" reference" />
55 <attr name =" parent_layout_id" format =" reference" />
66 </declare-styleable >
77</resources >
You can’t perform that action at this time.
0 commit comments