Office Hours — Today, February 28

Thursday, February 24

Feb 28
7:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
Kevin M.
has entered the room
8:00 PM
Mark M.
howdy, Kevin!
Kevin M.
Hi there
Mark M.
how can I help you today?
Kevin M.
I'm trying to understand the Honeycomb Fragments
Mark M.
yeah, I haven't dived into them too much yet
been waiting on the backwards-compatibility library Ms. Hackborn and others are working on
Kevin M.
I figure I better learn it
I'm trying to build an app piece by piece to make sure I understand it
Mark M.
what specific questions do you have about them?
Kevin M.
A couple of items:
I'm using Intellij and it doesn't recognize "fragment" in the xml file. Why is it lower case?
(it compiles ok)
Mark M.
I think they use lowercase for things that aren't Views (e.g., <merge>)
as to why IntelliJ IDEA does not recognize it, they're probably not up to speed on Android 3.0 yet
Kevin M.
I've got a list fragment and an edittext in another xml file. The edit text doesn't show up
Mark M.
have you used hierarchyviewer to track down the EditText?
Kevin M.
No. How do I start that?
Mark M.
if you're using IDEA, I think you'll have to use the command-line -- there is hierarchyviewer in your SDK's tools/ directory
8:05 PM
Mark M.
it's also possible that you will need to close down IDEA when you are doing this check -- not sure of IDEA and hierarchyviewer will fight over access to the debugging port
Kevin M.
It came up with a text view of the emulator
Mark M.
I don't understand -- what is "it" and what is "a text view of the emulator"/
Kevin M.
Never mind. It just hand a list of programs
Got it now
Mark M.
I cover hierarchyviewer in _The Busy Coder's Guide to Android Development_, in the tools chapter towards the back
Yes, it should list "windows", which roughly equates to "processes with an activity in RAM"
Kevin M.
Ok. The editText is there. Probably just doesn't have anything to show.
I noticed a new version of your book
Mark M.
yeah, hierarchyviewer will show you width, height, X/Y position, and stuff
yes, 3.5 was released on Saturday
starts in on Honeycomb coverage, mostly action bar
Kevin M.
Cool. Just what I need
Julius
has entered the room
Mark M.
howdy, Julius!
8:10 PM
Julius
hi
Mark M.
Julius: do you have a question?
Julius
yeah
Calvin
has entered the room
Julius
Uh currently I have no xml resource defined for my menu items
if I wanted to Honeycombise my menus (into the Action bar) do I need to create these? (I'm guesisng I do looking at your documentation)
Mark M.
no, MenuItem has relevant methods
setShowAsAction() equates to android:showAsAction
Julius
but they might not be available for older versions of the AIP?
AIP
Mark M.
setActionView() equates to android:actionView
Julius
API
Mark M.
no, they definitely are not
using XML resources means you don't have to worry about it too much
Julius
it seems like the xml is backwards compatible
though
right
cool
Mark M.
if you want to stick to Java, you will need to do tricks like I document to isolate the API Level 11 code
Julius
yeah that seems to be the next thing for using push
er c2dm
(for me)
thanks
Mark M.
Calvin: do you have a question?
Calvin
yes a UI one
Julius
(thanks for the update - really great!)
Calvin
I have a spinner and ListView on an activity
and I am able to populate both
8:15 PM
Calvin
but then the spinner.setAdapter(aa) code
would empty the ListView
sorry for being sparse but do you need more info?
Mark M.
you cannot simultaneously use the same adapter for a ListView and a Spinner
and, you cannot simultaneously use the same Cursor for two different CursorAdapters
Calvin
they are different adapters
Mark M.
are they CursorAdapters on the same Cursor?
Calvin
custom adapters
sub class ArrayAdapter
with ArrayList of Custom objects as data source
Mark M.
are both adapters using the same ArrayList? I would not expect that to be a problem, but perhaps it is
Julius
has left the room
Calvin
also the spinner and listviews are on TabHost
lemme check that
8:20 PM
Calvin
so the adapters are using different ArrayLists
sorry No the adapters are using dirrent ArrayLists
Mark M.
I have no idea why calling setAdapter() on a Spinner for one ArrayAdapter on one ArrayList would affect a ListView set up for a completely different ArrayAdapter on a completely different ArrayList
Calvin
k
Mark M.
sorry
Calvin
np
Mark M.
Kevin: do you have another question?
Calvin
got to be in it to win it
thanks for the time
have a good night
Calvin
has left the room
8:30 PM
Kevin M.
has left the room
Mark M.
Kevin: do you have another question?
8:55 PM
Mark M.
turned off guest access

Thursday, February 24

 

Office Hours

People in this transcript

  • Calvin
  • Julius
  • Kevin Moore
  • Mark Murphy