I want to enclose the pair of checkboxes and the radio buttons here:
...in a rectangle or "bounding box" so that it look something like this:
...but less ugly, of course. How can I do that with the following XML as a starting point:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="hhs.app.SettingsActivity">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dip"
android:text="@string/select_your_printer"
android:textAppearance="?android:attr/textAppearanceMedium" />
<CheckBox
android:id="@+id/ckbxNoPrinter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/no_printer" />
<CheckBox
android:id="@+id/ckbxZebraQL220"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/zebra_ql220" />
<Space
android:layout_width="match_parent"
android:layout_height="5dp" />
. . .
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/radbtnBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/using_labels_black" />
<RadioButton
android:id="@+id/radbtnPlain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/using_plain_labels" />
</RadioGroup>
<Space
android:layout_width="match_parent"
android:layout_height="2dp" />
. . .
</LinearLayout>
</LinearLayout>
?
UPDATE
I tried to apply Der Golem's suggestion, like so:
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content">
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:layout_width="wrap_content">
<stroke
android:width="4dp"
android:color="#f000"
android:layout_width="wrap_content" />
<TextView
android:text="@string/after_fetching_palabra"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
</shape>
</LinearLayout>
...but that does nothing (good); the TextView is just in there as a test, starting with one simple widget to begin with.
NOTE: This is a LinearLayout within a LinearLayout. When I remove this, it's fine, but with it, the Layout won't even render.
UPATE 2
So I take it that I put the shape in a \res\drawable folder. But in Droidio, it gives me four, count 'em, four, drawable folders, namely:
drawable-hdpi
drawable-mdpi
drawable-xhdpi
drawable-xxhdpi
Do I need to put the xml in each of those folders, or can I create a "generic/default" plain old "drawable" folder and put it there?