Office Hours — Today, August 23

Tuesday, August 21

Aug 23
9:55 AM
Mark M.
has entered the room
Mark M.
turned on guest access
Mark M.
has entered the room
Mark M.
has left the room
Mark M.
has entered the room
Mark M.
has left the room
John W.
has entered the room
Mark M.
howdy John!
how can I help you today?
John W.
And greetings to you too Sir...
10:00 AM
Siik
has entered the room
Siik
Hello.
Mark M.
howdy, Siik!
John: do you have a question?
Siik
Hi Mark, how are you doing? You answered my question today on SO. It was about holding a ViewPager in Fragments. I got that nested Fragments are currently unsupported and my solution can't possibly be of help in any any future OS updates. I just want to make it in a right way, so asking you for advice, how to properly handle the case when I have two Fragments within Activity and want to use a ViewPager to swipe between different Fragments in one of them. Or this is kind of bad idea and I need to rethink UX?
Mark M.
Siik: what you want is fine, just don't put that ViewPager itself in a Fragment
John W.
My first time here, having just downloaded to my Google Nexus 7, and run a test app. But I notice the 'baked-in app won't expand the screen with a pinch gesture. Is this known?
Mark M.
John: IIRC, pinch-to-zoom was giving me difficulty -- there's a zoom option in settings in the overflow menu
but I'll try to make a point of experimenting with pinch-to-zoom again in the near future
Siik
Don't know where to put it then because what I have is just two Fragments, the screen divided by them, the first half need to by 'swypie`
Mark M.
Siik: oh, sorry, I misread your question
while your desired UX is fine, the implementation of fragments-within-fragments just isn't supported
you're welcome to use them and pray
or, remove fragments from one side of the equation
10:05 AM
Mark M.
either by not using fragments within the ViewPager (just views), or by making the ViewPager be held by the activity directly
bear in mind that you can have left-and-right splits in an activity without using fragments
Siik
If ViewPager would be held the the activity directly I'll have to swipe the whole screen.
Mark M.
so, for example, your activity could have a horizontal LinearLayout with a ViewPager and a fragment
no
the ViewPager is only as big as you make it
if the ViewPager takes up half the screen, you only swipe in that half
that
er, that does not require the ViewPager to be inside a fragment
any more than having a Button take up half the screen requires that the Button be inside a fragmet
er, fragment
Siik
Yeah, this sounds like a plan, I can remake the layout to have a LinearLayout to hold a ViewPager and a Fragment...
Mark M.
right
on a smaller screen, the activity might just hold the ViewPager, for example
Siik
right :)
Mark M.
John: do you have another question?
John W.
Mark: Yes, your 'permanent' zoom preference works, but is only useful on max. No problem, though, I'm really here to see what Office Hours is like....I'm using the Kindle version of your book, which adds the ability to expand the diagrams! I'll say farewell for now, and will visit again when I have something to say. Thanks!
Mark M.
John: could you clarify a bit about "only useful on max"?
Siik
I'm fine now, thanks for your advice, Mark. Leaving now, I'll join you next time I have something to ask.
Mark M.
Siik: OK
10:10 AM
John W.
OK, when I installed your app & noticed the lack of pinch, I went to the menu zoom & noticed it was on max. It could be made less, but this was not useful.
Mark M.
ah
I'll have to run some tests on the 7, then
John W.
OK, seems like a great device. Bye.
10:15 AM
Mark M.
if anyone has any questions, feel free to chime in
10:20 AM
Siik
has left the room
10:30 AM
John W.
Oh, just before I go, what did you mean by 'IIRC' is it a thing like 'RTFM'?..:-)
Mark M.
IIRC = if I recall correctly
John W.
Thanks, and TTFN...
Mark M.
see ya!
John W.
has left the room
10:45 AM
Mark M.
has entered the room
Mark M.
has left the room
11:00 AM
Mark M.
turned off guest access

Tuesday, August 21

 

Office Hours

People in this transcript

  • John Wheater
  • Mark Murphy
  • Mark Murphy
  • Siik