Android :: Changing The Menu Selector?
Aug 13, 2010Is it possible to change the selector of standard Menu?
View 5 RepliesIs it possible to change the selector of standard Menu?
View 5 RepliesI just got an Android running 2.3.5 and I really don't like the blue in the settings menus. Is there a way to get the colors back to gray scale? Also, is there a way to make all menus/submenus alphabetized? I don't know why they aren't.
View 4 Replies View RelatedIs it possible to change the colour of the menu bar to dark instead of the silver it currently is?
View 2 Replies View RelatedI'm running a Galaxy Nexus, and the ROM I'm currently on has a performance option in the Settings Menu, which gives control of the kernel and stuff. However, I'd rather use TricksterMod, and I would like to be able to launch TricksterMod from Settings instead of the Performance app.
So far, I've decompiled my Settings.apk, and looked through the files, and I'm not sure what to change.
I have to change settings esxmlsettings_headers.xml, correct? Specifically,
Code:
header android:icon="@drawable/ic_settings_performance" android:id="@id/performance_settings" android:title="@string/performance_settings_title" android:fragment="com.android.settings.performance.PerformanceSettings" />
I would also have to change settings esvaluesstrings.xml, specifically, the string referenced by "@string/performance_settings_title" so that I can have the correct name, correct?
And similarly, settings esdrawable, for the icon.
The big question is, what do I replace with for "com.android.settings.performance.PerformanceSetti ngs"? Do I need to move TricksterMod somewhere specific, or what would I reference? dataappcom.bigeyes0x0.trickstermod-1.apk?
After making all these changes, I'd simply recompile and push the Settings.apk back without signing, correct? Have I missed any steps?
selector is not working.
CODE:.....................
I have an image selector that has the "pressed" state set to a particular drawable. I want to give the user the opportunity to change this on the fly. However, I have found no way to programmatically get and modify a selector.
View 1 Replies View RelatedI have created a ListView and applied a selector to it as follows
CODE:..............
When focussed or pressed, the background of the ListView item comes as specified in the selector. But the default background is never applied, can you tell me what is wrong?
By the way, this is the customised row xml I've used:
CODE:...................
I would like to create an xml selector of styles.
Basically i would do something like that:
CODE:.................
I am trying to setup a selector drawable in my asset file like this: * 2 different images for 'on'/'off' mode in rest mode (i.e. it does not has focus) * another 2 different images for 'on'/'off' mode in focus mode (i.e. it has the focus). In my case, the rest mode works, but the 'focus' mode does not. Can you please tell me what am I missing in the focus mode? Code...
View 4 Replies View RelatedI'm try to create selector to CheckBox and replace the android:button with the selector.In the selector i had two 9patch image , but for some reason that not work good.the 9patch images are ok.This the selector code...
View 1 Replies View RelatedHow to change the TabBackground in the different states (not the icon!) ?
my files:
CODE:....
Where should i call the xml file above?
I tried it in the TabWidget as src, but it doesn't work:
CODE:..............
So i tried to use a own theme:
CODE:..........
But i don't know, which resource i should use instead of "?"...
I have 2 questions regarding a ListView in Android:
How can I get the color of the listview's focused row ? I tried to use the ListView.getSelector() method, which according to its documentation should give me what I'm looking for, but it's giving me a Drawable object which I don't know how to retrieve the color from (if possible...).
How can I set the color of the listview's focused row ? Here I tried to use the setSelector() method on the listview, passing it a ColorDrawable object, but the result of doing it is that the whole background of the list view is painted in that color... and this is not what I wanted of course...
When using the "selector" to specify different images for buttons for different states, such as pressed, focused etc, do I have to write an xml file for each button? I have about 15-20 buttons in my app, so was wondering if there is a way to write just one xml and refer to parts of it?
View 2 Replies View RelatedI'm looking for suggestions on how to go about adding a ListView selector that is 'permanent'. By this, I mean a single row in the ListView is always highlighted; it should move up or down in reponse to any D-pad presses (i.e. like the default selector) but also remain set/highlighted if the user were to scroll the ListView in either direction (i.e. it's still highlighted even when it's off-screen).
I've looked at using the standard selector mechanism, but am unable to get the selector to remain in place if the ListView is touched (and thus scrolled), so it makes me think that this isn't the best option? Perhaps there's a <selector> "state_*" that I've ignored?
The other option would be to use the onItemSelected() callback, but at first look this appears more convoluted?
Any suggestions/recommendations/experiences gratefully received.
I used an iPod touch today and noticed the glass sphere that magnifies the area where you are trying to put the cursor... Is there a similar app for android as its really useful, especially on my milestone which doesnt have a trackball...
View 9 Replies View RelatedI wanted to design a customized text selector that changed the text color when user clicks the TextView. But got the following error:
Code...
I occur a problem when develop a application on android.There have two image which can be download from server in a list item, it will show one image and will show another image when user select or click this item.if I try to download another image from server when user click it,the user will never have time to see it, for this time is shorter than download image form server,so i want to download two of them,and when I click it again,the app can invoke another image from local.but I do not know how to invoke this image?
View 1 Replies View Relatedwhat I would find really usefull is a voicemail greeting selector that would allow you to record different greetings for different situations, personal, business etc. Record and then title the message which then becomes selectable from a menu. Ideally linked to a button or shortcut of some kind.
For example if I am out of the office I redirect all calls to my mobile, if I am unavailable my personal greeting is used via my network provider. Not very professional and to change this every time would be impracticle.
I have a listview with a custom item_row.xml. I've defined a selector in this way:
CODE:................
And then put into item_row.xml in this way:
CODE:...................
I want 2 things:
When i move with arrow keys, the item selected changed its background. It's works fine with the actual implementation of selector.
When i press a item, the item changed its background too, but it doesn't work with the actual selector.
I try to set also into the ListView android:listSelector="@drawable/list_selector" but it doesn't work neither.
I am having trouble getting a selector to work inside a button on an app widget.
My app widget xml looks like this:
CODE:......
My_selector.xml in my drawable directory looks like this:
CODE:.............
The button doesn't change appearance....
I am trying to make ImageButton for state of pressed, focused and normal.
I've read introduction of ImageButton from this: http://developer.android.com/reference/android/widget/ImageButton.html
I've saved selector XML file in /res/drawable/. Also set the android:src="@drawable/my_selector".
my_selector.xml file :
CODE:................
I think I've done correct ImageButton. But it didn't work for me.
I'm attempting to change the background color of an Android TextView widget when the user touches it. I've created a selector for that purpose, which is stored in res/color/selector.xml and roughly looks like that:
CODE:................
The clickable attribute of the TextView is "true", in case that's of interest.
When I assign this selector to a TextView as android:background="@color/selector",
I'm getting the following exception at runtime: ERROR/AndroidRuntime(13130): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #6: <item> tag requires a 'drawable' attribute or child tag defining a drawable
When I change the attribute to drawable, it works, but the result is looking completely wrong because the IDs appear to be interpreted as image references instead of color references (as the "drawable" suggests).
What confuses me is that I can set a color reference, e.g. "@color/black", as the background attribute directly. This is working as expected. Using selectors doesn't work.
I can also use the selector as the textColor without problems.
What's the correct way to apply a background-color-selector to a TextView in Android?
I am trying to style my ListView with two 9-patch background images (16px * 9px), one dark image for default state and another green image for selected and pressed state.
It works except for just one problem that when I select or press one list item, it seems that the selected item overlap the next one a little bit as I can see some pixels of the green background image is on the top of next item.
Trying to get an Android ListView to do what I want.
I want to have a ListView in single choice mode with a custom row layout that has a different background color for selected, pressed and checked (i.e. the choice is shown by a color rather than a check mark - this is what I would normally call the "selection" but selection in android seems line I'm about to choose before I press it)
I thought of trying a background selector with the three states in it. It works fine for state_selected and state_pressed, but not state_checked. So I created a CheckableRelativeLayout that extends RelativeLayout and implements Checkable and used for the view of each row.
A simplified version is shown here:
CODE:.....
bkg_selector looks like
CODE:..............
The colors are defined elsewhere.
This still didn't work. So in the custom ListAdapter I tracked the "checked" row and tried (in getView) if( position == checkedPosition ) ret.getBackground().setState(CHECKED_STATE_SET);
And it STILL doesn't work. How can I get it to do what I want?
I just tried this example. I saved that code in res/color/hover.xml but I always get this error message and Eclipse won't compile my project with this xml.
CODE:...............
Error parsing XML: not well-formed (invalid token) hover.xml /MmAndroid/res/color line 8 Android AAPT Problem
The only thing I might not have done is following. I don't know how to do that: compiled resource datatype: Resource pointer to a ColorStateList.
I have a ListView. When I click on a ListItem, I set the background of the ListItem (it's view) to another color:
CODE:........
Here is my adapter:
CODE:......
The problem is, if I select multiple rows, then multiple rows have a colored background. I only want the clicked item to have a colored background. So if I click on row 2, I want it to turn red, then if I click row 1, I want row 2 to go back to normal, and row 1 to turn red.
I am having a gridview. when i select it, the selector(orange color) will shows like square. i want to set that as rounded corners. how to do that?
View 1 Replies View Relatedstandard four option menus displays 2 by 2. but i want to know that How to arrange 4 by 1. I just want to custom option menu like that. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options
View 2 Replies View RelatedI want a user to be able to long press a contact and be offered a menu item of my own that can run an activity of my own. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options
View 3 Replies View RelatedI want custom option menu to arrange three menu items where 2 menu items are displayed at the top and the third below it. Just as the following layout...........
View 12 Replies View Related