• Download_Images_From_Web_And_Lazy_Load_In_ListView_-_Android_Example

    Download Images From Web And Lazy Load In ListView - Android Example  Download Images From Web And Lazy Load In ListView - Android Example

    In this example downloading images from web to a listview. Using lazy loading to download images in a listview. Using custom adapter to create lisview rows and using ImageLoader class to lazy load images from web and show in listview row. Click on listview showing image url in alert.

     

    Steps :

        MainActivity.java : Initialize static image url in string array and create listview.
        LazyImageLoadAdapter.java : Used to create each list row. Inflate tabitem.xml file for each row and call ImageLoader.java to download image from url and resize downloaded image cache on sdcard.
        ImageLoader.java : Used to download image from url and resize downloaded image and make file cache on sdcard. Lazy load images for listview rows.
        FileCache.java : Used to create folder at sdcard and create map to store downloaded image information.
        MemoryCache.java : Used to set cache folder size limit ( How much mb/kb downloaded image cache folder will store ) and also used to clear cache files from sdcard.
        Utils.java : Used to Create Cache image for images downloaded from web.

     

    Read More
  • Custom_Expandable_ListView_Tutorial_-_Android_Example

    Custom Expandable ListView Tutorial - Android Example  Custom Expandable ListView Tutorial - Android Example

    In this example creating a custom Expandable ListView with parent and child rows. parent rows contains texts,images and a checkbox. child rows contains texts,images. Creating custom adapter to create Expandable ListView rows .

     

    Steps :

    1.   Create Model classes for parent rows(Parent.java) and for child rows(Child.java). These classes will use to store parent rows and child rows data.
    2.   Create xml files for parent rows(grouprow.xml) and for child rows(childrow.xml). These classes will use to create GUI for parent rows and child rows.
    3.   Create dummy data in parent and child model objects and Store objects in an ArrayList.
    4.   Create custom Adapter MyExpandableListAdapter class and inflate grouprow.xml file for parent rows() and childrow.xml for child rows. Use Models Parent.java and Child.java to create data for rows.

     

    Read More