mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Use property access syntax.
This commit is contained in:
parent
f609cc7042
commit
0dc3593660
4 changed files with 5 additions and 5 deletions
|
@ -45,7 +45,7 @@ class VectorEditTextPreference : EditTextPreference {
|
|||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
// display the title in multi-line to avoid ellipsis.
|
||||
try {
|
||||
holder.itemView.findViewById<TextView>(android.R.id.title)?.setSingleLine(false)
|
||||
holder.itemView.findViewById<TextView>(android.R.id.title)?.isSingleLine = false
|
||||
} catch (e: Exception) {
|
||||
Timber.e(e, "onBindView")
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ open class VectorPreference : Preference {
|
|||
val title = itemView.findViewById<TextView>(android.R.id.title)
|
||||
val summary = itemView.findViewById<TextView>(android.R.id.summary)
|
||||
if (title != null) {
|
||||
title.setSingleLine(false)
|
||||
title.isSingleLine = false
|
||||
title.setTypeface(null, mTypeface)
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class VectorSwitchPreference : SwitchPreference {
|
|||
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
// display the title in multi-line to avoid ellipsis.
|
||||
holder.itemView.findViewById<TextView>(android.R.id.title)?.setSingleLine(false)
|
||||
holder.itemView.findViewById<TextView>(android.R.id.title)?.isSingleLine = false
|
||||
|
||||
super.onBindViewHolder(holder)
|
||||
}
|
||||
|
|
|
@ -64,8 +64,8 @@ class PollResultLineView @JvmOverloads constructor(
|
|||
set(value) {
|
||||
field = value
|
||||
// Text in main color
|
||||
labelTextView.setTypeface(labelTextView.getTypeface(), if (value) Typeface.BOLD else Typeface.NORMAL)
|
||||
percentTextView.setTypeface(percentTextView.getTypeface(), if (value) Typeface.BOLD else Typeface.NORMAL)
|
||||
labelTextView.setTypeface(labelTextView.typeface, if (value) Typeface.BOLD else Typeface.NORMAL)
|
||||
percentTextView.setTypeface(percentTextView.typeface, if (value) Typeface.BOLD else Typeface.NORMAL)
|
||||
}
|
||||
|
||||
init {
|
||||
|
|
Loading…
Reference in a new issue