Tag Archives: spinner

Custom Spinner in Android Redone using BaseAdapter..

By | January 10, 2013

I have already shown another example of creating custom spinner in android in this post. That was by extending the ArrayAdapter class, Now it’s using the baseAdapter class. You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple… Read More »

How to load a spinner with values from SQlite Database in android?

By | November 18, 2012

Here is a simple example showing how to load a database values in a spinner in android. OK we will start. This is the layout for the spinner row. spinner_row.xml This is the layout for the interface. activity_main.xml Now this is the MainActivity.java file that uses the spinner and the database. Join the Forum discussion… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

How to read a folder in the assets directory and read files from it in android?

By | March 12, 2011

File reading is important in android. For the put the files in the assets folder. We can able to read foldername filename Contents of the file First we read the name of the folder. “folder_array” contains all the names of the folder Then if the path is set to Then the list of file name… Read More »

How to get a selected Item from a spinner in ANDROID?

By | February 28, 2011

We have come across this issue many times during programming to get a selected item in your combobox. ANDROID has built in functions to get the selected item from a spinner. Take a look at the snippet. Here my_spinner id the spinner variable and using getSelectedItem() which will return an object and by using toString()… Read More »

ProgressBar in ANDROID…..

By | February 28, 2011

Progress bars are our basic needs when we want to show something for a long time or some progress takes a long time and we want to show it’s progress. Keeping that in mind ANDROID also has built in progress views. There are basically two types of progress views in ANDROID. ProgressDialog.STYLE_SPINNER and ProgressDialog.STYLE_HORIZONTAL Take… Read More »

How to create custom layout for your spinner in ANDROID? or Customizable spinner

By | February 20, 2011

This code helps you to customize the spinner in ANDROID. For that you have to create an XML file inside your layout folder as shown below and name it spinner.xml. You can give all properties that are available for TextView inside this which is going to be then applied for your spinner. Now I will… Read More »

How to set an item selected in Spinner in ANDROID?

By | February 19, 2011

This code helps yoy to set an item in your combobox(spinner) in ANDROID. Here my_spinner is the combobox which we call as spinner in ANDROID. Declare it in your XML file and link to it by using the following code…. my_spinner= (Spinner)findViewById(R.id.my_spinner); After that in your code set an item Listener for the spinner using… Read More »