Questions tagged [android-actionbaractivity]

Base class for Android activities that use the support library action bar features.

Base class for Android activities that use the support library action bar features.

Extending ActionBarActivity (along with the Theme.AppCompat theme) allows an application running on API level 7 or higher to include an Action Bar (which is otherwise only available when targeting API level 11+).

Warning Since Android 6.0 ActionBarActivity is deprecated! You should use AppCompatActivity instead.

235 questions
319
votes
7 answers

Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which?

I'm coming from iOS where it's easy and you simply use a UIViewController. However, in Android things seem much more complicated, with certain UIComponents for specific API Levels. I'm reading BigNerdRanch for Android (the book is roughly 2 years…
164
votes
6 answers

What's the enhancement of AppCompatActivity over ActionBarActivity?

android.support.v7.app.AppCompatActivity was added into the latest v7 support library as a new feature yesterday. It is said that ActionBarActivity has been deprecated in favor of the new AppCompatActivity and that AppCompatActivity is base class…
122
votes
3 answers

Why was ActionBarActivity deprecated

I installed Android Studio freshly and I begun coding an activity to extend ActionBarActivity and it showed that it was deprecated. So how else do I set up an actionbar for my activity. Also the Getting Started Training uses the ActionBarActivity…
44
votes
9 answers

How to center toolbar back button?

I'm having a problem trying to center the back button on the support toolbar. I'm using it inside an ActionBarActivity.
mewa
  • 1,532
  • 1
  • 12
  • 20
34
votes
10 answers

ActionBarActivity: cannot be resolved to a type

I am new to android-programming. I am following this tutorial to add an ActionBar to my Main_Activity using the explanation in the "Support Android 2.1 and Above" section. I followed this tutorial to add a Library-Project. Then after adding the…
hashDefine
  • 1,491
  • 6
  • 23
  • 33
31
votes
5 answers

Change Icon Of Navigation Drawer

I am having trouble with changing my navigation drawer icon to a custom one. I've currently had to implement the standard drawer icon which has 3 horizontal lines on top, but now I want to replace this with my custom drawer icon. This is how my…
30
votes
11 answers

Set OnClick Listener on Action Bar Title in Android

I am working on android application where I am using ActionBar so there one is navigation drawer icon to open it and title of ActionBar in ActionBar. I want to set a click listener on title of ActionBar such that it start a new Activity and set…
15
votes
4 answers

How to handle AsyncTask's in ActionBarActivity Fragments when ViewPager is used?

I'm using ActionBarActivity to create 5 tabs. I have used ViewPager to swipe between the 5 tabs using SectionsPagerAdapter which extends FragmentPagerAdapter. Each tab has a fragment with an asynctask called in oncreateview method. When I'm in one…
14
votes
3 answers

ActionBarActivity with ActionBarDrawerToggle - Not using drawerImageRes

Working from this android example, I've attempted to create an app that uses the support version (android.support.v4 and android.support.v7). The example creates a menu drawer that looks like this and my code gets this Notice the icon is…
Ne0
  • 2,688
  • 3
  • 35
  • 49
13
votes
1 answer

How add a single menu item left to the toolbar in android?

I simply want a back button in left side of toolbar.But when i added with following code ,appear in right side of toolbar.how can i change to it to left side? my code
13
votes
2 answers

ActionBarActivity back button not popping from backstack

I'm using this template https://github.com/kanytu/android-material-drawer-template just to try out material design so I've implemented a few fragments some have webviews some have not. My problem is when switching between the fragments I can see…
13
votes
3 answers

Android support v7 can't find ActionBarActivity

I've used all the manuals available and finally i was managed to add the v7 support to my android version 2.3 project. I'm trying to add ActionBarActivity but it can't be found.. although ActionBar is found... This is me trying to get…
12
votes
1 answer

Unable to change Appcompat theme from light to holo dark

I am trying to change the theme of my app completely, This is what I modified & tried : styles.xml in values folder is