dimanche 24 mai 2015

android: Inline checkboxes

I'm trying to take some data and have it in lists. It's all working fine but I have one problem. What I would like is for my listview items to work as follows.

Each listview item is some text with some checkboxes in between. What I would like is for the text to continue on the next line if it comes to the end of the view. TextView does this already if you just have a single view. The text from a checkbox also does this. But the problem I have is that if the text after a checkbox goes beyond the end of the screen, it will not wrap around to the next line entirely, but instead wrap around to the next line after the checkboxes.

what I want is this [] a text that wraps
around to the next line after [] 
checkboxes.

and

                      some text that is wrapped
what I get is this [] on the other side of the
                      checkbox

Is this even possible with the layouts in android. Or do I need to make a custom View. And if I do have to make a custom View. Is it possible to put checkboxes into a custom textview?




Aucun commentaire:

Enregistrer un commentaire