Drawable drawable = context.getResources().getDrawable(
R.drawable.radiobg);
drawable.setBounds(0, 0,
drawable.getIntrinsicWidth(),
drawable.getIntrinsicHeight());
RadioButton radioButton=new RadioButton(context);
radioButton.setButtonDrawable(android.R.color.transparent);
radioButton.setTextSize(16);
radioButton.setTextColor(Color.parseColor("#393939"));
radioButton.setCompoundDrawables(null,null,drawable,null);
radioButton.setText(deliverytime.getName());
 
这样就可以写成自己需要的样式
 
http://blog.163.com/keep_run/blog/static/205557036201322724120140/
posted on 2016-05-04 09:16  Jinger1992223  阅读(1612)  评论(0编辑  收藏  举报