how block scrolling in pageAdapter
<p>For example: I have 2 pages in PageAdapter. When I go to second page, I click on button "Lock" and horizontal scrolling is off. I click "Unlock" and again can scrolling. How block scrolling ?
Code:</p>

<pre><code>public class slide extends PagerAdapter
{

List&lt;View&gt; pages = null; // empty list views

public slide (List&lt;View&gt; page)
{
    this.pages = page;
}

@Override
public int getCount() 
{
    return pages.size();
}

@Override
public boolean isViewFromObject(View view, Object obj) 
{
    return view.equals(obj);
}

@Override
public Object instantiateItem (View views, int position)
{
    View v = pages.get(position);
    ((ViewPager) views).addView(v, 0);

    return v;
}

@Override
public void destroyItem(View views, int position, Object view)
{
    ((ViewPager) views).removeView((View) view);
}

@Override
public void finishUpdate(View view)
{       
}

@Override
public void restoreState(Parcelable arg0, ClassLoader arg1)
{
}

@Override
public Parcelable saveState()
{
    return null;
}

@Override
public void startUpdate(View view)
{

}
</code></pre>

<p>In Activity:</p>

<pre><code>    List&lt;View&gt; pages = new ArrayList&lt;View&gt;();
    View page = inflater.inflate(R.layout.page, null);
    TextView textView = (TextView) page.findViewById(R.id.text_view);
    textView.setText("Page 1"); // first page
    pages.add(page);


    page = new surfaceControl(this); // second page with some modul
    pages.add(page);


    slide pageAdapter = new slide(pages); 
    ViewPager viewPager = new ViewPager(this);
    viewPager.setAdapter(pageAdapter);
    viewPager.setCurrentItem(0);
</code></pre>
