Tag: android-actionbar

How do I get a copy of the Android overflow menu icon?

How do I get a copy of Android’s overflow menu icon to use in a custom menu.

getSupportActionBar using FragmentActivity

I’m using fragment activity on one project, but it seems v4 support FragmentActivity doesn’t has getSupportActionBar() method, and I need to use the support one in order to use android.support.v7.app.ActionBar

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 mDrawerToggle is at the moment: mDrawerToggle=new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.app_icon, […]

Exception: This is not supported, use MenuItemCompat.getActionProvider()

I’m trying to make “Share” button in Action Bar of Android Application. Here my code: import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ShareActionProvider; import android.widget.TextView; and fragment part: { private String mForecastText; public PlaceholderFragment() { setHasOptionsMenu(true); } private Intent sharedIntentMaker(){ Intent […]

SearchView taking all the space in the new ActionBarCompat

I switched from ActionBarSherlock to ActionBarCompat (support library v7). After some adjustments, almost everything is working fine by now. But I’m in trouble with the SearchView in the ActionBar. When it’s expanded (actually, It’s always expanded in my Activity), it takes up all the space and doesn’t respect the space of other Action Items that […]

Drawer indicator in lollipop play store

I am using a Nexus 7 with the Android 5.0 preview build. On this page http://developer.android.com/tools/support-library/index.html I see Changes for v7 appcompat library: Updated ActionBarDrawerToggle, which contains the menu-to-arrow animation Is this what the Google Play app uses? Am I reading too much into this statement? What do I need to change to get this […]

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 click listener different on navigation drawer icon to […]

openOptionsMenu function not working in ICS?

Im using action bar compability library. Im trying to open the options menu from a button with openOptionsMenu() function but it does nothing. Menu shows as usual when pressing the menu key on my phone. What is wrong here? public class ReadActivity extends ActionBarActivity { … @Override public boolean onCreateOptionsMenu(Menu menu) { boolean value; MenuInflater […]

Previous fragment visible under the new fragment

I have a tab + ViewPager layout and in one of these tabs I have a list view. When I replace that list fragment upon the onclick I can still see the old fragment under the new fragment. See: Code: FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction transaction = fragmentManager.beginTransaction(); HallsInStateFragment hallsForState = new HallsInStateFragment(); transaction.replace(R.id.container, hallsForState); […]

How to slide the ActionBar along with the NavigationDrawer

What I want to do is slide the ActionBar along with the NavigationDrawer when the drawer is opened. I am currently not using any third party libraries and if at all possible I want to keep it that way. All i need is an implementation of method like: getActionBarView.slide(dp); This is the code I currently […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.