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.
2 parents 3f98bb1 + 0105cee commit a576ec7Copy full SHA for a576ec7
WordPressUtils/src/main/java/org/wordpress/android/util/EditTextUtils.java
@@ -4,6 +4,7 @@
4
import android.text.TextUtils;
5
import android.view.inputmethod.InputMethodManager;
6
import android.widget.EditText;
7
+import android.widget.TextView;
8
9
/**
10
* EditText utils
@@ -14,13 +15,10 @@ private EditTextUtils() {
14
15
}
16
17
- * returns text string from passed EditText
18
+ * returns non-null text string from passed TextView
19
*/
- public static String getText(EditText edit) {
20
- if (edit.getText() == null) {
21
- return "";
22
- }
23
- return edit.getText().toString();
+ public static String getText(TextView textView) {
+ return (textView != null) ? textView.getText().toString() : "";
24
25
26
0 commit comments