Hide Up & Down Arrow Buttons (Spinner) in Input Number – Firefox 29

On Firefox 28, I’m using <input type=”number”> works great because it brings up the numerical keyboard on input fields which should only contain numbers. In Firefox 29, using number inputs displays spin buttons at the right side of the field, which looks like crap in my design. I really don’t need the buttons, because they … Read more

How to set selected item of Spinner by value, not by position?

I have a update view, where I need to preselect the value stored in database for a Spinner. I was having in mind something like this, but the Adapter has no indexOf method, so I am stuck. void setSpinner(String value) { int pos = getSpinnerField().getAdapter().indexOf(value); getSpinnerField().setSelection(pos); } 25 Answers 25

How to show loading spinner in jQuery?

In Prototype I can show a “loading…” image with this code: var myAjax = new Ajax.Request( url, {method: ‘get’, parameters: pars, onLoading: showLoad, onComplete: showResponse} ); function showLoad () { … } In jQuery, I can load a server page into an element with this: $(‘#message’).load(‘index.php?pg=ajaxFlashcard’); but how do I attach a loading spinner to … Read more

How to keep onItemSelected from firing off on a newly instantiated Spinner?

I’ve thought of some less than elegant ways to solve this, but I know I must be missing something. My onItemSelected fires off immediately without any interaction with the user, and this is undesired behavior. I wish for the UI to wait until the user selects something before it does anything. I even tried setting … Read more

How to change spinner text size and text color?

In my Android application, I am using spinner, and I have loaded data from the SQLite database into the spinner, and it’s working properly. Here is the code for that. Spinner spinner = (Spinner) this.findViewById(R.id.spinner1); List<String> list = new ArrayList<String>(); ArrayAdapter<String> dataAdapter = new ArrayAdapter<String> (this,android.R.layout.simple_spinner_item, list); cursor.moveToFirst(); list.add(“All Lists”); if (cursor.getCount() > 0) { … Read more