android-actionbar

How to show action bar tabs on different line?

冷暖自知 提交于 2019-12-12 14:16:11
问题 I am using ActionBarTabs to implement 3 tabs in an activity. The tabs display properly in portrait mode below the action bar When I switch to landscape mode, the tabs are placed at the same line with actionbar. How can I force the tabs to display individually in landscape mode ( below the action bar )? my code is protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tabhost_act); /* Action Bar Color change on create*/ ActionBar

How to disable flipping of the “up” button on the action bar?

三世轮回 提交于 2019-12-12 14:14:53
问题 Background I've made an "app manager" alternative app, and I wish to add translation for RTL (right to left) languages. Since I know that as of certain Android version, things got flipped to let words and sentences align correctly, I decided to first switch to such a language and then continue with the translation The problem After switching to an RTL language (Hebrew in my case), I've found out that the action bar's up button has the "<" image flipped horizontally: So now it shows ">"

Menu collapsing when using ActionBar tabs for navigation

独自空忆成欢 提交于 2019-12-12 12:32:25
问题 I have used ActionBar from the support library to build my application a tabbed navigation bar. I have two tabs in my application. Both of these Fragments have menus and they have one menu item and I'd like to show it as an action in the action bar, but for some reason the overflow icon is shown instead of the icons assigned to these items. They are shown as text under the dropdown menu. My XML looks the following. <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas

ActionBar and sliding out menu in android

99封情书 提交于 2019-12-12 12:25:25
问题 I just want to create an action bar as foursquare app. and i want to show a slide out menu when the home button pressed just like the image shown. I am able to create the custom action bar but not like the first image. Please provide any tutorial which will help to create the Action bar 回答1: You may use the version included in the Google Android SDK (instead of an 3rd party lib.) Read about Navigation Drawer for more details. 回答2: SlidingMenu is a great and easy-to-use library for this. edit:

onActivityResult is not called when the back button in ActionBar is clicked

大憨熊 提交于 2019-12-12 12:17:08
问题 Here is my problem: Create a MainActivity. Add a button which will start another activity SecondActivity. Intent i = new Intent(getActivity(),SecondActivity.class); startActivityForResult(i,0); Inside the SecondActivity, I capture the back button click event and also add a button to return to the first Activity. When back button in action bar is clicked: @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: // back button Intent

Action Bar Drawer Toggle Custom Icon

不羁岁月 提交于 2019-12-12 11:48:49
问题 I'm trying to use the action bar drawer toggle, but I would like it to display something more than just the menu icon. I want it to display a notification count in the top right corner of my custom menu icon, but I still want the action bar drawer toggle to display the back arrow when needed. Therefore, I first tried to see if I could display a custom layout (containing an imageview for my menu icon and a textview for my notification count) on the action bar drawer toggle but whithout success

How to change the Action bar text and background properties?

别来无恙 提交于 2019-12-12 11:23:40
问题 Here is my style for the action bar. I would like to change the text and background properties. But the changes are not being applied to the app. Where am I making mistake? This is my style.xml <style name="AppTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionBarStyle">@style/MyActionBar</item> </style> <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar"> <item name="android:windowBackground">@color/white</item> <item name="android:background

Changing The Style Of Actionbar Overflow

被刻印的时光 ゝ 提交于 2019-12-12 11:12:06
问题 I am using Theme.Holo in My Current android app. Above is the overflow UI from my current theme. I want to customize overflow menu's background color to RGB (245, 243, 239), and the font color to RGB (64, 64, 64). Following is the style.xml I am using <style name="CustomActivityTheme" parent="@android:style/Theme.Holo"> <item name="android:actionBarStyle">@style/CustomActivityTheme.ActionBar</item> <item name="android:actionMenuTextColor">#000000</item> <item name="android:divider">@drawable

Setting a custom share icon on Actionbar ShareActionProvider without ActionBarSherlock

一世执手 提交于 2019-12-12 10:55:18
问题 I have the same problem as was described here - Setting a custom share icon on Actionbar ShareActionProvider But I'am not using ActionBarSherlock I found that the Sherlock theme uses the " actionModeShareDrawable " and I can also use it like this, if I don't use ActionBarSherlock <style name="Theme.MyApp" parent="android:Theme.Holo"> <item name="*android:actionModeShareDrawable">@drawable/icon</item> </style> This works fine on my nexus 5, but failed on many other devices So my question is,

Contextual Action Bar in Honeycomb

蹲街弑〆低调 提交于 2019-12-12 10:48:36
问题 I'd like to change my Action Bar buttons in code according to whatever is selected on screen. This is kind of like the Honeycomb Gmail app, where you can check a few mail items and get a different Action Bar with a different look too. Any idea how I can do this? 回答1: To obtain an action bar item, use the getActionBar() method within an activity. Once you have the ActionBar item, you can add and remove tabs using methods from within the ActionBar class. The setCustomView() and