Droid-fu库的WebGalleryAdapter与图库示例

时间:2010-01-03 10:09:51

标签: android image-gallery droid-fu

任何好的教程都会展示如何使用Droid-fu库的WebGalleryAdapter和gallery widget ??? 在这里,您可以找到有关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 = ResultSetHandler.getImagesGalleryUrls();
        LinkedList<String> list = new LinkedList<String>();
        for(ImageURL imageUrl: urlList){
            list.add(imageUrl.getImagePath());
        }
        return list;
    }

    //Retriving loaded image urls

}

我只使用画廊,这就是为什么它只显示第2部分,我怎么能用droid-fu libaray切换对象?

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

1 个答案:

答案 0 :(得分:0)

现在看看this。 Droid-fu已停产。