Office Hours — Today, August 28

Thursday, August 23

Aug 28
7:20 PM
Mark M.
has entered the room
Mark M.
turned on guest access
7:25 PM
Mark M.
has entered the room
Mark M.
has left the room
crazykid
has entered the room
Mark M.
howdy, crazykid!
how can I help you today?
crazykid
first, thanks for the book - its just what the dr. ordered :)
Mark M.
and, it's available without a prescription! :-)
7:30 PM
Mark M.
do you have a question?
crazykid
so i am putting together my outline for an upcoming application. the overall layout is going to have a tabbed navigation (as seen in the instagram app and twitter app). I am just looking for the best way to approach the overall design. the reason I am having difficulty is because I need support for 2.x devices - and all online posts reference a depreciated class to acomplish this..so I want to make sure my foundation is correct before putting up any walls.
Mark M.
well, I haven't used either app
that being said, ViewPager and some form of tabbed indicator bar is the most popular solution for this for new development nowadays
whether those tabs are from the action bar, PagerTabStrip, or the tab class from ViewPagerIndicator.com is up to you
if you do not want to use ViewPager, then the action bar with tabs is the next-most-popular solution, using ActionBarSherlock for the action bar backport
crazykid
ok, but is there a way to prevent the action bar from sucking up my tabs...because thats what I understand it can do when tabs are implemented into the action bar?
7:35 PM
Mark M.
I don't know what "sucking up my tabs" means
crazykid
page 723 of your book
the tabs on the smaller screen is the desired effect, but on a tablet it may convert automagically
Mark M.
um, which version of the book are you referring to?
the latest (4.1) talks about dialogs on page 723
crazykid
4.0
guess its time to update already :)
Mark M.
ah, OK
yes, there is nothing that you can do about that
your reference to needing a deprecated class presumably was in reference to TabActivity
you do not need TabActivity to use an old-style TabHost and TabWidget
crazykid
yes sir, sorry thought i said that
ok
7:40 PM
Mark M.
if you check out the Tab sample in the Widget Catalog, towards the end of the book, you will see a non-TabActivity way of using those classes
crazykid
ok excellent, thanks
Mark M.
ViewPager is still more popular today for new development, as it gives the user the option of horizontal swiping
in addition to tabs for navigation
but, TabHost/TabWidget still work
crazykid
I ill definitely use the viewpager
(or try)
Mark M.
Version 4.1 of the book shows using that with PagerTabStrip for tabs
crazykid
perfect - thats where i will start, thanks Mark
have a good night, bye
Mark M.
bye!
crazykid
has left the room
8:10 PM
Mark S.
has entered the room
Mark M.
howdy, Mark!
how can I help you today?
Mark S.
Howdy. Wow! You'd think there'd be a crowd here.
Mark M.
actually, these chats tend to be relatively quiet
Mark S.
I do have a simple question, with a lengthy setup.
I should warn that I'm making use of ActionBarSherlock, so there may be features or quirks that fall outside the bounds of standard Android APIs. Here goes..
I'm building an app that reasonably resembles the boiler plat Master-Client template that comes with the latest ADT. The goal is to have the app work in a two-pane mode for landscape tables, and single pane mode for portrait format and for smaller devices. So far, pretty standard.
8:15 PM
Mark S.
For the two-pane landscape, I have a MasterActivity, which is a descendant of FragmentActivity (actually, SherlockFragmentActivity), and in my layout I'm declaring a fragment for a MasterFragment and a FrameLayout to hold a detail fragment.
In two-pane, I have no difficulty loading the detailFragment in the FrameLayout. But in single-pane mode, I'm encountering some difficulties...
In single-pane mode, the idea is to start an activity on the click of an item in the master fragment's list. No problems there, but my goal is to start the activity, and pass the index of the selected item within a Bundle that's passed to the activity via Intent.
boris
has entered the room
Mark S.
What I'm finding is that my DetailActivity, which is a descendant of FragmentActivity (so it can load the same detail fragment that I use in the two-pane layout, of course), does not receive the information that's passed in the Bundle. So, I think I'm misunderstanding how FragmentActivity workds.
Mark M.
(btw, howdy, boris!)
8:20 PM
boris
Hi
Mark M.
Mark: have you looked at how I implemented the EU4You sample app, in the Large Screen chapter of the book?
it has a structure very similar to what you are describing
Mark S.
I will pull it up and work through it. That's probably all I need.
Mark M.
basically, you stuff the position (or ID or whatever) an an Intent extra, for the Intent used with startActivity() for the detail
boris
I am looking for information on the new media APIs in Jelly Bean. MediaExtractor, MediaCodec, and AudioTrack. There's the Google IO talk, but otherwise there isn't even a good sample program.
Mark M.
boris: I haven't touched any of that yet, sorry
though AudioTrack is not new -- that's been around since 1.5 or 1.6
boris
Thanks.
Mark S.
On a similar vein as Boris's question - has the Nexus 7 inspired any upswing in Android tablet app requests?
Mark M.
what do you mean by "app requests"?
tablets are now sitting at around 10% of the Android ecosystem: http://developer.android.com/about/dashboa…
Mark S.
Well, I really like the tablet. Much more readable than a smart phone, yet it actually fits in my pocket. Master-Detail issues notwithstanding, I really like the features of the tablet. So I was wondering if other developers are building apps that can make use of Nexus 7s features, or if there are companies adopting the tablet for future projects.
Mark M.
if a Nexus 7 fits in your pocket, you have mighty big pockets :-)
8:25 PM
Mark S.
I have loose pants.
Mark M.
I am unaware that many people are doing things *specifically* for the Nexus 7 individually
Mark S.
Understood. Thanks.
Mark M.
the Nexus 7 increases the demand for certain types of apps: tablets, NFC, WiFi Direct, etc.
but only incrementally, as there are only so many Nexus 7's being sold
any given Android device is largely just a basket of device capabilities
only a handful deserve device-specific attention, and those will tend to be ones with different distribution (e.g., Kindle Fire) or seriously different characteristics (e.g., OUYA)
(and the OUYA doesn't even exist yet)
Mark S.
Ain
Ain't heard of it.
Mark M.
OUYA is an Android-powered game console
did well on Kickstarter
should be shipping early next year IIRC
Android devices sans touchscreens (OUYA, Google TV, etc.) are distinctly different and, if you plan on supporting them, need extra love and attention
Mark S.
Interesting. More things to look forward to.
Mark M.
it's never dull
running out of time: any final questions?
Mark S.
I got none. Thanks for responding.
8:30 PM
Mark M.
well, that's a wrap for the chat
Mark S.
has left the room
Mark M.
next one is Thursday, 10am Eastern
have a pleasant day!
Mark M.
has left the room
Mark M.
has entered the room
boris
has left the room
Mark M.
turned off guest access

Thursday, August 23

 

Office Hours

People in this transcript

  • boris
  • crazykid
  • Mark Murphy
  • Mark Murphy
  • Mark Semsel