android RadioButton,androidradiobutton

來源:互聯網
上載者:User

android RadioButton,androidradiobutton

不要再使用帶按鈕的RadioButton了,你還問為什麼!這還不明顯嗎!太醜了!!!

醜不醜?認為不醜的可以直接離開了!在正式的項目中使用這種會被K的好不好!看!

對比之下看到什麼是渣渣了吧!處理很簡單,

去掉button

<span style="white-space:pre"></span>android:button="@null"

添加.9.png背景圖,橫向組合選項!

不多說了上代碼!

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/dialog_nearby_layout_root"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:background="@color/dialog_backgroud_full"    android:gravity="center_horizontal"    android:orientation="vertical"    android:paddingLeft="10dip"    android:paddingRight="10dip"    android:paddingTop="70dip" >    <LinearLayout        android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:background="@drawable/bg_popwindow"        android:padding="20dip" >        <ScrollView            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:fadingEdge="none" >            <LinearLayout                android:layout_width="fill_parent"                android:layout_height="wrap_content"                android:orientation="vertical" >                <TextView                    android:layout_width="fill_parent"                    android:layout_height="wrap_content"                    android:layout_marginBottom="10dip"                    android:gravity="center_vertical"                    android:text="您想看到的使用者"                    android:textColor="@color/menu_text"                    android:textSize="16sp" />                <RadioGroup                    android:id="@+id/dialog_nearby_rg_gender"                    android:layout_width="fill_parent"                    android:layout_height="wrap_content"                    android:orientation="horizontal" >                    <RadioButton                        android:id="@+id/dialog_nearby_rb_gender_all"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/bg_tab_left"                        android:button="@null"                        android:gravity="center"                        android:minHeight="33dip"                        android:text="全部"                        android:textColor="@color/btn_text_color"                        android:textSize="14sp" />                    <RadioButton                        android:id="@+id/dialog_nearby_rb_gender_male"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/bg_tab_center"                        android:button="@null"                        android:gravity="center"                        android:minHeight="33dip"                        android:text="男"                        android:textColor="@color/btn_text_color"                        android:textSize="14sp" />                    <RadioButton                        android:id="@+id/dialog_nearby_rb_gender_female"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/bg_tab_right"                        android:button="@null"                        android:gravity="center"                        android:minHeight="33dip"                        android:text="女"                        android:textColor="@color/btn_text_color"                        android:textSize="14sp" />                </RadioGroup>                <TextView                    android:layout_width="fill_parent"                    android:layout_height="wrap_content"                    android:layout_marginBottom="10dip"                    android:layout_marginTop="10dip"                    android:gravity="center_vertical"                    android:text="出現的時間"                    android:textColor="@color/menu_text"                    android:textSize="16sp" />                <RadioGroup                    android:id="@+id/dialog_nearby_rg_time"                    android:layout_width="fill_parent"                    android:layout_height="wrap_content"                    android:layout_marginBottom="15dip"                    android:orientation="horizontal" >                    <RadioButton                        android:id="@+id/dialog_nearby_rb_time_fifteenminutes"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/bg_tab_left"                        android:button="@null"                        android:gravity="center"                        android:minHeight="33dip"                        android:text="15分鐘"                        android:textColor="@color/btn_text_color"                        android:textSize="14sp" />                    <RadioButton                        android:id="@+id/dialog_nearby_rb_time_sixtyminutes"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/bg_tab_center"                        android:button="@null"                        android:gravity="center"                        android:minHeight="33dip"                        android:text="60分鐘"                        android:textColor="@color/btn_text_color"                        android:textSize="14sp" />                    <RadioButton                        android:id="@+id/dialog_nearby_rb_time_oneday"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/bg_tab_center"                        android:button="@null"                        android:gravity="center"                        android:minHeight="33dip"                        android:text="1天"                        android:textColor="@color/btn_text_color"                        android:textSize="14sp" />                    <RadioButton                        android:id="@+id/dialog_nearby_rb_time_twoday"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/bg_tab_right"                        android:button="@null"                        android:gravity="center"                        android:minHeight="33dip"                        android:text="2天"                        android:textColor="@color/btn_text_color"                        android:textSize="14sp" />                </RadioGroup>                <View                    android:layout_width="fill_parent"                    android:layout_height="2px"                    android:background="@color/blue"                    android:orientation="vertical" />                <LinearLayout                    android:layout_width="fill_parent"                    android:layout_height="wrap_content"                    android:layout_marginTop="15.0dip"                    android:gravity="center"                    android:orientation="horizontal" >                    <Button                        android:id="@+id/dialog_nearby_btn_submit"                        style="@style/Style_Dialog_Button"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/btn_default_popsubmit"                        android:text="確認" />                    <Button                        android:id="@+id/dialog_nearby_btn_cancel"                        style="@style/Style_Dialog_Button"                        android:layout_width="0dip"                        android:layout_height="wrap_content"                        android:layout_weight="1"                        android:background="@drawable/btn_default"                        android:text="取消" />                </LinearLayout>            </LinearLayout>        </ScrollView>    </LinearLayout></LinearLayout>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.