Droid-fu 库的 WebGalleryAdapter 与画廊示例

发布于 08-16 19:46 字数 1663 浏览 7 评论 0原文

任何好的教程都展示了如何将 Droid-fu 库的 WebGalleryAdapter 与图库小部件一起使用??? 在这里您可以找到有关 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 切换对象?

替代文本 http://www.freeimagehosting.net/uploads/8954c5a8a9.jpg

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 = ResultSetHandler.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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫九2024-08-23 19:46:48

现在就看看这个
Droid-fu 已停产。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文