Skip to content

Commit 0edd1ae

Browse files
committed
Make AwesomeTextView disappear when empty text or bootstrapText
1 parent 03d7d20 commit 0edd1ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/AwesomeTextView.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,14 @@ protected void updateBootstrapState() {
283283
bootstrapText = null;
284284
}
285285

286+
@Override
287+
protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
288+
super.onTextChanged(text, start, lengthBefore, lengthAfter);
289+
if(!(text!=null && text.length()>0)){
290+
setVisibility(GONE);
291+
}else{
292+
setVisibility(VISIBLE);
293+
}
294+
}
295+
286296
}

0 commit comments

Comments
 (0)