I would like to have a horizontal
android:text="If you would enter some digits in this field " />
android:hint="enter some digits here"/>
android:text=" that would be great" />
I would like to have a horizontal LinearLayout that is as wide as the screen and as high as its children, but the trick is that its children will have dynamic width each and I don't want them going off screen (cut out).
LinearLayout can't do that(any default layout from the SDK can't do that) because the
LinearLayout is set to place all the children in one horizontal or vertical line. Also, any type of conditional layout rules based on dimensions not yet available(like in your case the available width for the
LinearLayout) are not possible in the xml anyway.
What you need is a custom layout which measures the children to use the available space moving any non fitting children on a new line below(a
FlowLayout). You have an example of such a layout, from one of the engineers working on Android, in this video. There are also other implementations out there to have a look at(implementing such a layout isn't hard anyway).