fix titleTextAppearance typo in base toolbar

This commit is contained in:
Jays2Kings 2021-05-06 16:14:52 -04:00
parent 6f18686e08
commit c43b36768c
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ open class BaseToolbar @JvmOverloads constructor(context: Context, attrs: Attrib
protected lateinit var toolbarTitle: TextView
private val defStyleRes = com.google.android.material.R.style.Widget_MaterialComponents_Toolbar
protected val titleTextAppeance: Int
protected val titleTextAppearance: Int
var incognito = false
init {
@ -25,7 +25,7 @@ open class BaseToolbar @JvmOverloads constructor(context: Context, attrs: Attrib
0,
defStyleRes
)
titleTextAppeance = a.getResourceId(R.styleable.Toolbar_titleTextAppearance, 0)
titleTextAppearance = a.getResourceId(R.styleable.Toolbar_titleTextAppearance, 0)
a.recycle()
}

View File

@ -19,7 +19,7 @@ class CenteredToolbar@JvmOverloads constructor(context: Context, attrs: Attribut
override fun onFinishInflate() {
super.onFinishInflate()
toolbarTitle = findViewById<MaterialTextView>(R.id.toolbar_title)
toolbarTitle.setTextAppearance(titleTextAppeance)
toolbarTitle.setTextAppearance(titleTextAppearance)
toolbarTitle.setTextColor(context.getResourceColor(R.attr.actionBarTintColor))
collapseIcon = context.contextCompatDrawable(R.drawable.ic_arrow_back_24dp)?.apply {
setTint(context.getResourceColor(R.attr.actionBarTintColor))

View File

@ -38,7 +38,7 @@ class FloatingToolbar @JvmOverloads constructor(context: Context, attrs: Attribu
override fun onFinishInflate() {
super.onFinishInflate()
toolbarTitle = findViewById<MaterialTextView>(R.id.card_title)
toolbarTitle.setTextAppearance(titleTextAppeance)
toolbarTitle.setTextAppearance(titleTextAppearance)
toolbarTitle.setTextColor(actionColorAlpha)
toolbarsubTitle = findViewById<MaterialTextView>(R.id.card_subtitle)