Office Hours — Today, September 13

Tuesday, September 11

Sep 13
7:15 PM
Mark M.
has entered the room
Mark M.
turned on guest access
Mark M.
has entered the room
Mark M.
has left the room
7:25 PM
Ben K.
has entered the room
Mark M.
howdy, Ben!
how can I help you today?
Ben K.
I have a couple questions, first is one about the Menu. Is there a way to hide the menu for a particular screen in Honeycomb and above, I know it's deprecated
Or changed to action bar
Mark M.
I am confused
what do you mean by "hide the menu"?
Ben K.
Well make it so the action bar isn't visible at all
Mark M.
oh
well, you would do that the same way that you hide the title bar in pre-Honeycomb
e.g., use Theme.NoTitleBar (or, I guess, Theme.Holo.NoTitleBar)
Ben K.
Ok I see.
I don't know if that's available in 2.2?
7:30 PM
Mark M.
Theme.NoTitleBar is
Ben K.
Ok thanks
Mark M.
it's actually Theme.Holo.NoActionBar for API Level 11+
Ben K.
Ok thanks! My second question is about drawables.. I'm using a FrameLayout to overlay one drawable on top of another, but the drawables stretch in some cases.
Mark M.
are you putting the drawables in ImageViews, or are you doing something else?
Ben K.
Yes
Mark M.
how are you specifying the sizes of the ImageViews?
Ben K.
I'll check
layout_width is warp_content and layout_height is match_parent
Mark M.
OK
7:35 PM
Ben K.
Maybe layout_height should be wrap_content now that I'm looking at the code
Mark M.
either that, or provide an appropriate scaleType
Ben K.
The ImageView is part of a ListView item.
Mark M.
e.g., android:scaleType="center"
that should not matter
though then your problem is how you are specifying the size of the FrameLayout
Ben K.
I'll check
Mark M.
regardless, if an image is being stretched, it's because that's what Android thinks you want
if you do not want it stretched, you either need to use android:scaleType to control that behavior, or get the sizes right
Ben K.
Ok
I guess I am using a layer-list, not a FrameLayout, sorry
Mark M.
OK
a layer-list is designed for images with the same size AFAIK
(leastways, that's how I see it used)
Ben K.
I see
Mark M.
so, then the issue is what you are putting the layer-list into, and whether it is the right size, etc.
it's conceivable that layer-list works for disparate sizes
but I have no idea what to expect there off the cuff
7:40 PM
Ben K.
It works but when I offset one image the other stretches
Mark M.
yeah, beats me
Ben K.
I'll see what I can do given what you've told me.
My third (and final I think) question is: Is there a way to query the Play Store for an application that can open a particular mime-type?
Mark M.
alas, no
I've toyed with trying to build my own database for that, culled from developer submissions
Ben K.
It would be nice to query that and display a list of applications that can open a file, with a link to them
Mark M.
absolutely
my vision was to tie the database to an improved "chooser" dialog
one that would show installed apps *and* matches from the Play Store (or whereever)
Ben K.
Yeah that would be great
Mark M.
I may give it a shot someday -- getting enough developers to join would be the challenge
7:45 PM
Ben K.
I'd think they would want to because it would give them wider distribution
Mark M.
agreed
Ben K.
Well thanks for your time, are these transcripts still being sent out?
Mark M.
visit http://commonsware.com/office-hours for the roster of transcripts
Ben K.
Ok, thank you
Mark M.
happy to help!
Ben K.
has left the room
7:50 PM
Pedro T.
has entered the room
Mark M.
howdy, Pedro!
how can I help you today?
Pedro T.
Hi!
Mark M.
how can I help you today?
Pedro T.
I'm relatively new to Android and I'm starting developing on a project using the Android.media.facedetector library, to isolate the face and replace it on a template image
Mark M.
I have never used that particular library
7:55 PM
Pedro T.
so, i was thinking on approachs to isolate the face
the library allows me to calculate the position of the eyes throught the library
that comes with google 4.0.4
and the nose can be calculated to
so I was looking for ideas to work on in order to process the bitMap to isolate the face or at least the most of the face
Mark M.
I am sorry, but I have no experience in this area
Pedro T.
hooo, so sad!!
Mark M.
I have never done anything much with image processing, unless it was *completely* done by a library
8:00 PM
Mark M.
and I have never tried doing image processing on Android
Pedro T.
hoo I see
Ben K.
has entered the room
Mark M.
hello, again, Ben!
Ben K.
Hello
Mark M.
Pedro: do you have another question, perhaps one that I can answer? :-)
Pedro T.
Bye mark I'll see on another office hour chat byee
thanks for your help
Mark M.
OK
Ben: do you have another question?
Pedro T.
for now no... maybe when i get further on the book
Ben K.
Yes, I checked and I have the Theme.NoTitleBar set in the application tag in the manifest. I'm trying to get rid of the action bar (three dots in a vertical line) soft key. Is this possible?
Mark M.
that is the menu overflow affordance
what is your android:targetSdkVersion set to?
Ben K.
8
Mark M.
that's your problem
you will need at least 11
8:05 PM
Mark M.
and probably all the way to 14
Ben K.
Ok
Great!
What are the implications of raising the target sdk?
Mark M.
ummm... well...
11 and higher gives you the holographic widget theme by default
(though Theme.NoTitleBar will probably turn that off and give you the legacy widget theme)
you would ordinarily have an action bar with 11 or higher, but you are disabling that
your AsyncTasks will be single-threaded on Android 3.2 and higher devices if you use 14
(use 14 for your targetSdkVersion, that is)
Ben K.
Ok
It won't affect compatibility with 2.2 devices
?
Mark M.
no
2.2 will see a targetSdkVersion of 14, shrug its shoulders, and ignore it
targetSdkVersion opts you into some changed behavior on newer devices, but does not affect older devices
Ben K.
I see
Ok well that's great, thanks!
8:10 PM
Ben K.
Have a good evening.
Mark M.
you too!
Ben K.
has left the room
Mark M.
Pedro: if you come up with another question, feel free to ask
8:20 PM
Pedro T.
has left the room
8:25 PM
Mark M.
has entered the room
Mark M.
has left the room
Mark M.
turned off guest access

Tuesday, September 11

 

Office Hours

People in this transcript

  • Ben K
  • Mark Murphy
  • Mark Murphy
  • Pedro Teran