I built it for Android 2.2
Here is my code. Java is generated by eclipse. Changed xml.
package foo.bar.radiobuttontest; import android.app.Activity; import android.os.Bundle; import foo.bar.radiobuttontest.R; public class rbt extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
here is my res / layout / main.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RadioGroup android:id="@+id/orientation" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5px"> <RadioButton android:id="@+id/horizontal" android:background="#aa0000" android:text="horizontal" /> <RadioButton android:id="@+id/vertical" android:text="vertical" /> </RadioGroup> </LinearLayout>
While experimenting with the drums, I started creating a very simple application. It looks like this:
* horizontal * vertical
Not without reason, I thought that I changed the background color. I started by changing the background of the RadioGroup element, everything worked as expected. Then just for fun, although I would change the background of only one of the switches in the group. This can be seen in main.xml above. After that, I noticed that the text of the radio object is now covered with a radio block, the page now looks something like this:
* horizontal * vertical
Except that you can still see “ho” horizontally, they are simply covered by a radio block
Is this the expected behavior?
source share