カスタム進行状況ダイアログの実装でいくつかの問題が発生しました。オーバーレイがタッチイベントをインターセプトしても、ユーザーはトラックボールを操作して、無効になっているはずの要素をクリックすることができます。
これを回避する方法はありますか?
編集:ここに解決策があります
//=====================================================================================
protected void showProgressIndicator()
{
progressIndicator_.show();
}
//=====================================================================================
@Override
public boolean onTrackballEvent(MotionEvent event)
{
return progressIndicator_.getVisibility() == View.VISIBLE;
}
//=====================================================================================
protected void hideProgressIndicator()
{
progressIndicator_.hide();
}
theninshowメソッド
//=====================================================================================
public void show()
{
setVisibility(VISIBLE);
if (animationHandler_ != null)
return;
animationHandler_ = new Handler();
animationHandler_.post(animateTask_);
requestFocus();
}