I have a table row with two buttons, and I use animations to fade the entire table row out after a WebView has not been touched for three seconds. Once the WebView is touched, the table row fades back in. However, I noticed that while the table row is faded out (and the buttons are not visible), the buttons are still clickable. I've tried setting the table row visibility to View.GONE immediately following the fade out animation, and then setting the visibility to View.VISIBLE right before the fade in animation, to no avail; it just seemed to ignore when I set it to View.VISIBLE, because once the table row it disappeared it would not reappear at the screen touch;
TableRow tr;
Animation fade_in = new AlphaAnimation(0.0f, 1.0f);
Animation fade_out = new AlphaAnimation(1.0f, 0.0f);
WebView loss_source_dest;
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.loss);
getStrings();
findIDs();
fade_in.setDuration(750);
fade_out.setDuration(750);
fade_out.setStartOffset(3000);
initial_fade.setDuration(750);
fade_in.setFillAfter(true);
fade_out.setFillAfter(true);
tr.startAnimation(fade_out);
loss_source_dest.setOnTouchListener(new View.OnTouchListener()
{
public boolean onTouch(View v, MotionEvent event)
{
tr.setVisibility(v.VISIBLE);
tr.startAnimation(fade_in);
tr.startAnimation(fade_out);
tr.setVisibility(v.GONE);
return false;
}
});