Feb 28 | 7:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Kevin M. | has entered the room |
Feb 28 | 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
|
Mark M. |
been waiting on the backwards-compatibility library Ms. Hackborn and others are working on
|
Kevin M. |
I figure I better learn it
|
Kevin M. |
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:
|
Kevin M. |
I'm using Intellij and it doesn't recognize "fragment" in the xml file. Why is it lower case?
|
Kevin M. |
(it compiles ok)
|
Mark M. |
I think they use lowercase for things that aren't Views (e.g., <merge>)
|
Mark M. |
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
|
Feb 28 | 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
|
Kevin M. |
Got it now
|
Mark M. |
I cover hierarchyviewer in _The Busy Coder's Guide to Android Development_, in the tools chapter towards the back
|
Mark M. |
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.
|
Kevin M. |
I noticed a new version of your book
|
Mark M. |
yeah, hierarchyviewer will show you width, height, X/Y position, and stuff
|
Mark M. |
yes, 3.5 was released on Saturday
|
Mark M. |
starts in on Honeycomb coverage, mostly action bar
|
Kevin M. |
Cool. Just what I need
|
Julius | has entered the room |
Mark M. |
howdy, Julius!
|
Feb 28 | 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
|
Julius |
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
|
Mark M. |
setShowAsAction() equates to android:showAsAction
|
Julius |
but they might not be available for older versions of the AIP?
|
Julius |
AIP
|
Mark M. |
setActionView() equates to android:actionView
|
Julius |
API
|
Mark M. |
no, they definitely are not
|
Mark M. |
using XML resources means you don't have to worry about it too much
|
Julius |
it seems like the xml is backwards compatible
|
Julius |
though
|
Julius |
right
|
Julius |
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
|
Julius |
er c2dm
|
Julius |
(for me)
|
Julius |
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
|
Calvin |
and I am able to populate both
|
Feb 28 | 8:15 PM |
Calvin |
but then the spinner.setAdapter(aa) code
|
Calvin |
would empty the ListView
|
Calvin |
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
|
Mark M. |
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
|
Calvin |
sub class ArrayAdapter
|
Calvin |
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
|
Calvin |
lemme check that
|
Feb 28 | 8:20 PM |
Calvin |
so the adapters are using different ArrayLists
|
Calvin |
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
|
Calvin |
thanks for the time
|
Calvin |
have a good night
|
Calvin | has left the room |
Feb 28 | 8:30 PM |
Kevin M. | has left the room |
Mark M. |
Kevin: do you have another question?
|
Feb 28 | 8:55 PM |
Mark M. | turned off guest access |