ApiDemos 中摘录的部分控件效果图

       1.checkbox星形样式:
    <CheckBox android:id="@+id/star"
         style="?android:attr/starStyle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="收藏" />
 
       2.RadioButton 单选(RadioGroup)
 <RadioGroup
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <RadioButton android:id="@+id/radio1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="radiobutton_1" />

    <RadioButton android:id="@+id/radio2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="radiobutton_2" />
</RadioGroup>
 
3. ToggleButton :
<ToggleButton android:id="@+id/toggle1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
 
4.  <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dip"
            android:text="@string/textColorPrimary"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:focusable="true"
        />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dip"
            android:text="@string/textColorSecondary"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="?android:attr/textColorSecondary"
            android:focusable="true"
        />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dip"
            android:text="@string/textColorTertiary"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textColor="?android:attr/textColorTertiary"
            android:focusable="true"
        />

    margin边沿:是与父容器之间的距离。

    padding填充:是与子容器自检的距离。

效果图:

    

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值