Office Hours — Today, July 5

Thursday, June 30

Jul 5
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
Matthew R.
has entered the room
Matthew R.
Hello
Mark M.
howdy, Matthew!
4:00 PM
Mark M.
how can I help you today?
Matthew R.
I've got myself confused with using multitouch
Mark M.
I doubt I'll be able to help on that, but go ahead
Matthew R.
I've been grabbing the pointer index using: (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT;
and I grab the id with event.getPointerId(pointerIndex);
but when getting the X and Y values from the event with this id, the values sometimes differ from ACTION_POINTER_DOWN and ACTION_POINTER_UP with the same id
Dimitri
has entered the room
Mark M.
Matthew: yeah, you're way out of my depth
Dimitri
Hi Mark
Mark M.
I haven't played with touch events much, let alone multitouch
(btw, howdy, Dmitri!)
Matthew R.
no problem, would be a great addition to your examples / book if you get the time ;)
Mark M.
have you tried asking about this on StackOverflow?
Matthew R.
I will do now
Mark M.
I won't get to multitouch until 2012 or so
Dimitri
I have a question for you: what's the behavior if I put a 150x100 images in a "drawable" directory (not drawable-*)
Mark M.
too many topics, too little time
Matthew R.
could be a hardware thing... dont know how good the xoom is at differentiating points
no prob
4:05 PM
Mark M.
Dmitri: the behavior is that you have 150x100 images as drawable resources
AFAIK, they will not be scaled or anything
I have not run experiments to confirm my guess that res/drawable/ and res/drawable-nodpi/ are equivalent
Dimitri
Ok, and what would be the use? I sometimes see in sample code/tutorial that some images are stored in this directory
Mark M.
you would use them the same as you would any other drawable
now, a good app would have different versions, or at least put them in a density-dependent directory, so they'd scale
however, those directories did not exist until Android 1.6
Matthew R.
It's a requirement for backwards compatibility in 1.5
Mark M.
so older tutorials/samples would not have them
Dimitri
"a good app"... yeah but even Google own code has some images in /drawable
Mark M.
and, in the case of _Android Programming Tutorials_, I just haven't settled on how I want to teach it
Matthew R.
if you don't include it, your app will crash when trying to get the drawable in 1.5
Mark M.
also, resources in res/drawable/ are fine for things that are intrinsically scaleable (e.g., ShapeDrawable, nine-patch PNGs)
Dimitri
I was just wondering why would someone do that instead of putting in in "-hdpi" for example
Mark M.
I think the right long-term answer is for ShapeDrawable and kin to go in res/drawable-nodpi/
AFAIK, res/drawable/ behaves the same, but is backwards-compatible, as Matthew notes
4:10 PM
Mark M.
oh, no, wait
4:10 PM
Mark M.
res/drawable-nodpi/ would be for bitmaps that specifically should not get scaled, for whatever reason
res/drawable/ would be for the ShapeDrawable, etc.
so, if you look at the resources that ship with your SDK, res/drawable/ is mostly *.xml files
(where by "mostly" I mean "entirely", as it seems)
those are ShapeDrawable, LevelListDrawable, StateListDrawable, etc.
Dimitri
Yes, I undestand all that... It just that I see *.png in /drawable in the Android source code and I was wondering why they aren't in -hdpi or -ldpi
Mark M.
legacy, presumably
Dimitri
:) Yes, that would make sense... :)
Matthew R.
I've included stuff in there for open-gl programs as I'm scaling them myself, should they go in no-dpi instead?
Dimitri
ok, thanks for clarifying things up!
Mark M.
Matthew: well, if it's working as-is, I'd leave it alone
however, quoting the docs:
"Tip: If you have some drawable resources that the system should never scale (perhaps because you perform some adjustments to the image yourself at runtime), you should place them in a directory with the nodpi configuration qualifier. Resources with this qualifier are considered density-agnostic and the system will not scale them."
Matthew R.
if it aint broke don't fix it
Mark M.
the fact that res/drawable/ images don't seem to be scaled automatically is why I presume that, for ordinary .png files, res/drawable/ and res/drawable-nodpi/ are equivalent
4:15 PM
Mark M.
Matthew: do you have another question?
Matthew R.
not yet
Mark M.
OK
Dmitri: over to you -- do you have another question?
Dimitri
I'm fine! :)
Mark M.
if either of you come up with a question, chime in!
Matthew R.
are you doing a talk at droidcon this year?
Mark M.
if you mean droidcon UK, I don't know
we're discussing it
Matthew R.
cool, hope you do
Mark M.
well, actually, we started discussing it, and I haven't heard back in a while
the problem is that I'm already committed to speaking at the Android Open conference (O'Reilly) the following Sun-Tue
in San Francisco
which is a trifle far from London
Matthew R.
ah
Mark M.
anyway, we'll see
4:20 PM
Matthew R.
at last years you were talking about a app aggregation thing
has that progressed at all?
Mark M.
um, well...
see, as I tried to emphasize in the talk, I didn't have the itch to scratch -- it was more of an itch I was aware of and felt like leading a barcamp session on
before realizing that "barcamp session" would turn into "ad-hoc presentation in front of a decent-sized crowd"
anyway, I led some design discussions, but, because I didn't have the itch to scratch, I kinda let it go, and momentum petered out
with luck, if my plans hold, I will have that itch myself in 2012
Matthew R.
ah ok
Mark M.
so, if there's no solution by that time, I'll attack it in earnest
Matthew R.
awesome
It seems I get one email per week from a new app store opening up claiming to be the next best thing
Mark M.
yeah, they spring up like weeds
and even the big names have their problems -- the Apparatus story sure made the rounds
Amazon didn't look too good based
Matthew R.
yeah well lots of people anticipated that once they read the amazon small print
Mark M.
er, based on what the Apparatus team wrote
yeah, those terms were scary
4:25 PM
Mark M.
I think I even blogged about it
of course, I also see Amazon from the book publishing side, so I know how they interact with small publishers (answer: using large hammers)
Matthew R.
haha
Mark M.
that's one of the reasons I have to chuckle when I hear people tout Amazon's developer support compared to Google's
it's great that Amazon provides people to talk to app developers, 'cause small publishers don't get that level of assistance
oboy, Dianne just got assigned my BOOT_COMPLETED issue
Matthew R.
lol
she seems like a bit of a ball buster
Mark M.
like most people, she has a range of responses
I'm just hoping for one that indicates I'm not a complete idiot
4:30 PM
Matthew R.
think your in better stead than the rest of us
Mark M.
thanks! I think...
:-)
Matthew R.
yup, you're a beast
Mark M.
naw
beasts have more hair
4:45 PM
Matthew R.
right posted my stackoverflow question, hopefully that'll get it fixed :)
4:50 PM
Mark M.
just up-voted your question
SO has a pretty good track record of getting answers to questions, so there's good odds that you'll get help
Matthew R.
yeah, been very useful so far
thanks
4:55 PM
Mark M.
running out of chat time -- any final questions?
Matthew R.
uhm, longshot but do you know anything with whats going on with the comments on the web store
Mark M.
in terms of what?
Matthew R.
they're not in chronological order and many are missing
Mark M.
oh
no, I don't know anything about that
other than it sounds like just another day at the office
:-(
Matthew R.
lol
think someone predicted they were trying to arrange them in order of helpfulness
Mark M.
I'm impressed that the service isn't flat-out down much, but they have more screwy problems like this than I would expect
Matthew R.
but not doing a good job looking at my apps :(
5:00 PM
Matthew R.
anyway thanks for all your help :)
Mark M.
that's what I'm here for
next chat is Thursday, 10am Eastern
have a pleasant day, evening, or whatever!
Matthew R.
thanks
goodnight/day
Matthew R.
has left the room
Dimitri
has left the room
Mark M.
turned off guest access

Thursday, June 30

 

Office Hours

People in this transcript

  • Dimitri
  • Mark Murphy
  • Matthew Rollings