Uncodin/bypass

Lists with WRAP_CONTENT do not have their width calculated correctly

wpride opened this issue · 1 comments

See attached image
Looks like Android is not accounting for the adjusted width (including the * and tab) correctly and is thus wrapping too early.

bad list

From DDMS with the TextView highlighted:

capture

The general structure is that the TextView is created within a widget with a call to a Util method that invokes the Bypass library. The TextView is then passed into a top level view that controls the layout.

you can see the markdown view being instantiated here (line 350):

https://github.com/dimagi/commcare-odk/blob/7d3014791baf49565816aaaa9311f78fdab9a820/app/src/org/odk/collect/android/widgets/QuestionWidget.java#L350

helper function here (line 93)

https://github.com/dimagi/commcare-odk/blob/7d3014791baf49565816aaaa9311f78fdab9a820/app/src/org/commcare/android/util/MarkupUtil.java#L93

layout params here (line 72):

https://github.com/dimagi/commcare-odk/blob/master/app/src/org/odk/collect/android/views/media/MediaLayout.java#L72