title: Custom view scrollbars
body: <p>I have a custom view and I managed to enable scrollbars on it using this post: <a href="https://stackoverflow.com/questions/4869276/android-enable-scrollbars-on-canvas-based-view">Android: Enable Scrollbars on Canvas-Based View</a>.
  The problem is that I can't scroll them, even though I overrode the compute functions.
  Here is the code that creates the view:</p>
  
  <pre><code>final PaintBoardView paintBoardView=new PaintBoardView(this);
  LinearLayout.LayoutParams layoutParams=new LinearLayout.LayoutParams(
          0,ViewGroup.LayoutParams.FILL_PARENT,(float)0.8);
  paintBoardView.setLayoutParams(layoutParams);
  ViewGroup boardToolsContainer=(ViewGroup)findViewById(R.id.board_tools_container);
  boardToolsContainer.addView(paintBoardView);
  </code></pre>
  
  <p>And here's the view's constructor:</p>
  
  <pre><code>super(context);
  setBackgroundResource(android.R.color.white);
  setHorizontalScrollBarEnabled(true);
  setVerticalScrollBarEnabled(true);
  TypedArray styledAttributes=context.obtainStyledAttributes(
      R.styleable.View);
  initializeScrollbars(styledAttributes);
  styledAttributes.recycle();
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>@Override public int computeHorizontalScrollRange() { return 2000; }
  @Override public int computeVerticalScrollRange() { return 2000; }
  </code></pre>
  
  <p>As I said, I see the scroll bars, but the scrolling is not working.
  Thanks for any help.</p>