mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +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) {
|
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||||
// display the title in multi-line to avoid ellipsis.
|
// display the title in multi-line to avoid ellipsis.
|
||||||
try {
|
try {
|
||||||
holder.itemView.findViewById<TextView>(android.R.id.title)?.setSingleLine(false)
|
holder.itemView.findViewById<TextView>(android.R.id.title)?.isSingleLine = false
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Timber.e(e, "onBindView")
|
Timber.e(e, "onBindView")
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ open class VectorPreference : Preference {
|
||||||
val title = itemView.findViewById<TextView>(android.R.id.title)
|
val title = itemView.findViewById<TextView>(android.R.id.title)
|
||||||
val summary = itemView.findViewById<TextView>(android.R.id.summary)
|
val summary = itemView.findViewById<TextView>(android.R.id.summary)
|
||||||
if (title != null) {
|
if (title != null) {
|
||||||
title.setSingleLine(false)
|
title.isSingleLine = false
|
||||||
title.setTypeface(null, mTypeface)
|
title.setTypeface(null, mTypeface)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ class VectorSwitchPreference : SwitchPreference {
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||||
// display the title in multi-line to avoid ellipsis.
|
// 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)
|
super.onBindViewHolder(holder)
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ class PollResultLineView @JvmOverloads constructor(
|
||||||
set(value) {
|
set(value) {
|
||||||
field = value
|
field = value
|
||||||
// Text in main color
|
// Text in main color
|
||||||
labelTextView.setTypeface(labelTextView.getTypeface(), if (value) Typeface.BOLD else Typeface.NORMAL)
|
labelTextView.setTypeface(labelTextView.typeface, if (value) Typeface.BOLD else Typeface.NORMAL)
|
||||||
percentTextView.setTypeface(percentTextView.getTypeface(), if (value) Typeface.BOLD else Typeface.NORMAL)
|
percentTextView.setTypeface(percentTextView.typeface, if (value) Typeface.BOLD else Typeface.NORMAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|
Loading…
Reference in a new issue