title: Android: Gallery of Webviews
body: <p>I am trying to build a horizontally scrolling set of webviews, using the Gallery widget.  The problem is that I cannot swipe the views, which of course works for galleries of images.
  Following cookbook code, in the activity's onCreate() I:</p>
  
  <pre><code>g = (Gallery) findViewById(R.id.chapter_browser);
  g.setAdapter(new WebViewAdapter(this));
  </code></pre>
  
  <p>Then the adapter creates the webviews and returns them for the requested indices:</p>
  
  <pre><code>   public class WebViewAdapter extends BaseAdapter {
          int mGalleryItemBackground;
          private Context mContext;
  
          private String[] pages = {
                  "test1.html",
                  "test2.html",
                  "test3.html",
                  "test4.html"
          };
  
          public WebViewAdapter(Context c) {
              mContext = c;
          }
  
          public int getCount() {
              return pages.length;
          }
  
          public Object getItem(int position) {
              return position;
          }
  
          public long getItemId(int position) {
              return position;
          }
  
          public View getView(int position, View convertView, ViewGroup parent) {
              WebView i = new WebView(mContext);
  
              i.loadUrl("file:///android_asset/" + pages[position]);
              i.setBackgroundResource(mGalleryItemBackground);
              i.setWebViewClient(new WebViewClient());
              i.setLayoutParams(new Gallery.LayoutParams(100,100));
              i.setInitialScale(100);
              i.setFocusable(false);
              i.setClickable(false);
  
              return i;
          }
      }
  </code></pre>
  
  <p>The problem seems to be that the WebView insists on consuming touch events, despite setting its <code>clickable</code> attribute off.  I tried creating an OnTouchEventListener for the views and then dispatching then events to the gallery, but that just seems to crash the program.</p>
  
  <p>Any clues appreciated.</p>