Currently, my EditText will display any value that store in a column named 'comment'. But, if the EditText display text "pending" which is retrieved from that column(comment), it should not display automatically. I want to know, how to avoid the EditText from displaying "pending"?. Should be used if else statement? But how?
Below is the EditText code that displays a text which is retrieved from MySQL.
etComment.setText(user.getComment());
You can use the If-Else condition to avoid display the "pending" in the edit text.
Code:
if(!user.getComment().equals("Pending")){
etComment.setText(user.getComment());
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.