mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Fix missing recycle call and ensure this mistake will not happen again
This commit is contained in:
parent
bc9493d5b9
commit
a1466e299b
3 changed files with 4 additions and 3 deletions
|
@ -30,6 +30,7 @@
|
|||
<issue id="SetTextI18n" severity="error" />
|
||||
<issue id="ViewConstructor" severity="error" />
|
||||
<issue id="UseValueOf" severity="error" />
|
||||
<issue id="Recycle" severity="error" />
|
||||
|
||||
<!-- Ignore error from HtmlCompressor lib -->
|
||||
<issue id="InvalidPackage">
|
||||
|
|
|
@ -129,7 +129,7 @@ class BadgeFloatingActionButton @JvmOverloads constructor(
|
|||
attrs?.let { initAttrs(attrs) }
|
||||
}
|
||||
|
||||
@SuppressWarnings("ResourceType", "Recycle")
|
||||
@SuppressWarnings("Recycle")
|
||||
private fun initAttrs(attrs: AttributeSet) {
|
||||
context.obtainStyledAttributes(attrs, R.styleable.BadgeFloatingActionButton).use {
|
||||
counterBackgroundColor = it.getColor(R.styleable.BadgeFloatingActionButton_badgeBackgroundColor, 0)
|
||||
|
|
|
@ -73,11 +73,11 @@ class PollResultLineView @JvmOverloads constructor(
|
|||
orientation = HORIZONTAL
|
||||
ButterKnife.bind(this)
|
||||
|
||||
val typedArray = context.obtainStyledAttributes(attrs,
|
||||
R.styleable.PollResultLineView, 0, 0)
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.PollResultLineView, 0, 0)
|
||||
label = typedArray.getString(R.styleable.PollResultLineView_optionName) ?: ""
|
||||
percent = typedArray.getString(R.styleable.PollResultLineView_optionCount) ?: ""
|
||||
optionSelected = typedArray.getBoolean(R.styleable.PollResultLineView_optionSelected, false)
|
||||
isWinner = typedArray.getBoolean(R.styleable.PollResultLineView_optionIsWinner, false)
|
||||
typedArray.recycle()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue