In this example creating time picker. time picker is used for selecting the time of day, in either 24 hour or AM/PM mode. The hour, each minute digit, and AM/PM (if applicable) can be conrolled by vertical spinners.
In this Example creating custom spinner with one image and two texts.
After spinner item selection showing selected item text on screen.
Steps :
1. Create Model (SpinnerModel.java) to store data for each spinner row. 2. Create a ArrayList to store Model (SpinnerModel.java) objects. 3. Store data in Models and Store Model objects in Arraylist. 4. Pass Model object Arraylist to custom adapter. 5. Custom Adapter use Arraylist data (Model Objects) and create rows for Spinner. 6. Create listener for Spinner and show spinner item selected values on activity.
In this example uploading an image from sdcard to web server.
Steps :
1. place an image on sdcard. 2. place sdcard image path and image name in UploadToServer.java. ( see below ) 3. create a php script (UploadToServer.php) at server. ( see below ) 4. place php script path in UploadToServer.java. ( see below ) 5. create folder name uploads on server where you have placed php script. 6. give permission 777 (read/write/execute) to uploads folder.
In This example creating checkbox and listener to listen checkbox click and show selected checkbox value.
Create a CheckBox in your layout. Checkbox options allows the user to select multiple items, each checkbox is managed separately and you must register a click listener for each one.
In this example showing Radio buttons with a radio group and determining which radio button is selected.
Radio buttons are normally used together in a RadioGroup. When several radio buttons live inside a radio group, checking one radio button unchecks all the others.