Tag: android-actionbar

ActionBarSherlock spinner not selectable ins ActionBar – Theme related

Some users of my application are experiencing a weird problem when using my application in landscape mode. I am using actionbarsherlock and have set the navigation mode to tabs (using ActionBar.NAVIGATION_MODE_TABS). Some users are finding when launching the app in portrait and then rotating the device the actionbar shows a spinner list rather than the […]

Shadow beneath Actionbar-compat while using paddings

I’m working on an Android application which uses the compatibility package from Google for getting fragments and such in Android 2.x. The actionbar has been created based on Google’s example. A white “shadow” has been put beneath it using <item name=”android:windowContentOverlay”>@drawable/actionbar_shadow</item> However the object below the actionbar (a fragment) contains a ListView with the following […]

Event when searchview expands from iconified view

What event(s) I should listen to determine when user clicks on iconified SearchView. I want to remove some items (ActionBar navigation tabs, if that is important) from action bar to make more space in portrait orientation. I’ve tried OnClickListener, OnFocusChangeListener, OnTouchListener and other events but neither gets triggered by SearchView expansion.

Always display the full title in the ActionBar

I have a ActionBar with a logo, title, three tabs and one action item. In portrait mode everything looks good, because the tabs is moved to the stacked ActionBar, like this: _________________ # My title                ยค _________________ Tab 1 | Tab 2 | Tab 3 _________________ But in landscape mode the title gets truncated […]

How to use or workaround searchManager.getSearchableInfo() on Android API 7?

I can’t find anywhere how to use the support v7 appcompat library with searchManager.getSearchableInfo(). @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); MenuItem menuItem = (MenuItem) menu.findItem(R.id.search_widget); SearchView searchView = (SearchView) MenuItemCompat.getActionView(menuItem); searchView.setSubmitButtonEnabled(true); SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); searchView.setSearchableInfo( searchManager.getSearchableInfo(getComponentName())); […]

ActionBar not scrolling to selected tab if this one is outside the visible bounds of actionBar on screen

I set up an actionbar in my application. I get back the ActionBar by calling the Activity.getActionBar(). Then I set all the Tabs I need thanks to ActionBar.addTab() and ActionBar.newTab() methods. When I am in landscape mode, all my categories are displayed on screen (i.e., user can see all available Tab). I select the last […]

Difference between ActionBarActivity and Fragment Activity

I am noob in Android. I just started to use ActionBarActivity over FragmentActivity. Is there any difference between them ??

Can I preview the Action Bar in the graphical layout editor?

I’ve noticed that all of the ApiDemos construct the Action Bar programmatically at runtime. I’d love to be able to see the Action Bar with icons and even tabs from within the graphical layout editor. Is it possible to preview the Action Bar in the layout editor, or is it necessary to build the Action […]

Android and Honeycomb – how to have a menu icon with SDK 13 without having an “action bar”

I would like to maximize use of the screen for a Honeycomb app. Since the bottom of the screen is already stuck with “always-on” items, I’d like to add a menu button down there in that space rather than sacrificing more screen space putting an “action bar” across the top. How can I accomplish this […]

how to setup ActionBarSherlock?

I would like to use the library ActionBarSherlock in one of my projects, but I get errors all over the place when I create a project as a library with sources! I followed the instructions correctly, as shown here for example: Greendroid or ActionbarSherlock – setup But I get many errors like: Error retrieving parent […]

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