/**
* 解决文字和drawableleft和文字一起时不居中。要设置 android:background=”@null”android:button=”@null”
* @author zhousheng
*
*/
public class MDMRadioButton extends RadioButton {
public MDMRadioButton(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// TODO Auto-generated constructor stub
}
public MDMRadioButton(Context context, AttributeSet attrs) {
super(context, attrs);
// TODO Auto-generated constructor stub
}
public MDMRadioButton(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
@Override
protected void onDraw(Canvas canvas) {
//获取设置的图片
Drawable[] drawables = getCompoundDrawables();
if (drawables != null) {