2

CAB メニューのチェック ボタンをどのように処理できますか?

項目は android.R.id.checkbox のような内部 ID に関連付けられていますか?

SherlockActionBar CAB で処理できると読みましたが、ネイティブの ActionBar CAB と同じでしょうか?

このアイテムの相互作用を検出する方法はありますか? onActionModeFinished()は、発生した以前の変更のために CAB が存在する必要があるため、複数回呼び出すため、十分ではありません。

ありがとう。

4

1 に答える 1

1

さて、いくつかのことを試した後、最終的に解決策を見つけました。チェックボックスまたはオンバックプレスに必要なコードを以下の方法で配置します

 public void onDestroyActionMode(ActionMode mode) 
{
     //place the code you want for the checkbox or back icon here.  If you don't want
     // this code run if other selections are used, then just create a boolean value that
    //you earlier on and check the value in this section before implementing the code
}

};

于 2012-12-02T21:39:54.443 に答える