CheckedTextView 复选框左显示

来源:互联网 发布:js offsetwidth 属性 编辑:程序博客网 时间:2024/06/03 21:42
<CheckedTextView                    android:layout_width="wrap_content"                    android:layout_height="?android:attr/listPreferredItemHeightSmall"                    android:textAppearance="?android:attr/textAppearanceListItemSmall"                    android:gravity="center_vertical"                    android:drawableLeft="?android:attr/listChoiceIndicatorMultiple"                    android:checkMark="?android:attr/listChoiceIndicatorMultiple"                    android:layout_marginRight="@dimen/grid_layout_margin3"                    android:layout_marginTop="@dimen/checkbox_margin"                    android:text="@string/order" />

其中:android:drawableLeft控制显示在左边,checkMark控制显示在右边。

?android:attr/listChoiceIndicatorMultiple 表示复选框,?android:attr/listChoiceIndicatorSingle表示单选框

0 0
原创粉丝点击