Mark M. | has entered the room |
Mark M. | turned on guest access |
Aug 16 | 4:00 PM |
AngelOD | has entered the room |
Mark M. |
howdy, AngelOD!
|
AngelOD |
Heya :)
|
Mark M. |
how can I help you today?
|
AngelOD |
Lemme find it. I wrote down the question. :)
|
AngelOD |
I'm having a problem with menus and their IDs when
I inflate them using the MenuInflater. It used to work like it should,
but after I converted my project so that it uses fragments (and thus
supports Honeycomb devices as well) it no longer seems to work. I
inflate my menu using: getMenuInflater().inflate(R.menu.main, menu); --
This is called from the activity. I noticed some problems whenever I was
trying to make changes to the menu in onPrepareOptionsMenu(), so I
added some code to onCreateOptionsMenu() to see the various IDs. Here's
the code along with the output I get from it: http://pastebin.com/PjuFkikU -- Obviously something is wrong, and I assume it's something I've done wrong, but I can't figure out what that would be.
|
AngelOD |
I've checked the main.xml file to make sure I'm using the correct IDs and everything, of course.
|
Mark M. |
whenever you run into resource ID issues, the first thing to do is clean the project
|
Mark M. |
that's Project | Clean from the Eclipse main menu
|
Mark M. |
or ant clean from the command line
|
AngelOD |
I deleted the R-file.. But I'll try the other one. Hold on. :)
|
fitz | has entered the room |
Mark M. |
deleting the R file isn't sufficient
|
fitz |
hello
|
Mark M. |
howdy, fitz!
|
fitz |
so opinion on Google/Moto?
|
Mark M. |
AngelOD: the problem is that R.id.foo actually gets inlined in the bytecode
|
fitz |
good | Bad | Ugly ...
|
Mark M. |
cleaning the project removes the precompiled classes
|
Aug 16 | 4:05 PM |
Mark M. |
fitz: what was that one Magic 8-Ball value? "Future appears murky"?
|
AngelOD |
Thanks! That did the trick. Sheesh.. One would
think I would have figured that one out on my own. I wonder what went
wrong, but as long as it works, I'm happy. :)
|
fitz |
I think it is a good thing - best to have patents and maybe G-TV will happen
|
Mark M. |
yeah, when I did my development at the command line, I'd always do ant clean install, just to be sure
|
AngelOD |
I think I'll do a routine clean as well from now on, just to be sure. :)
|
Mark M. |
fitz: what's unclear is how other device manufacturers will react (beyond the sound-bite press quotes)
|
fitz |
so is it true that next version of android will
make the cell and tablet transparent - one code works for all or is it
still going to be device unique
|
Mark M. |
Ice Cream Sandwich is supposed to unify tablets and phones
|
Mark M. |
akin to how iOS 3.0 was for phones, iOS 3.2 was for tablets, and iOS 4.0 was for both
|
fitz |
Ice Cream Sandwich sound like magic - don't know how they plan on doing that
|
Mark M. |
well, it won't all be the same
|
Mark M. |
for example, a comment from Dianne Hackborn
suggests that ICS phones will still have dedicated off-screen
buttons/soft keys for HOME, BACK, etc.
|
fitz |
so is it best to wait on dev for tablets for now
|
AngelOD |
I'm assuming developers will have to use fragments for different screen sizes just as they do now. :)
|
Mark M. |
so there will be no system bar and will retain the Gingerbread status bar
|
Mark M. |
AngelOD: in all likelihood, yes
|
Aug 16 | 4:10 PM |
Mark M. |
fitz: if you're designing around fragments, it should all "just work" when ICS comes around
|
Mark M. |
then again, I've been wrong before with projections of new Android releases
|
fitz |
ok will keep in mind thanks
|
fitz |
so now they start to take out the carriers one at a time?
|
Mark M. |
they who they?
|
fitz |
Apple/Google?MS
|
Mark M. |
define "take out", then
|
fitz |
Apple/Google/MS take out ATT, Verizon etc.
|
fitz |
buy them
|
Mark M. |
oh, probably not
|
Mark M. |
I;d think the carriers' market caps are a little steep for that
|
fitz |
ya but with Apple cash hord ....
|
Mark M. |
though perhaps not
|
Mark M. |
Sprint is around $14.5 billion
|
AngelOD |
Anyway, I'll get going. It was the only problem I
had, and I'm otherwise quite engrossed in programming these days, so
I'll get back to that. :)
|
Mark M. |
ok, see you later!
|
fitz |
ya jetting as well thanks cya
|
AngelOD |
Thanks once again. Both for the help as well as for the awesome books. :)
|
fitz |
your out next week?
|
Mark M. |
you are very welcome!
|
Mark M. |
next week I'm in Oslo
|
Mark M. |
sleep may be in short supply
|
Mark M. |
so I do not have any chats scheduled
|
Mark M. |
sorry
|
Aug 16 | 4:15 PM |
fitz |
nice va-ca or work
|
AngelOD |
Oooh. Not too far from where I live then (but still too far to just pop by). I live in Denmark. :)
|
Mark M. |
work, teaching an Android course
|
Mark M. |
AngelOD: when I taught in the Malmo/Lund area, I used to fly into Copenhagen
|
fitz |
nice have some fun then
|
fitz | has left the room |
AngelOD |
Cool! :) I live in the opposite end of Denmark,
though, but the country -is- quite small. Can get from here to
Copenhagen in 5-6 hours, after all. :)
|
Aug 16 | 4:30 PM |
AngelOD | has left the room |
Aug 16 | 5:00 PM |
Mark M. | turned off guest access |