Spinner pop up window title background - android

I would like to modify the background of the title bar of the dropdown dialog associated to a spinner.
If this is not possible I would like to know what resource is used to draw this background android.R.drawable.* ?
This is an effort of uniformity for my various pop ups in my application.

You can change everything using styles and themes.
Take a look at this example for buttons:
http://blog.androgames.net/40/custom-button-style-and-theme/

Related

Android Action Bar Drop Down Background Styling

I have an action bar that has a specific theme to it(some sort of color) that I want to apply to all activities/fragments that looks something like the attached picture.
Then once I click the dropdown, I'd like the dropdown background to be a different color. How would I go about styling that background.
Right now this is theme I have
<item name="toolbarTheme">#style/ThemeOverlay.AppCompat.Dark.ActionBar.WhiteDropDown</item>
Once I click the dropdown menu, the background of the dropdown appears to be black. What should I do to change that?
I've tried creating a subclass of #style/ThemeOverlay.AppCompat.Light and change the entire toolbarTheme to that style. But at the same time, the actionBar texts now all appear in black since its style is Light, and to contrast that, the texts will be black in default. Therefore, I'm wondering if there's any other attribute I can modify just to change the background of the dropdown menu.
I've tried, actionMenuTextColor, actionBarPopupTheme, spinnerDownItemStyle, actionBarItemBackground, actionDropDownStyle, and everything I can think of. Someone please help out!
Thanks!

Set color of ShareActionProvider

I defined a color for my whole app (a dark grey) and so when I click on the ShareActionProvider, a black list shows up but the text color is dark grey too (and so not really visible). The text in the ActionBar is white, but not the one in the list.
Is there any way I can set a different color (some item in styles.xml ?)
Thanks
Best way to customize shareActionProvider is create separate menu specifically for Sharing. See this link https://stackoverflow.com/a/22192759/1237175

Customize the Search Dialog

I'm trying to add consistent selectors to my application. Similar to the drawable/list_selector. I can do this for all list elements and buttons in my application. But when it comes to system tasks such as the menu and the search, I can't find a way to style these. I have read the hack to style the menu, so this question is geared more towards the search dialog.
My Goal:
I want to style the Search Dialog that appears when the search button is pressed. Specifically I would like to change the outline color of the text box and also change the color of the text box when it is in a pressed state.
Any ideas would help.
Haven't tried any code, my thought was to add styles the searchable.xml file but I feel it doesn't work like that.

Make activity match current system dialog?

I'd like to be able to create an Activity that matches a default system Dialog. So in Android 2.2, it'll look like a Dialog for that version, in 2.3 it'll look like a Dialog for 2.3, etc.
The usual answer starts off with set android:theme="#android:style/Theme.Dialog" in the Activity manifest. However, that just gives you a floating box with unstyled text. What's missing is a title over a title bar, the dialog text, and the dialog buttons---all styled to match a system Dialog. What system styles should I use?
For example, I found TextAppearance_DialogWindowTitle in R.style. This gives you the text size for the title. Still missing is styling the title background, the buttons, etc.. Any ideas? Android style and theme documentation is sorely lacking.
I would just use the dialog builder except that I need to use a custom icon, so I would be back to square one styling a custom dialog....

Android menu item background

I want to change the menu item background beacuse I use black icons, but on some phones the default color of background is black or other dark color. I tried this solution and it's worked but there was a little problen with it:
I have ten items and that's why I have a "More" item to show other options, but if I choose the More item (which is got the custom background) and after that I press back button, the item will be in the default state, default colors. What is the solution? Thanks!
The style attribute for the menu background is android:panelFullBackground. It's not hackish like the other solution, so it's not as buggy.
Despite what the documentation says, it needs to be a resource (e.g. #android:color/black or #drawable/my_drawable), it will crash if you use a color value directly.
try to use android own menu icon like as setIcon(android.R.drawable.ic_menu_search)

Categories

Resources