I want to hide a textView on a click. A click triggers a timer for a certain time, after that time is up, the textView should be visible again. I try to hide the textView on a click, and make it visible again inside public void onFinish(). For some reason, the textView is always visible. I tried usingview.setVisability(View.INVISIBLE) and view.setVisability(View.GONE) but still no go.
textEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
textEdit.setVisibility(View.GONE);
Log.i("textView: ","clicked");
if (....){
new CountDownTimer(25000, 1000) {
{
//some code...
}
public void onFinish() {
otherTextView2.setText("done");
textEdit.setVisibility(View.VISIBLE);
}
}.start();
}
}
}
0 comments:
Post a Comment