android 控件使用集锦
layout.xml
<RadioGroup android:id="@+id/sex" style="@style/textInfo" android><RadioButton android:text="男:" android:id="@+id/radionBtn_man" ></RadioButton><RadioButton android:text="女:" android:id="@+id/radionBtn_woman" ></RadioButton></RadioGroup>?
RadioButton rb = (RadioButton) findViewById(sexRadioGroup.getCheckedRadioButtonId());mUser.setSex(((RadioButton) findViewById(sexRadioGroup.getCheckedRadioButtonId())).getText().toString());?
?
<RadioGroup android:id="@+id/sex" style="@style/textInfo" android:orientation="vertical">
其中的android:orientation="vertical" 是设置group中的布局水平还是垂直,默认是垂直
android:checked="true" 标示默认选中
ps:如果多个radiobutton都有android:checked="true",则选中最后一个mTempPath.moveTo(50, 200);
mTempPath.quadTo(52, 10, 60, 200);
mTempPath.close();mTempPath.setFillType(FillType.EVEN_ODD);
mPaint.setStyle(Style.FILL);
mCanvas.drawPath(mTempPath, mPaint);</pre>
<p>?填充<span style="white-space: pre;">close()之后自动把path路径封闭了</span></p>
<p>?</p>