Reputation: 686
I have a header row which is actually some fields header put in horizontal linear layout. Below that row i have five other rows which are either radio buttons or edit boxes which represents values which user will select for each column. Let's say i have three elements in header e.i A, B, C. A has four values i.e PQR,STU,VWX,YZA and B has 3 values i.e CVB,SDF,WER and C is a radio button for boolean value true or false as shown below.
s.n A B C PQR STU VWX YZA CVB SDF WER X 1 O O O O O O O [] 2 O O O O O O O []
The problem is radio buttons are not inline with the column of first row. And i am getting something like this.
s.n A B C PQR STU VWX YZA CVB SDF WER X 1 O O O O O O O [] 2 O O O O O O O []
Upvotes: 1
Views: 2934
Reputation: 452
You can do the following to RadioButtons:
XML solution :
or
Programmatically Achieving this :
To solve this programmatically you can try adding padding and margins to radio buttons example myButton.setPadding(0, 10, 0, 10);
More information on details are in this example android add padding between radiogroup buttons programmatically
Hope that this helps.
Upvotes: 1