android make a radio button scrollable -


I have a problem with the big radio button text The text for this radio button is dynamically generated Unfortunately, Sometimes the text is allocated and it pushes other objects in my layout. However, if I can scroll the radio button it will remove this issue. What do I mean by scrolling if the length of the text is beyond a certain size, then a scroll bar appears on the side of the radio button, So that the user could scroll through the radio buttons' text without changing the layout of all their XML files. When I mean changing layout, other widgets have moved like a button, this is the XML layout file layout for the radio button

   ; & Lt; / Scrollview & gt; & Lt; ScrollView Android: id = "@ + id / ScrlView" Android: layout_width = "fill_parent" Android: layout_height = "74dp" & gt; & Lt; RadioButton Android: id = "@ + id / radio2" Android: layout_width = "304dp" Android: layout_height = "75dp" Android: text = "RadioButton" /> & Lt; / Scrollview & gt; & Lt; Scrollview android: id = "@ + id / ScrlView" android: layout_width = "fill_parent" android: layout_height = "fill_parent" & gt; & Lt; RadioButton Android: id = "@ + id / Radio3" Android: layout_width = "300dp" Android: layout_height = "match_parent" Android: text = "RadioButton" /> & Lt; / Scrollview & gt; & Lt; / RadioGroup & gt; & Lt; / LinearLayout & gt;   

I checked this link and although I can try a scroll view for radio group and if any radio question is too long the user can scroll down.

Try a table layout and let us know what you get. Keep each radio button in your table row. You should also be aware that settext () should also accept SpannableStringBuilder as input. This gives you more control over how to format text. In the end, I think that you need to think about the design. I mean there are limitations! If you receive a lot of text, then you do not show it to everyone. Look at the online newspapers. They have the same problem. Everything can not be shown at all times.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -