質問

I want to a galleryview what its' items as webview. So i am not wanting scrolling image, i want to scroll webviews.. Please help. I make some things but webview doesnt run correct into gallery.

役に立ちましたか?

解決

You have to use custom Adapter for your gallery view and then override getView method. Something like this:

    public class CustomGalleryAdapter extends BaseAdapter

and then

    @Override
    public View getView(int position, View convertView, ViewGroup parent) 
    {
        View view = convertView;
        if (view == null)
        {
            LayoutInflater vi = (LayoutInflater)activity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
            view = vi.inflate(R.layout.YOUR_WEBVIEW_LAYOUT, null);
        }
        // Here do some changes to webview view
        // view.SetXY()...

        return view;
    }

and configure your gallery view with new adapter:

    gallery.setAdapter(new CustomGalleryAdapter(...));

The YOUR_WEBVIEW_LAYOUT is a layout created in layout resources, which may contain also only a single webview.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top