rlRootView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (llTopPanel.getVisibility() == View.VISIBLE
|| llBottomPanel.getVisibility() == View.VISIBLE) {
llTopPanel.setVisibility(View.GONE);
llBottomPanel.setVisibility(View.GONE);
}
llTopPanel.setVisibility(View.VISIBLE);
llBottomPanel.setVisibility(View.VISIBLE);
// 5秒后无操作就GONE掉
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
llTopPanel.setVisibility(View.GONE);
llBottomPanel.setVisibility(View.GONE);
}
}, AUTO_HIDE_TIME);
}
});