android-actionbar

Reset action bar after using SearchView

戏子无情 提交于 2019-12-06 19:14:27
问题 I'm using SearchView widget to enable searching in my app. After the initial click on the search icon, the SearchView widget expands into the search field and the "back" arrow is shown next to the application icon. If I click the application icon the action bar reverts to the initial state (no "back" arrow) and the SearchView reverts back to icon. Now the problem: after the search is executed the action bar doesn't change, the only way to revert is to click the application icon or phone's

ActionBarSherlock hardkey menu panel text color

白昼怎懂夜的黑 提交于 2019-12-06 19:08:06
问题 I have a small question about theming my app that uses ActionBarSherlock. Everything works fine except on Samsung phones with TouchWizz . The overflow menu items appear by pressing the hardware menu key. I know how to change the panel background. My default theme extends Theme.Sherlock.Light.DarkActionBar , so the default menu item text color in the hardware panel will be black , I wan't to change this. Any ideas on how to do this besides changing the parent of my default theme? <style name=

AppCompat ShareActionProvider icon is too big compared to other icons

最后都变了- 提交于 2019-12-06 18:24:40
问题 I changed the ActionBarSherlock to AppCompat v7. I already did all the changes that are needed to make it work, but something weird is happening with share icon (which is using ShareActionProvider). The share icon is too big compared to other icons. I also use the support library for my search, and its size is correct. The problem is just with the share icon. my_menu.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:moblee="http://schemas.android.com/apk/res-auto" >

Is it possible to use dropdown AND tabs as navigation in the action bar?

半腔热情 提交于 2019-12-06 16:58:32
问题 Is it possible to have both, an spinner/dropdown at the top and tabs just below in the action bar? I want to use the spinner at the top of the action bar as view-switch controller (i.e. table view or chart view) while the tabs below is going to show different lists of data. The following screen shot illustrates exactly what I want to achieve: If it's not possible having both modes in the action bar, I could put an TabWidget at the top of my content view. However, I'm little bit unsure if I

How to make ActionBar and stacked bar share same background image

大憨熊 提交于 2019-12-06 16:54:35
is it possible for actionbar and it's stacked bar(one that contain navigation tabs) to share same background image? one that starts from actionbar and ends at stacked bar? currently the way am implementing this, am ending up having action bar with it own image and stacked bar with its own. my styles.xml <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="android:actionBarStyle">@style/MyActionBar</item> <item name="android:actionMenuTextColor">@color/app_yellow</item> <item name="android:windowActionBarOverlay">true</item> <!--

How to add volume slider to android action bar?

前提是你 提交于 2019-12-06 16:48:47
I want to add volume to action bar. When user clicks on that action it should place slider inside action bar for selecting right volume How would i do that The easiest way to handle this is to use ActionBar.setCustomView . Here's an example that controls the media volume: First, you'll need to create the custom layout that contains your SeekBar . <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <SeekBar android:id="@android:id/progress" android:layout_width="match_parent" android:layout_height=

Share ActionBar between different activities

我与影子孤独终老i 提交于 2019-12-06 16:41:26
I have an application with an FragmentActivity called MainActivity which holds two fragments, one menu fragment to the left and one content fragment to the right. On a large device both of these fragments are shown. On a small device only the menu fragment is shown and when the user presses an item in said menu the content fragment is displayed in a new Activity . Lets say the user is currently using the application on his phone and only the menu is visible: The ActionBar of MainActivity can be manipulated by user choices in the menu. When the user selects a specific menu item, a new Activity

Action Bar icon not showing in android action bar

痴心易碎 提交于 2019-12-06 16:38:32
I have implemented Navigation drawer in my application in the main activity. I want to add a home button to the title bar of my app, in addition to the navigation drawer. I want this home button to be placed on the top right side of the title bar of my app. I have done several methods, but still the action bar icon is not showing in the title bar. Instead, an overflow button is shown at the top right portion of the action bar / title bar. When the overflow button is clicked, the home button is shown as text without the icon. I have tested this on Moto X which has a 4.7 inch screen, and so I'm

doesn't call onMenuItemClick for first time - SherlockListActivity

北战南征 提交于 2019-12-06 16:08:46
问题 I use SherlockListActivity, I created ActionBar with one item & its clickListener when i click on it for first time after creating activity, doesn't call onMenuItemClick, but in every click after first click, work with no problem Why ? private void BuildTopActionBar() { BitmapDrawable bg = (BitmapDrawable) getResources().getDrawable( R.drawable.ic_action_bg); bg.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT); getSupportActionBar().setBackgroundDrawable(bg); this.getSupportActionBar()

Action Bar in API Level > 3.0 but Still Support API < 3.0

*爱你&永不变心* 提交于 2019-12-06 16:03:44
Yet another compatibility question. THE PROBLEM I need to use a tabbed action bar in api level 3.0 and greater to switch between fragments . However, I also need to be able to switch between these fragments somehow in api level < 3.0. The spanner in the works is the fact that I have already downloaded a custom compatibility library that allows me to use google maps with fragments and therefore I can't use a library. THE QUESTION How can I implement a tabbed ActionBar solution in 3.0 and greater and also cater for the bigger market that is 3.0 and less? Any help would be grand. What you want is