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 .
LinearLayoutlinearLayout= (LinearLayout)findViewById(R.id.your_layout);
RadioButtonradioButton=newRadioButton(mActivity);
// you can change the width and height
radioButton.setLayoutParams(newLinearLayout.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"