I have a checkbox in the a listview. I disabled the highlighting of listview upon pressing. Also, I disabled the focus of the listview as I have buttons in the row itself.
This worked perfect. However the problem is that the checkbox still shows Orange highlight.
Is there anyway to disable this orange highlight of the check box (whether it is through the list view or some way through the checkbox itself?
Thank you
I believe that the only way to disable the highlight of the checkbox is to create your own drawable without the on pressed xml and leave use that, but I dont think there is any checkbox xml attribute that stops highlighting.....
I cannot add comments yet, but you should be able to use the link that I provided & programatically set styles to the checkbox to hide the orange highlight, right?
Related
I wanted to achieve the same sort of functionality found in Google Now where you can tap the cards overflow icon and a menu appears next to it with options (shown here).
Does anyone know how to implement this sort thing to achieve the same style etc?
I think you can do this by placing a listview under your button, and set its visibility to invisible.
Then place an onclicklistener on your button to turn your visibility to visible.
I'm developing an Android 2.2 application with a ListView.
I want to disable this:
I have a ListView with three list items. When I press over the first list and, without releasing, I move down through second item and third item. Then, when my finger is over the third item I release it. After that I see that all of them has a black background.
How can I disable this effect?
If you need more details, please tell me.
Use this in your ListView element inside your XML file:
android:cacheColorHint="#android:color/transparent"
However, if your app has a background that is a solid color, then set the cacheColorHint to that color, as having it set to transparent can lead to slow scrolling. For example, if I had a green background:
android:cacheColorHint="#0F0"
Use
android:cacheColorHint="#00000000"
as one of the ListView attributes. This will disable the color caching, which will stop doing this black thing.
When I set CheckBox in android to checked="false" there is a greyed out checkbox and grayed checkmark that looks like it is already selected. I don't want any checkmark at all to show, and no graying of the box. Just a white box with no checkmark at all. Not even a grayed out one.
First off it may not be a good idea to customize a check box, but if you need to do it you can create a button with two separate images for on/off png. Then you set the checkbox drawable to be that button.
I use two Spinner in my App. One of them is initially disabled because I need the user to select something in the first spinner to load the content of the second one.
I would like to change the design of the second spinner to show the user that the spinner is not active, eg. grey the spinner out. How can I achieve this?
If this is not possible how would you change this dialog to make it clear to the user that she has to select something in the first spinner?
The Spinner doesn't gray out when disabled, it's a bug that we fixed in FroYo (next version of Android.)
Further to setting as disabled, I don't know any other way to grey out.
Hide the second spinner until the first has no selection.
Or until it's in disabled state, the first visible option should show text related to the required selection eg: Select a Continent first
I would like to have an EditText with one modification: on the right but still inside the EditText there should an arrow pointing downwards that I can set OnClickListener to so that when the user clicks on the arrow it displays a menu.
What is the best way to do this?
Do you mean something like this ?
see image
Add the arrow by setting the drawable right attribute
android:drawableRight="#drawable/right"
to your EditText. Then you would need to set an OnTouchListener to get the events.
I did this by putting EditText and a Button into RelativeLayout, the Button (which has custom background drawable) is overlapping the EditBox.
When user clicks on it, the EditBox doesn't receive the click event.
Sounds like a combo box. If you look at the "Building Custom Components" section of the Dev Guide, they mention combo box briefly, but give details on how to build any custom component.