Office Hours — Today, February 24

Tuesday, February 22

Mark M.
has entered the room
Mark M.
turned on guest access
Suzanne A.
has entered the room
Mark M.
howdy, Suzanne!
Suzanne A.
howdy, Mark!
have you used honeycomb much yet?
Mark M.
i gots me a XOOM right here, yo
:-)
Feb 24
4:00 PM
Suzanne A.
all right! :-)
Mark M.
if you mean from a development standpoint, some
Suzanne A.
I want to create a dialog box that opens from an action bar item
where the dialog is a 2x4 grid of 8 small icons
do I use a custom dialog?
Mark M.
well, you have three major choices
1. truly create a custom Dialog (i.e., subclass of Dialog)
2. use AlertDialog.Builder and supply the View to go in the "guts" of the dialog
scottt
has entered the room
Julius
has entered the room
Mark M.
3. go the DialogFragment route, if this is fully Honeycomb'd (or you have early access to Ms. Hackborn's compatibility library)
fitz
has entered the room
Mark M.
I haven't played with DialogFragment yet
Suzanne A.
ok. but can I create a custom dialog using xml, as in the linked doc above?
Mark M.
(btw, howdy scottt, Julius, and fitz!)
fitz
just observing Mark
Julius
(howdy)
scottt
hello everyone. just lurking again
Mark M.
Suzanne: oh, yeah, I forgot about that
I keep thinking you have to subclass Dialog
AFAIK, that should work fine
Suzanne A.
really? you mean, it would work?
fitz
you talking/conferences at all in San Fran area this coming year?
Suzanne A.
cool !!
Mark M.
the action bar won't affect the dialog any
Suzanne A.
ok
Mark M.
no different than an options menu item
Suzanne A.
got it
Mark M.
fitz: I'm yammering at AnDevCon in two weeks (as is Suzanne)
well, OK, *I'm* yammering
Suzanne is probably speaking much more coherently than that
Suzanne A.
thanks, mark :-)
4:05 PM
Mark M.
I should be attending I|O, but that's pretty much exclusively Googler-led content
otherwise, right now, I have nothing scheduled for the Bay Area
scottt: you still lurking, or do you have a question?
Julius: do you have a question?
Julius
Yes
If I have a listview and there are rows each with an imageview say and each has a tag - if two of those imageViews has the same tage
Matt R.
has entered the room
Julius
what if I try to fetch the view by tag?
Mark M.
you get one at random, most likely
Julius
I would like to update both at the same time
do you have any ideas of the best way to do this?
or have you seen something good that works?
Mark M.
either don't look them up by tag, or scope the lookup-by-tag to do so on a per-row basis, so you can only get one
(btw, howdy, Matt!)
4:10 PM
Mark M.
most likely, it'd be the latter
Julius
ok thank you for the ideas
Mark M.
no different than finding them by ID
Matt R.
Thanks...just here to lurk for now...working my way through your books. Like the style.
Mark M.
Matt: thanks!
fitz: do you have a question?
Julius
(can't wait for some material on 3.0 - I'm being asked to make 3.0 versions and I don't have a device yet)
fitz
ya but we only have 1 hr :) - not right now just lurking waiting on someone that is late for a meeting
Mark M.
Honeycomb-flavored updates to the books will be rolling out frequently between now and end of March
first update may be as soon as tomorrow
scottt
(still lurking, no questions today)
scott k.
has entered the room
Mark M.
howdy, scott k!
scott k.
hi all
Mark M.
scott k: everyone else has had a turn -- do you have a question?
scott k.
yes, but it may not be your department
i published my "talking quotes" app
when i log in the developers site it says "This .apk requests 1 features that will be used for Android Market Filtering"
android.hardware.touchscreen
i don't know how i am requesting this feature
my manifest specifies:
android:configChanges="keyboardHidden|orientation"
4:15 PM
scott k.
which i lifted from your book
my app doesn't require touchscreen that i know of
Mark M.
what is your minSdkVersion?
scott k.
4
Mark M.
my guess is that it is there for backwards-compatibility reasons
but, that's just a guess
scott k.
it runs in the emulator, and shows up when i search, so maybe its not a problem
Mark M.
you could try <uses-feature android:name"android.hardware.touchscreen" android:required="false" />
scott k.
thanks, i will try that
Mark M.
OK, back to Suzanne: do you have a question?
Suzanne A.
yes, but I think I just found an example. what's the best way to update a progress dialog from a background thread?
Julius
has left the room
Mark M.
I don't think a ProgressDialog necessary dictates the options
so, AsyncTask's onPublishProgress would be my default
Suzanne A.
okay, thanks
Mark M.
if you're not using AsyncTask, then post() on a View, or runOnUiThread()
Julius
has entered the room
Mark M.
welcome back, Julius!
Suzanne A.
will do it
Julius
(hi left too soon)
4:20 PM
Mark M.
scottt, fitz, Matt: if you come up with a question, let me know
4:20 PM
Julius
has left the room
Suzanne A.
gotta run, but thanks mark, and see you soon
Mark M.
see ya!
Suzanne A.
has left the room
Mark M.
scott k: do you have another question?
scott k.
i'm leaving to watch the Discovery space launch as i'm in Cocoa, Fl
Mark M.
cool!
scott k.
thanks for your help - talk to you next time
Mark M.
see ya
scott k.
has left the room
Mark M.
OK, if any of you come up with a question, chime in
Matt R.
I'm coming from a Python background; not much java. Any good resources to get me up to speed with the bits of Java most commonly used on Android?
Mark M.
Matt R.
Nice! Thanks.
scottt
(it's nice weather to watch a launch ~ just under 80 and not very humid here in florida)
4:25 PM
Matt R.
Thanks for the link. I'm sure I'll stop by again for a later office hour session with questions.
scottt
i found the Osborne scjp study guides (Sierra/Bates) to be pretty good for learning java
Matt R.
Thanks. I'll look those up.
Matt R.
has left the room
Mark M.
BTW, if either of you have any XOOM questions, I am XOOM'd, so fire away
4:30 PM
scottt
cool. i was wondering what you were using for 3.0 dev
Mark M.
well.......I........had........been........using........the........emulator........
scottt
lol
Mark M.
they *so* gotta get an x86 emulator going
scottt
why?
Mark M.
to help fix the emulator speed issue
I mean, a VirtualBox of an x86 Android would be cool, but VirtualBox is an Oracle property, so I doubt they'll go that route
I suspect they'll stick with qemu
scottt
speaking on speed issues, is it just me or is the 2.3 emu much slower than the older ones?
Mark M.
each release gets a bit slower for the same screen size
3.0 is dramatically worse, mostly due to screen size, AFAICT
scottt
are there any setting tweaks that one can make to make it any better?
Mark M.
not that I am aware of
well, restate that
4:35 PM
Mark M.
"Device ram size" in the SDK and AVD Manager definitely has an impact
particularly on larger screen sizes
I couldn't even get 3.0 to boot on 512MB -- had to goose it to 1GB
I haven't tried that on a 2.3 WVGA to see if that would help any
there are lots of qemu switches, but I'm not sure if any will help w/o breaking
scottt
ok, back to "x86 emulator"... i'm not sure what u mean. are u using an x86 in an android device?
Mark M.
Most Android devices run ARM processors
the Android emulator emulates an ARM processor
so, the emulator is loading ARM instructions and converting them to x86 instructions to run on your PC/Mac
this is not especially speedy
Android clearly can run on x86 -- Google TV boxes are based on Intel Atom
a version of the Android emulator that used x86 instructions natively would skip the ARM->x86 conversion
and speed things up a fair bit
there are signs that this is in the works in the Googleplex
4:40 PM
scottt
oh, i got it now. i was just being dense. too many all-nighters :-)
Julius
has entered the room
Julius
(hi again)
Mark M.
welcome back!
scottt
add in the jvm and you end up with essentially a vm within a vm
Mark M.
scottt: yes
Julius: do you have another question? (quick! before you vanish again!)
:-)
Julius
(heh)
yes
I have a project where I have a few reuasble layouts
however, I'd like to have reusable Java code too
scottt
throw in running your os with a vm and perhaps running a scripted language and you get 4 levels. yuck!
Julius
I'm having trouble figuring out how to create reusable Java in cases where views in activities are accessed - perhaps I need to subclass my activities. Anyhow - question is do you have any documentation in your ooks on this?
4:45 PM
Julius
ooks => books
(err not a well asked question :))
Mark M.
there is the Reusable Components chapter in the Advanced Android book
Julius
ah
Mark M.
you probably want Android library projects, which are covered in there
Julius
sounds great thank you
scottt
is the xoom really $800?
fitz
mark you developing on a windows 64bit box or 32 bit - does one work faster/better for android dev?
Mark M.
neither
Linux 64-bit
Julius
:>
Mark M.
I'm not sure the 32-bit vs. 64-bit will make much difference, other than in available RAM
fitz
ok thanks
4:50 PM
fitz
what version of Linux you running
Mark M.
Ubuntu 10.10
fitz
cool thanks
Julius
bfn - thanks for your pointers
Mark M.
you're very welcome
Julius
has left the room
Mark M.
any other questions?
4:55 PM
fitz
thanks for today see ya next time
fitz
has left the room
scottt
none from me
5:00 PM
scottt
thanks, and have a great evening
Mark M.
you too!
scottt
has left the room
Mark M.
turned off guest access

Tuesday, February 22

 

Office Hours

People in this transcript

  • fitz
  • Julius
  • Mark Murphy
  • Matt R
  • scott keller
  • scottt
  • Suzanne Alexandra