you can, for example, create a method in a base class, that find the rootView and add it programatically when showing, or remove it when hidding
a
audhil
05/23/2017, 12:57 PM
@myanmarking: ll that work for all parent layouts?
m
myanmarking
05/23/2017, 12:57 PM
all activities have the same rootLayout which is a framelayout
so if you add a view there, it will show under your main activity content
a
audhil
05/23/2017, 12:58 PM
ok, thought of doing this earlier, ll try and tell you.
just curious of getting any other tips from you all. 🙂
m
myanmarking
05/23/2017, 1:00 PM
i dont know if there is a better ‘common’ solution. not without a base layout or sth like that
i
inv3rse
05/23/2017, 1:18 PM
I recommend implementing that functionality as an extension function
In my experience base activity/fragment classes do not scale well with the app size
m
myanmarking
05/23/2017, 1:19 PM
yes, thats what i did 😛
you can use the rootView tag as a place to store the position in which you added the view. and then to remove it, check if the value is there and remove or skip