AppDetails: Update header layout to better show unknown apps
This commit is contained in:
@@ -21,6 +21,7 @@ package com.aurora.extensions
|
||||
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.getSystemService
|
||||
|
||||
fun View.isVisible() = visibility == View.VISIBLE
|
||||
@@ -51,3 +52,13 @@ fun View.hideKeyboard(): Boolean {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
fun TextView.updateText(text: String?) {
|
||||
if (text.isNullOrEmpty()) {
|
||||
hide()
|
||||
} else {
|
||||
show()
|
||||
this.text = text
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user