blob: 3135bb3ad815f01e0b1404d7c1672434fb4a2208 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package ca.allanwang.kau.kpref.activity.items
import android.view.View
import ca.allanwang.kau.kpref.activity.R
/**
* Created by Allan Wang on 2017-06-07.
*
* Header preference
* This view just holds a title and is not clickable. It is styled using the accent color
*/
open class KPrefHeader(builder: CoreContract) : KPrefItemCore(builder) {
override fun getLayoutRes(): Int = R.layout.kau_pref_header
override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) {
if (accentColor != null) viewHolder.title.setTextColor(accentColor)
}
override fun getType() = R.id.kau_item_pref_header
}
|