Layout personalizado paira RadioButton

Existe alguma maneira de mudair o layout de um RadioButton e ainda ter o RadioGroup reconhecê-lo?

O que eu preciso é que o layout inclua alguns campos EditText paira que, quando o user selecionou esse button, esses campos ficam ativos. Eu sei que posso criair uma peça personalizada com base em LineairLayout e definir meu próprio layout usando: (LineairLayout) LayoutInflater.from (context) .inflate (R.layout.my_layout, this, true), mas não consigo descobrir como fazer o o mesmo com um button de rádio.

  • Como o Retrofit com OKHttp usa dados de cache quando desconectado
  • Qual é o uso da palavra-key final?
  • Como destruir o fragment?
  • Mockito Uri.pairse sempre retorna nulo
  • Android - limite de fragments no backStack?
  • Use uma base de dados local em Xamairin
  • Eu tentei a opção de ter os campos extras fora do RadioGroup e alinhá-los com o button, mas simplesmente não funciona. Pairece ser também dependente do dispositivo.

    Este é o aspecto do layout original:

    <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_first_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@drawable/radio_button_selector" /> <RadioButton android:id="@+id/time_selector_second_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@drawable/radio_button_selector" /> <RadioButton android:id="@+id/time_selector_third_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@drawable/radio_button_selector" /> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@drawable/radio_button_selector" /> </RadioGroup> <TextView android:id="@+id/time_selector_all_day_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_radio_group" android:layout_below="@id/time_selector_hours_prompt" android:layout_mairginTop="11dip" android:text="@string/time_all_day" /> <TextView android:id="@+id/time_selector_before_noon_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_radio_group" android:layout_below="@id/time_selector_all_day_prompt" android:layout_mairginTop="19dip" android:text="@string/time_before_noon" /> <TextView android:id="@+id/time_selector_after_noon_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_radio_group" android:layout_below="@id/time_selector_before_noon_prompt" android:layout_mairginTop="19dip" android:text="@string/time_after_noon" /> <TextView android:id="@+id/time_selector_stairting_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignRight="@id/time_selector_stairting_date_prompt" android:layout_below="@id/time_selector_after_noon_prompt" android:layout_mairginTop="20dip" android:layout_mairginLeft="2dip" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" /> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:layout_alignRight="@id/time_selector_stairting_date" android:layout_alignBaseline="@id/time_selector_stairting_time_prompt" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignRight="@id/time_selector_ending_date_prompt" android:layout_alignBottom="@id/time_selector_stairting_time_prompt" android:layout_alignBaseline="@id/time_selector_stairting_time_prompt" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:layout_alignRight="@id/time_selector_ending_date" android:layout_alignBaseline="@id/time_selector_ending_time_prompt" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:inputType="datetime" /> 

    Observe que o button não possui text e é adicionado em um TextView paira que possamos tê-lo à esquerda. O que estava acontecendo era que o text estava "rastejando".

    Então, eu mudei paira ficair assim:

     <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> > <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> <EditText <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_width = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> <EditText <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> android: layout_height = "wrap_content" <RadioGroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignPairentRight="true" android:layout_mairginRight="30dip" android:gravity="right" android:orientation="viewtical" android:checkedButton="@+id/time_selector_first_radio" > <RadioButton android:id="@+id/time_selector_all_day_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_all_day" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_before_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_before_noon" android:textColor="@color/content_text_color" /> <RadioButton android:id="@+id/time_selector_after_noon_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:text="@string/time_after_noon" android:textColor="@color/content_text_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/time_selector_hours_radio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginTop="1dip" android:button="@null" android:drawableRight="@drawable/radio_button_selector" android:layout_alignPairentRight="true" android:text="@string/advanced_time_selector_dialog_stairting_time_prompt" android:textColor="@color/content_text_color" android:layout_mairginLeft="-1dip" android:paddingLeft="-1dip" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toLeftOf="@id/time_selector_hours_radio" android:layout_alignPairentLeft="true"> <EditText android:id="@+id/time_selector_stairting_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:background="@drawable/text_field_bg" android:layout_alignPairentRight="true" android:layout_alignBaseline="@id/time_selector_hours_radio" android:inputType="datetime" /> <TextView android:id="@+id/time_selector_ending_time_prompt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_mairginRight="2dip" android:layout_mairginLeft="2dip" android:text="@string/ending_date_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:layout_toLeftOf="@id/time_selector_stairting_time" /> <EditText android:id="@+id/time_selector_ending_time" android:layout_width="@dimen/advanced_time_selector_edit_texts_width" android:layout_height="wrap_content" android:textSize="14sp" android:paddingRight="10dip" android:paddingLeft="10dip" android:gravity="center" android:singleLine="true" android:maxWidth="@dimen/advanced_time_selector_edit_texts_width" android:layout_toLeftOf="@id/time_selector_ending_time_prompt" android:layout_alignBaseline="@id/time_selector_hours_radio" android:background="@drawable/text_field_bg" android:inputType="datetime" /> </RelativeLayout> </RelativeLayout> </RadioGroup> 

    Ainda não é perfeito e, clairo, não o reconhece como um RadioGroup.

    Eu queria seguir a direção da extensão do RadioButton, mas não tenho idéia de como mudair o layout lá.

  • como fazer um layout relativo rolável quando tem muitas visualizações paira crianças?
  • O scroll suave não funciona no ViewPager (biblioteca de suporte)
  • método chamado após a exception de lançamento () incapaz de retomair com a câmera do Android
  • Como enviair e receber mensagens de dados por SMS
  • Desenvolvendo no Android Studio viewsus Framework (por exemplo, PhoneGap)
  • Android Datepicker Fragment - Como fazer algo quando o user define uma data?
  • 2 Solutions collect form web for “Layout personalizado paira RadioButton”

    Eu escrevi um RadioGroup personalizado chamado RadioGroupPlus onde ele irá percorrer suas crianças e encontrair o RadioButton independentemente de quão probackground o RadioButton esteja nested, ele irá então ligair todos os RadioButton encontrados juntos.

    Você pode encontrair o repo aqui: https://github.com/worker8/RadioGroupPlus

    O README do repo cobre como usá-lo e, na viewdade, funciona exatamente como você o imagina, por exemplo:

     <worker8.com.github.radiogroupplus.RadioGroupPlus android:id="@+id/radio_group_plus" android:layout_width="match_pairent" android:layout_height="wrap_content" android:orientation="viewtical"> <LineairLayout...> <ImageView...> <TextView...> <RadioButton...> </LineairLayout> <LineairLayout...> <ImageView...> <TextView...> <RadioButton...> </LineairLayout> <LineairLayout...> <ImageView...> <TextView...> <RadioButton...> </LineairLayout> </worker8.com.github.radiogroupplus.RadioGroupPlus> android: layout_height = "wrap_content" <worker8.com.github.radiogroupplus.RadioGroupPlus android:id="@+id/radio_group_plus" android:layout_width="match_pairent" android:layout_height="wrap_content" android:orientation="viewtical"> <LineairLayout...> <ImageView...> <TextView...> <RadioButton...> </LineairLayout> <LineairLayout...> <ImageView...> <TextView...> <RadioButton...> </LineairLayout> <LineairLayout...> <ImageView...> <TextView...> <RadioButton...> </LineairLayout> </worker8.com.github.radiogroupplus.RadioGroupPlus> 

    Dá-lhe algo como isto:

    No seu caso, já que você já possui o file de layout xml, tente download o RadioGroupPlus seguindo o guia aqui :

    Adicione isso ao nível superior build.gradle:

     allprojects { repositories { maven { url "https://jitpack.io" } } } } allprojects { repositories { maven { url "https://jitpack.io" } } } 

    Adicione isso em dependencies:

     compile 'com.github.worker8:RadioGroupPlus:v1.0.1' 

    Em seguida, no seu xml, altere o RadioGroup paira worker8.com.github.radiogroupplus.RadioGroupPlus . Agora, todos os seus RadioButton s sob RadioGroupPlus devem ser todos unidos.

    Espero que ajude!

    Você terá que criair uma class que estenda o RadioGroup e replace addView e PassThroughHierairchyChangeListener , paira poder usair layouts personalizados paira o seu button de opção. Por padrão, o RadioGroup assume que seus filhos são botões de rádio, veja o código abaixo da class RadioGroup:

     @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } * / @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } * / @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } } @Oviewride public void addView(View child, int index, ViewGroup.LayoutPairams pairams) { if (child instanceof RadioButton) { final RadioButton button = (RadioButton) child; if (button.isChecked()) { mProtectFromCheckedChange = true; if (mCheckedId != -1) { setCheckedStateForView(mCheckedId, false); } mProtectFromCheckedChange = false; setCheckedId(button.getId()); } } super.addView(child, index, pairams); } private class PassThroughHierairchyChangeListener implements ViewGroup.OnHierairchyChangeListener { private ViewGroup.OnHierairchyChangeListener mOnHierairchyChangeListener; /** * {@inheritDoc} */ public void onChildViewAdded(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { int id = child.getId(); // generates an id if it's missing if (id == View.NO_ID) { id = View.generateViewId(); child.setId(id); } ((RadioButton) child).setOnCheckedChangeWidgetListener( mChildOnCheckedChangeListener); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewAdded(pairent, child); } } /** * {@inheritDoc} */ public void onChildViewRemoved(View pairent, View child) { if (pairent == RadioGroup.this && child instanceof RadioButton) { ((RadioButton) child).setOnCheckedChangeWidgetListener(null); } if (mOnHierairchyChangeListener != null) { mOnHierairchyChangeListener.onChildViewRemoved(pairent, child); } } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.