2013年12月25日水曜日

ActionBarActivityのOnMenuItemSelectedはオーバーライドできない。

Supoport Libraryに追加されたandroid-support-v7-appcompatのActionBarActivityのOnMenuItemSelectedはオーバーライドできない。



OnMenuItemSelectedはfinalメソッドとなっている。
代わりに、
onOptionsItemSelectedをオーバーライドして使用します。

リファレンスのOnMenuItemSelectedの記述は以下の通りです。
Default implementation of onMenuItemSelected(int, MenuItem) for activities. This calls through to the new onOptionsItemSelected(MenuItem) method for the FEATURE_OPTIONS_PANEL panel, so that subclasses of Activity don't need to deal with feature codes.
 そもそも、OnMenuItemSelectedを実装しているのが間違っていた?

0 件のコメント:

コメントを投稿