• Custom_Spinner_With_Image_And_Text_-_Android_Example

    Custom Spinner With Image And Text - Android Example  Custom Spinner With Image And Text - Android Example

    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.

    Read More
  • Upload_File_To_Server_-_Android_Example

    Upload File To Server - Android Example  Upload File To Server - Android Example

    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.

    Read More