java - Checkbox text, pushing actual checkbox to the left -


please take @ following image:

enter image description here

as can see, text belongs checkbox pushing corresponding checkbox left. xml simple: 1 linearlayout gravity: center, , orientation:vertical. , other views can see checkbox , button. same attributes ( width , height: wrap_content, , margin between them.

so question simple: how can make checkboxes align vertically?

@soma-web's advice sound.

another way is:

  1. create vertical linearlayout inside linearlayout, set width wrap_content

  2. put checkboxes inside linearlayout.

the smaller linearlayout wrap width longest checkbox, align them left. way, internal linearlayout centered, checkboxes won't be.

hope helps.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -