android-actionbar

Navigation Drawer Using Appcompat v7 - Issues with ?android:attr Tag

我只是一个虾纸丫 提交于 2019-12-23 09:19:39
问题 I am using an actionbar and navigation drawer in my project. Using appcompat v7 and v4. I have added the appcompat v7 WITH resources. The following is my textview for the navigation drawer list taken straight from the android sample app found at Creating a Navigation Drawer The bottom three lines all cause my application to fail, it builds okay, but I get a force close and I am not sure how to solve the problem. I don't understand why the attributes are not being found, considering I added

Action-bar — sub menu item with text and image not working properly

倾然丶 夕夏残阳落幕 提交于 2019-12-23 09:05:50
问题 I am developing small Android application in which I am using action bar with some menu items. One menu item contains sub menu. Now what I want to do is to display menu item with text and icon always. I define menu items in following manner. <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/card_menu" android:icon="@drawable/abc" android:showAsAction="withText|always" android:title="cards"> <menu> <item android:id="@+id/C1" android:title="C1"/> <item

How to change the background color of the overflow menu in android

醉酒当歌 提交于 2019-12-23 08:45:28
问题 I want to change the background color of the overflow popup menu to match the background of the main screen. Does anyone know how I could do that? Thanks. 回答1: If you are using a Toolbar, first you need to add this line to your toolbar layout: app:popupTheme="@style/ThemeOverlay.MyTheme" It should look like this: <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android

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

∥☆過路亽.° 提交于 2019-12-23 08:05:07
问题 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 without downgrading to API 10 or less? (As much as I don't need an action bar using up more space, I also don't need a resize button that does my app no good at all and can't be disabled except by

Show tab bar and listIn Actionbar at same time. (Android Honeycomb)

大城市里の小女人 提交于 2019-12-23 07:03:20
问题 There is a situation in which I want to use Tab bar as well as List navigation, Both at same time in Action bar. Documentation says 'we can put Actionbar in to list navigation mode or tabs navigation mode'. Is there any way to use both at same time. Any pointers, help. Thank you in Advance. 回答1: Sorry, you can only have one or the other. That being said, you can use android:actionLayout to convert an options menu item into a custom inflated layout in the action bar. You might be able to use

Overlaying the Action Bar not working

自闭症网瘾萝莉.ら 提交于 2019-12-23 06:56:35
问题 I was following official developer's guide to overlay actionbar. my style.xml is as following: <!-- Base application theme. --> <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> </style> <style name="AppTheme" parent="AppBaseTheme"> <item name="actionBarStyle">@style/CustomActionBarTheme</item> </style> <style name="CustomActionBarTheme" parent="@android:style/Theme.Holo"> <item name="android:windowActionBarOverlay">true</item> <

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8?

烈酒焚心 提交于 2019-12-23 04:35:40
问题 Have researched this to death and just cannot find the answer. I have an ActionBar using AppCompat. I am supporting up to API v7 (API v8 would do). ActionBar works perfectly from API v11. API < v11 has the problem of removing an icon (and thus a feature) from the ActionBar without supplying an Overflow. The big picture is that I have an App Logo, an App Title, and 3 Icons all squidging into the same ActionBar on a low end phone. Trying to make some room! I would be happy with 1 of 2 solutions

How to make spinner like actionbar in native android

筅森魡賤 提交于 2019-12-23 04:05:49
问题 After using Actionbar i thought that what if same widget could be available for native android platform. I dont know if we can grab the styles and apply it to native widgets from actionbar apis(compatibility library v4) or not. What i am asking is spinner widget like below which is mostly used in actionbar. Check for dropdown widget. Is it possible to use the same in native like in Listview ? Many thanks. 回答1: adapter = new ArrayAdapter<CharSequence>(this,android.R.layout.simple_spinner_item,

Reselecting Spinner item in ActionBar

不问归期 提交于 2019-12-23 04:02:20
问题 Currently I'm developing an Android application and we are using the action bar with a spinner navigation for a specific view. The main problem is: The user should be able to reselect an action bar spinner item, after he already selected this item. Android seems to prevent a second selection of an action bar spinner item. Is there a way to be able to select an item more than once or is there a completely other way to achieve this behavior? 回答1: Ok, now after many attempts I found a working

Spinner in ActionBar doesn't appear

夙愿已清 提交于 2019-12-23 02:53:39
问题 I've implemeted spinner like here . And now I want to place spinner in ActionBar (setting spinner as CustomView to actionBar) but it doesn't appear there :( Spinner spinner = (Spinner) findViewById(R.id.planets_spinner); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.planets_array, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); actionBar.setCustomView