Вопрос

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