1
0
Fork 0
fenix/app/src/main/java/org/mozilla/fenix/settings/AccountPreference.kt

43 lines
1.3 KiB
Kotlin

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import org.mozilla.fenix.R
class AccountPreference : Preference {
var title: TextView? = null
var summary: TextView? = null
var errorIcon: ImageView? = null
var background: View? = null
constructor(context: Context) : super(context)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context, attrs: AttributeSet?, attributeSetId: Int) : super(
context,
attrs,
attributeSetId
)
init {
layoutResource = R.layout.account_preference
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
title = holder.findViewById(R.id.title) as TextView
summary = holder.findViewById(R.id.summary) as TextView
errorIcon = holder.findViewById(R.id.error_icon) as ImageView
background = holder.itemView
}
}