开发者

Droid-fu library's WebGalleryAdapter with gallery example

Any good tutorial shows how to use Droid-fu library's WebGalleryAdapter with gallery widget ??? here you can found info about droid-fu libaray


public class ImageSwitcherGallery extends Activity{

    /** Called when the activity is first created. */

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        WebGalleryAdapter webAdapter = new WebGalleryAdapter(ImageGallery.this);

        try {
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            setContentView(R.layout.image_switcher_1);
            webAdapter.setImageUrls(loadImages());
            webAdapter.setProgressDrawable(getResources().getDrawable(R.drawable.ajax_loader));
            Gallery gallery = (Gallery)findViewById(R.id.gallery);
            gallery.setAdapter(webAdapter);
        } catch (Exception e) {
            Log.e(TAG, Util.getExceptionMsg(e));
        }

    }
    private LinkedList<String> loadImages(){
            //loading images from another static object
        LinkedList<ImageURL> urlList = ResultSetHa开发者_开发问答ndler.getImagesGalleryUrls();
        LinkedList<String> list = new LinkedList<String>();
        for(ImageURL imageUrl: urlList){
            list.add(imageUrl.getImagePath());
        }
        return list;
    }

    //Retriving loaded image urls

}

i am only using gallery thats why it is only displaying section 2, how can i switcher object with droid-fu libaray ?

alt text http://www.freeimagehosting.net/uploads/8954c5a8a9.jpg


Have a look at this now. Droid-fu is discontinued.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜