RadioButton间距问题

在代码中设置RadioButton 的间距的问题解决  一定要用
RadioGroup.LayoutParams 不能用别的代替不然间距设置不上
RadioGroup.LayoutParams layoutParams=new RadioGroup.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
        layoutParams.rightMargin=10;
        for (int i = 0; i < mData.size(); i++) {
            RadioButton view1 = new RadioButton(mContext);
            view1.setClickable(false);
            view1.setButtonDrawable(android.R.color.transparent);
            view1.setBackgroundResource(R.drawable.circle_indicator);
            indicatorLayout.addView(view1,layoutParams);
            displayRatio_selelct(currentPage);
        }

 
  

 
 

你可能感兴趣的:(RadioButton间距问题)