you can, for example, create a method in a base cl...
# android
m
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
@myanmarking: ll that work for all parent layouts?
m
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
ok, thought of doing this earlier, ll try and tell you.
just curious of getting any other tips from you all. 🙂
m
i dont know if there is a better ‘common’ solution. not without a base layout or sth like that
i
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
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
👍 1