I have a LinearLayout
inside ScrollLayout
. I add pictures to LinearLayout programmaticaly, so user can scroll through them. I need an option to add a picture to the top of LinearLayout, so user can see it on the top of their screen. How can i do it?
Asked
Active
Viewed 222 times
1

Julia L.
- 11
- 2
1 Answers
0
It seems that there are no options other than that once you remove all current child ImageViews
of the LinearLayout
, then you re-add those child ImageView
s including the new one in the order you intend.
See this QA for more information.

hata
- 11,633
- 6
- 46
- 69
-
That is not what I need. I'd like to add a new ImageView to the top of LinearLayout, like when using RelativeLayout I use layout_above. Is there any way to do this? – Julia L. Apr 28 '20 at 16:52
-
@JuliaL. Perhaps, I got what you needed; updated my answer. – hata Apr 29 '20 at 01:44
-
seems its the only way. Thanks – Julia L. Apr 29 '20 at 09:31