build: fix cleanup issues

This commit is contained in:
Alexander Capehart
2026-08-29 17:46:28 -06:00
parent df2e3852b4
commit 9de8b90b7a
4 changed files with 9 additions and 8 deletions
@@ -50,9 +50,9 @@ constructor(
defStyleRes: Int = 0,
) : DialogPreference(context, attrs, defStyleAttr, defStyleRes) {
/** The names of each entry. */
val entries: Array<CharSequence>
var entries: Array<CharSequence> = arrayOf()
/** The corresponding integer values for each entry. */
val values: IntArray
var values: IntArray = intArrayOf()
private var entryIcons: TypedArray? = null
private var offValue: Int? = -1
@@ -68,8 +68,8 @@ constructor(
// Can't depend on ListPreference due to it working with strings we have to instead
// define our own attributes for entries/values.
val entries = getTextArrayOrThrow(R.styleable.IntListPreference_entries)
val values =
entries = getTextArrayOrThrow(R.styleable.IntListPreference_entries)
values =
context.resources.getIntArray(
getResourceIdOrThrow(R.styleable.IntListPreference_entryValues)
)
@@ -26,6 +26,7 @@ import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout
import androidx.annotation.AttrRes
@@ -158,7 +159,7 @@ constructor(
}
}
override fun addView(child: View?, index: Int, params: LayoutParams?) {
override fun addView(child: View?, index: Int, params: ViewGroup.LayoutParams?) {
if (inflatingLayout) {
super.addView(child, index, params)
} else {