I have a button called panel_close in my java code. In the setOnclickListener method I update the visibility of some other views. However, it seems sometimes the code does not update the visibility of the panels properly. Here is the code
panel_close.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
View temp=findViewById(R.id.show_panel);
temp.startAnimation(window_close);
temp.setVisibility(View.GONE);
compass.setVisibility(View.VISIBLE); // compass is defined as a field. Sometimes the code does not make this view visible
stats.setVisibility(View.VISIBLE); // stats is defined as a field. Sometimes the code does not make this view visible
control.setVisibility(View.VISIBLE); // control is defined as a field. Sometimes the code does not make this view visible
loadAllList(); // this is an AsyncTask
loadAllpins(); // this is an AsyncTask
}
});
Any comment will be appreciated.