源自:-
vitamio的VideoView播放时点击屏幕顶部跟底部的panel显示不出来
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);
}
});
提问者:BLCheung
2018-06-28 01:06