Commit d30edfc4 authored by Edward Wang's avatar Edward Wang
Browse files

Preferences: Add a ScrollView to prevent overflow

Resolves a usability bug.
parent 236304f9
......@@ -10,37 +10,51 @@
android:focusable="true" android:focusableInTouchMode="true"
android:layout_width="0px" android:layout_height="0px" />
<RadioGroup
android:id="@+id/radiogroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1">
<RadioButton
android:id="@+id/internal_memory"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/internal_memory"
android:focusable="true" />
android:orientation="vertical">
<RadioButton
android:id="@+id/other"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:text="@string/other"
android:tag="other" />
</RadioGroup>
<RadioGroup
android:id="@+id/radiogroup"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/other_path"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions">
</EditText>
<RadioButton
android:id="@+id/internal_memory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:text="@string/internal_memory" />
<RadioButton
android:id="@+id/other"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:tag="other"
android:text="@string/other" />
</RadioGroup>
<EditText
android:id="@+id/other_path"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions">
</EditText>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/ok"
......
......@@ -49,6 +49,7 @@ import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.RadioButton;
......@@ -82,6 +83,7 @@ public class PreferencesActivity extends PreferenceActivity {
final Dialog dialog = new Dialog(PreferencesActivity.this);
dialog.setContentView(R.layout.root_selection);
dialog.setCancelable(true);
dialog.getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
dialog.setTitle(R.string.filebrowser_root);
ArrayList<String> extMounts = new ArrayList<String>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment