Disable ScrollView Programmatically?
<p>Hey, I would like to enable ScrollView and disable it by a Button Click.<br>
Disable means like if the ScrollView wasnt there.. and enable it returns the ScrollView..<br>
I want that because I have a gallery with text images, and on a button click the screen orientation changes, so in Landscape the text becomes bigger.. And I want the scrollview so the image doesnt stretch it self and the text becomes unreadable..<br>
scrollview.Enabled=false / setVisibility(false) doesnt make anything.. xml:</p>

<pre><code>&lt;ScrollView 
android:id="@+id/QuranGalleryScrollView" 
android:layout_height="fill_parent" 
android:layout_width="fill_parent"&gt;
&lt;Gallery android:id="@+id/Gallery" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"
android:scrollbars="horizontal"&gt;&lt;/Gallery&gt;
&lt;/ScrollView&gt;
</code></pre>

<p>Thanks</p>

<p>Edit1: I cant use Visibility(gone) since that would also hide the Gallery, what I want is to hide the effect of the scrollview.. When there is ScrollView the images in Gallery become scrollabale and do not fit in the screen so u have to scroll to see the whole image, I dont want do disable/enable that on a button click.. I tried this:</p>

<pre><code>((ScrollView)findViewById(R.id.QuranGalleryScrollView)).setOnTouchListener(null);
                        ((ScrollView)findViewById(R.id.QuranGalleryScrollView)).setHorizontalScrollBarEnabled(false);
                        ((ScrollView)findViewById(R.id.QuranGalleryScrollView)).setVerticalScrollBarEnabled(false);
                        ((ScrollView)findViewById(R.id.QuranGalleryScrollView)).setEnabled(false);
</code></pre>

<p>But still the images in the Gallery are scrollable and not fit the screen.. whats the solution to this?</p>
