getSupportActionBar using FragmentActivity

后端 未结 4 578

I\'m using fragment activity on one project, but it seems v4 support FragmentActivity doesn\'t has getSupportActionBar() method, and I need to use

相关标签:
4条回答
  • 2020-12-16 13:43

    Just use this.getActionBar() to get action bar

    0 讨论(0)
  • 2020-12-16 13:44

    The ActionBarActivity does support the method you require, and is a subclass of FragmentActivity. See: http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html

    0 讨论(0)
  • 2020-12-16 13:55

    Sameera getSupportActionBar() is the new way to get the ToolBar. In fact, ActionBar is now deprecated in Google Material Design.

    0 讨论(0)
  • 2020-12-16 13:59

    to use getSupportActionBar() you need extends ActionBarActivity like this http://antonioleiva.com/actionbarcompat-how-to-use/

    0 讨论(0)
提交回复
热议问题