Skip to content

Commit 980c49d

Browse files
committed
Remove unneeded view ids
1 parent 9282b87 commit 980c49d

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

modules/material-lists/src/androidMain/kotlin/splitties/material/lists/IconOneLineListItem.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ class IconOneLineListItem(
3636
disableDefaultTint: Boolean
3737
) : this(context, null, disableDefaultTint = disableDefaultTint)
3838

39-
val icon = imageView(R.id.icon) {
39+
val icon = imageView {
4040
if (!disableDefaultTint) imgTintList = styledColorSL(android.R.attr.textColorSecondary)
4141
}
4242

4343
/**
4444
* The one-line list item keeps the [firstLine] name for its only [TextView] to make
4545
* switching to and from [IconTwoLinesListItem] easier.
4646
*/
47-
val firstLine = textView(R.id.firstLine) {
47+
val firstLine = textView {
4848
ellipsize = END
4949
maxLines = 1
5050
textAppearance = R.style.TextAppearance_AppCompat_Subhead

modules/material-lists/src/androidMain/kotlin/splitties/material/lists/IconTwoLinesListItem.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ class IconTwoLinesListItem(
3535
disableDefaultTint: Boolean
3636
) : this(context, null, disableDefaultTint = disableDefaultTint)
3737

38-
val icon = imageView(R.id.icon) {
38+
val icon = imageView {
3939
if (!disableDefaultTint) imgTintList = styledColorSL(android.R.attr.textColorSecondary)
4040
}
4141

42-
val firstLine = textView(R.id.firstLine) {
42+
val firstLine = textView {
4343
ellipsize = END
4444
maxLines = 1
4545
textAppearance = R.style.TextAppearance_AppCompat_Subhead
4646
}
4747

48-
val secondLine = textView(R.id.secondLine) {
48+
val secondLine = textView {
4949
ellipsize = END
5050
maxLines = 1
5151
textAppearance = R.style.TextAppearance_AppCompat_Small

modules/material-lists/src/androidMain/kotlin/splitties/material/lists/IconTwoLinesSwitchListItem.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ class IconTwoLinesSwitchListItem(
3636
disableDefaultTint: Boolean
3737
) : this(context, null, disableDefaultTint = disableDefaultTint)
3838

39-
val icon = imageView(R.id.icon) {
39+
val icon = imageView {
4040
if (!disableDefaultTint) imgTintList = styledColorSL(android.R.attr.textColorSecondary)
4141
}
4242

43-
val firstLine = textView(R.id.firstLine) {
43+
val firstLine = textView {
4444
ellipsize = END
4545
maxLines = 1
4646
textAppearance = R.style.TextAppearance_AppCompat_Subhead
4747
}
4848

49-
val secondLine = textView(R.id.secondLine) {
49+
val secondLine = textView {
5050
ellipsize = END
5151
maxLines = 1
5252
textAppearance = R.style.TextAppearance_AppCompat_Small

modules/material-lists/src/androidMain/kotlin/splitties/material/lists/SwitchTwoLinesIconListItem.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ class SwitchTwoLinesIconListItem(
3636
disableDefaultTint: Boolean
3737
) : this(context, null, disableDefaultTint = disableDefaultTint)
3838

39-
val switch = view(::SwitchCompat, R.id.toggle)
39+
val switch = switch(R.id.toggle)
4040

41-
val icon = imageView(R.id.icon) {
41+
val icon = imageView {
4242
if (!disableDefaultTint) imgTintList = styledColorSL(android.R.attr.textColorSecondary)
4343
}
4444

45-
val firstLine = textView(R.id.firstLine) {
45+
val firstLine = textView {
4646
ellipsize = END
4747
maxLines = 1
4848
textAppearance = R.style.TextAppearance_AppCompat_Subhead
4949
}
5050

51-
val secondLine = textView(R.id.secondLine) {
51+
val secondLine = textView {
5252
ellipsize = END
5353
maxLines = 1
5454
textAppearance = R.style.TextAppearance_AppCompat_Small

modules/material-lists/src/androidMain/res/values/view_ids.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
44
-->
55

66
<resources>
7-
<item name="icon" type="id"/>
87
<item name="toggle" type="id"/>
9-
<item name="firstLine" type="id"/>
10-
<item name="secondLine" type="id"/>
118
</resources>

0 commit comments

Comments
 (0)