Answer the question
In order to leave comments, you need to log in
How to overlay view on view in android?
Good day to all.
There is a task in which it is necessary that the user can select a picture and it immediately starts uploading to the server, on the application screen it is necessary to show a thumbnail of the picture with a progress bar superimposed on it (just on it, and not next to it or on the whole screen), so that the user can fill in other fields while the pictures are loading.
From the ideas that came to my mind: put the progress bar below the image and drag it with a negative margin top.
And the second option is to put them in one RalativeLayout and bind them to the top of the parent element.
However, I consider such approaches to be some perversions and I would like to know if there are other more correct methods to place one view element on another.
Answer the question
In order to leave comments, you need to log in
Putting in one FrameLayout is the cheapest solution. RelativeLayout is overkill in this case.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question