Office Hours — Today, February 20

Saturday, February 17

Feb 20
8:55 AM
Mark M.
has entered the room
Mark M.
turned on guest access
Jan
has entered the room
9:00 AM
Mark M.
hello, Jan!
how can I help you today?
Jan
Greetings from Southern Moravia (Czech Republic)
View paste
I'd like to discuss one issue with layout in my project.
When I enclosed <fragment> with <FrameLayout>, my layout changed the wrong way.
Now, FrameLayout expands to the top and AppBar overlays it, so top most objects are hidden under the AppBar.
Mark M.
why did you wrap <fragment> in <FrameLayout>?
Jan
well, I wanted to use fragments
the idea is to set one acttivity as main screen
and then replace fragments as needed
and that FrameLayer should be container
Mark M.
replacing fragments is a good reason to have a FrameLayout, but then you would not use a static fragment (<fragment>)
you would load all fragments dynamically, using FragmentTransaction
Jan
so this means that I cannot use static declaration and then replacing it later via code?
Mark M.
I don't think that's reliable
Jan
ok, I'll redo it, thanks!
9:05 AM
Mark M.
I do not know if that will address your original problem (overlapping content), though it might
Jan
If not then I'll attend a new session later :)
Mark M.
you might also use Android Studio's Layout Inspector, or uiautomatorviewer, to get a sense for why you are getting the overlapping behavior
Jan
ok, thanks, bye
Jan
has left the room
9:55 AM
Mark M.
turned off guest access

Saturday, February 17

 

Office Hours

People in this transcript

  • Jan
  • Mark Murphy