We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9adb01 commit 8f7fab3Copy full SHA for 8f7fab3
base/src/main/java/com/enginebai/base/extensions/TextViewExt.kt
@@ -0,0 +1,14 @@
1
+package com.enginebai.base.extensions
2
+
3
+import android.view.View
4
+import android.widget.TextView
5
6
+fun TextView.setTextWithExistence(s: String?) {
7
+ s?.let { this.text = it }
8
+ setExistence(!s.isNullOrBlank())
9
+}
10
11
+fun TextView.setTextWithVisibility(s: String?) {
12
13
+ setVisible(!s.isNullOrBlank())
14
0 commit comments