selector

Text Picker Component

Does something exist for Android? I am looking for something equivalent to HTML's tag. I see things like NumberPicker, but I can't see any way to have a basic drop down selector. I am aware of ListPreference, but I want to use it outside the context of a PreferenceActivity and inside arbitrary views. Anyone? ...

ListView selector problem: Selection does not get removed

I have a ListView. When I click on a ListItem, I set the background of the ListItem (it's view) to another color: listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> a, View v, int position, long id) { setupDetailView(position)...

Problem with selector for a ListView in Android.

Hi, I have created a ListView and applied a selector to it as follows <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:state_pressed="true" android:drawable="@drawable/my_btn_pressed" /> <item android:state_focused="true" android:drawable="@drawable/my_btn_focussed" /> <item andro...

Problem setting ListView selector color when pressed

I have the following ListView, and have followed the answer from this SO Question w/ no luck: http://stackoverflow.com/questions/2038040/android-listview-selector-color <ListView android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" and...

Selector for Buttons not working after setting backgroundResource of the button in Android

Hi, I have applied the follwoing selector to all my buttons by specifying it in my theme: <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:drawable="@drawable/my_btn_pressed" android:state_pressed="true" /> <item android:drawable="@drawable/my_btn_focussed" android:state_focused="true" /> ...

How to modify the default button state in Android without affecting the pressed and selected states?

I am trying to remove an ImageButton's background in only the default state. I'd like the pressed and selected states to behave as usual so that they look correct on different devices, which use different colors for the pressed and selected states. Is there any way to set an ImageButton's background default state's drawable without affe...

How to change specific text of mutiple classes

Hi there, I'm cloning a fieldset and incrementing the attribute names as a new clone is created. However I want the same to happen if I delete I clone so that any cloned fieldset after the deleted will fill in the gaps. As in, if the 2nd clone is deleted, the 3rd with be renamed as the 2nd etc. I'm trying to change a the classes and ID...

Jquery: Get next element from an element

How can I get the target from the with td rowspan=4 Not sure about: $("#fromTd").parent("tr").next().eq($("#fromTd").attr("rowspan")-1) <table> <tr>...</tr> <tr>...</tr> <tr><td id="fromTd" rowspan="4"></td></tr> <tr>...</tr> <tr>...</tr> <tr>...</tr> <tr>...</tr> -> target (can be aleatory position..) </table>...

jQuery Selector: How to select the children of just THIS element.

So, I have code that looks like this: <span class="comic_menu mid_menu_title"> <ul> <li class="level-0 page_item page-item-264"><a href="http://www.domain.com.php5-15.dfw1-1.websitetestlink.com/wordpress/?page_id=264" title="Ca$h Rulez">Ca$h Rulez</a> <ul class='children'> <li class="level-1 page_item pag...

jQuery - How to match an element has attribute a or attribute b

How to write a jquery selector to match an element has attribute a or attribute b. It must match three elements below <a a="123" b="345"></a> <a a="123"></a> <a b="345"></a> ...

How to associate a method with this button?

I have a navigation bar button that displays both image and text. This is the code: UIImage *saveImage = [UIImage imageNamed:@"star.png"]; UIButton *saveButton = [UIButton buttonWithType:UIButtonTypeCustom]; [saveButton setBackgroundImage:saveImage forState:UIControlStateNormal]; [saveButton setTitle:@"Save" forState:UIControlStateNor...

jquery selector before-last

I have a dynamic list and need to select the before last item. <ul class="album"> <li id='li-1'></li> <!-- ... --> <li id='li-8'></li> <li id='li-9'></li> <li class='drop-placeholder'>drag your favorites here</li> </ul> var lastLiId = $(".album li:last").attr("id"); // minus one? ...

what does this jquery selector means

what does this jquery selector means $("*[regex]") I want to select all controls which have an attribute regex. ...

jQuery: Get Child object with specific ID

Hi there, First some HTML: <div id="tmcl-request" class="tmcl-request" style="display: none"> Request: <b> Node: </b><span id="node">33947</span> </div> Than some JavaScript: $request = $('#tmcl-request'); $newrequest = $request.clone(); And now the question: I want to change the inner HTML of the <span id="node"> from the $newreq...

I cannot select <title> tag in Atom XML using jQuery.

I get a Google Picasa web albums' atom data through Ajax using jQuery. This atom data looks like this: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#ListAlbums When I write $(xhr).find('entry id').eq(0).html(); it is OK. But $(xhr).find('entry title').eq(0).html(); does not select The <title> ta...

jQuery: Parent or Sibling? And how to 'instruct' a sibling search?

I have a list that looks like this: <li class = "current_parent level-0"> <a> Parent Link </a> <ul class= "children"> <li class = "level-1"> <a> Link to child </a> </li> <li class = "level-1 current_page_item"> <a> Link to child </a> </li> <li class = "level-1"> <a> Link to ...

How do I set the text() of a parent of a parent of an element in jQuery?

I'm building a custom pulldown menu in jQuery. Now I'd like to set the text of the A.select element to the text of the element that is clicked. But I can't get it to work. This is the html: <div class="pulldown"> <a href="javascript:;" class="select">All cats/subs</a> <div class="options"> <a href="javascript:;">Option one...

> jQuery Child Selector without a parent allowed?

Quick question, is a jQuery child selector without a parent ever valid? If so, how would you use it? Example of the jQuery child selector: $('ul > li') Example of jQuery child selector without parent: $('> li') The second example above doesn't work. However I can't remember if I saw it in the past before or I've seen something adv...

jQuery selector: defining array index

hi, i'm having several tables in my html markup which dont have any attributes and i'm wondering: is it possible to define a jquery selector which directly picks eg. the 3rd table? thx ...

Using the CSS3 :not selector with IE - using Prototype

I need to add a CSS style to a content <div>, which is present on all pages of my site. However, I do not want to use the new style on the homepage. All the pages on the site have a similar structure: a header <div> with navigation bar, followed by a content <div> with the page's contents. Best I could think of is to add a wrapper div ...