Jun 7 | 9:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Jun 7 | 10:15 AM |
Frank S. | has entered the room |
Frank S. |
Hi Mark
|
Jun 7 | 10:20 AM |
Frank S. |
Are you there?
|
Mark M. |
howdy Frank!
|
Mark M. |
sorry, missed the chime in the browser
|
Mark M. |
how can I help you today?
|
Frank S. |
First I wanted to say thanks for your help with
the mobile class at FSU and you answered a question on stack overflow
for my the other day :)
|
Frank S. |
So I have 2 questions
|
Mark M. |
you are welcome on both counts
|
Frank S. |
My first issue is 9patch related. We have a sudo
sliding drawer implementation. It's basically a view that when you click
it expands only about 1/4 of the screen to display some more views
|
Frank S. |
however, the background isn't really sized properly so it looks like the drawer is partially open
|
Mark M. |
I think you mean "pseudo", unless your sliding drawer really executes commands as su
|
Mark M. |
:-)
|
Frank S. |
lol
|
Jun 7 | 10:25 AM |
Frank S. |
There is only one piece that I would like to keep in scale while the rest needs to strech.
|
Frank S. |
I guess after saying it out loud I need to just
cut down the image size. But I suppose my problems lie in actually
understanding the 9patch tool
|
Frank S. |
I know the pixels on the top and left edge
perserve the ratio of the intersection, but I never really understood
what the pixels on the right and bottom do.
|
Mark M. |
they define the "padding box"
|
Mark M. |
basically, the "content" of the widget (e.g., text in a Button) must remain inside the "padding box"
|
Mark M. |
pixels outside the "padding box" are built-in padding dictated by the 9-patch
|
Mark M. |
this is why the question of "how do I make my
Button smaller" results in a really annoying answer, involving redoing
all the 9-patches for all the background states and rolling those into
your own custom StateListDrawable
|
Jun 7 | 10:30 AM |
James | has entered the room |
James |
Hi all
|
Mark M. |
howdy, James!
|
Mark M. |
Frank: let me take a question from James, and I can swing back later for your 2nd question or follow-up on the first
|
Frank S. |
ok. That helps clear that up. That explains why I always see lines and not dots on along those edges
|
Frank S. |
ok
|
Mark M. |
James: do you have a question?
|
James |
Sure. Do you have any experience with the android backup service?
|
Mark M. |
in a manner of speaking
|
James |
ah! good
|
James |
The docs state this: 'Data backup is not guaranteed to be available on all Android-powered devices'
|
Mark M. | |
Mark M. |
actually, not good
|
Mark M. |
and that's one of the reasons for "not good"
|
James |
ha
|
James |
ok
|
Mark M. |
I *think* all devices with the Play Store and related infrastructure will have access to a backup service
|
James |
that was what i was concerned about. what does it actually mean? Any examples (obviously, I've not read your article yet)
|
Mark M. |
but that would leave out the Kindle Fire, NOOK series, etc.
|
James |
yeah, that's what i assumed
|
James |
but assumption...
|
Mark M. |
and, as I point out in my blog, we don't actually know *where* the backup service might go to
|
James |
I'm only interested in persisting a value across uninstalls, really
|
Mark M. |
actually, I don't think it works for that scenario at all
|
Jun 7 | 10:35 AM |
Mark M. |
AFAIK, it is for major calamities (e.g., user drops phone in bathtub)
|
Mark M. |
where they get the app again after the factory reset/buy a new phone/whatever
|
James |
ah
|
Mark M. |
I will be rather surprised if you can use it for persisting data across an uninstall
|
James |
i totally misread its usage
|
Mark M. |
that being said, I haven't tried it that way, and so perhaps it works
|
Mark M. |
since that would result in truly unbounded data
storage requirements on the backup service, I would be nervous that even
if it works now, they might drop it in the future
|
James |
i guess i'll have to give it a go
|
James |
good point
|
James |
it does seem a rather unexplained, shall we say, feature
|
Mark M. |
IMHO, I would only use it for "backing up" a URL to a *real* backup held elsewhere
|
Mark M. |
so you could integrate it as part of a larger backup strategy
|
Mark M. |
yet still take advantage of auto-restoration on a reinstall
|
Mark M. |
I expect that I'll be working on this pattern in the next 6-9 months
|
James |
this is the thing, i don't really have that option. i'm just limited to working within the device
|
Mark M. |
let me swing back to Frank, and we can follow up more in a bit
|
James |
sure
|
Mark M. |
Frank: do you have another question?
|
Frank S. |
It there a way to implement your own set of RadioGroup items?
|
Jun 7 | 10:40 AM |
Mark M. |
I am not quite certain what you mean
|
Frank S. |
For example, I want to use textviews as radio items and bold the text when they are selected
|
Mark M. |
oh
|
Frank S. |
I have a working implementation, but it just doesn't seem nice.
|
Mark M. |
um, I suspect that the RadioGroup implementation will at least expect a CompoundButton, if not a full-fledged RadioButton
|
Mark M. |
I'll be fairly stunned if RadioGroup can somehow work with arbitrary TextViews
|
Mark M. |
it's not the most flexible implementation
|
Mark M. |
I recall once considering writing a CompoundButtonGroup, to at least break the dependency on RadioButton
|
Frank S. |
I ended up using real radio button and removing
the icon and setting custom font, but the real problem is that I found
myself "looping" over everything to see if it was checked or not in
order to reset the font
|
Mark M. |
for that, you are probably better served just having your own "group" construct, rather than fighting RadioButton and RadioGroup
|
Mark M. |
but, regardless, I am not aware of anything built into Android that would handle your scenario
|
Mark M. |
let's swing back to James for a bit
|
Frank S. |
Ok. Well that at least makes me feel better about my implementation.
|
Mark M. |
James: do you have another question?
|
James |
not really. just specifically related to 'how do i
know if this user has installed this app before', hence the backup
service question
|
Mark M. |
you are welcome to tuck something onto external storage and hope the user does not remove it
|
Jun 7 | 10:45 AM |
Mark M. |
beyond that, there is no purely on-device solution
|
James |
yeah, that's the only option i've got
|
James |
ok then. thanks a lot for your time!
|
Frank S. |
We've actually done this before and our solution was of course the cloud.
|
Mark M. |
James: could you tie your device to a weather balloon and attempt to fly it into a cloud?
|
Mark M. |
:-)
|
Mark M. |
Frank: do you have another question?
|
James |
yeah, i think some manufacturer's devices should come with their own balloons so that i don't see them again... ;-)
|
James |
cheers all
|
James | has left the room |
Frank S. |
No. Not at this time. Just tons of problems with
image resizing because all my graphics were cut for iOS and none of them
are 9patched
|
Mark M. |
yeah, somebody should cook up a utility that takes a PNG and adds the one-pixel-wide frame to it
|
Mark M. |
AFAIK, draw9patch assumes that frame is there
|
Frank S. |
yep. I've had that problem several times already and much in the past as well
|
Jun 7 | 10:50 AM |
Mark M. |
if you think of another question, chime in
|
Frank S. |
ty
|
Jun 7 | 11:00 AM |
Mark M. |
well, that's it for today's chat
|
Mark M. |
next one is Tuesday, 7:30pm Eastern
|
Mark M. |
have a pleasant day!
|
Frank S. |
thanks mark. I'll be on more since I'm not teaching this summer
|
Frank S. |
Laters
|
Frank S. | has left the room |
Mark M. | turned off guest access |