How to load dynamic contents to slider drawer in android? -


hi had created android app contains slider drawer.i want add dynamic contents slider drawer(load image,text server etc )when app runs .is possible?? please me , :)

i have written demo on github.in demo,the navigationdrawerfragment file slider drawer ,the main list in drawer come code spinnet :

mdrawerlistview.setadapter(new arrayadapter<string>(             getactionbar().getthemedcontext(),             android.r.layout.simple_list_item_1,             android.r.id.text1,             new string[]{                     getstring(r.string.title_section1),                     getstring(r.string.title_section2),                     getstring(r.string.title_section3),             })); 

so replace data load function , load dynamic contents in file.:

public void loaddynamicdata(){    //1. show progress bar when data not ready.    //2. use asynctask load data in background.    //3. when data ready,replace progress bar data.  } 

if want add actionbar-pulltorefresh library, can add this drawer.it's easy. , if want load image logo (such user's avatar),you use picasso.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -