Skip to content Skip to sidebar Skip to footer

How To Increase Radio Button Size Using LinearLayout

I am trying to increase the size of RadioButton in LinearLayout which wraps into ScrollView but it is not working in any way. I tried to use property like .setScaleX() and .setScal

Solution 1:

its Worked

radioButton.setHeight(10);
radioButton.setWidth(5);

Solution 2:

Try this .

Use radioButton.setLayoutParams(new LinearLayout.LayoutParams(25, 25)); in your code .

LinearLayout linearLayout = (LinearLayout)findViewById(R.id.your_layout);
RadioButton radioButton = new RadioButton(mActivity);
// you can change the width and height
radioButton.setLayoutParams(new LinearLayout.LayoutParams(25, 25));
linearLayout.addView(radioButton);

Note

You can change width、height、and weight in it .

view.setLayoutParams(new LinearLayout.LayoutParams(width, height, weight));

Post a Comment for "How To Increase Radio Button Size Using LinearLayout"