May 22 | 3:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
May 22 | 4:10 PM |
Mickey M. | has entered the room |
Mark M. |
hello, Mickey!
|
Mark M. |
how can I help you today?
|
Mickey M. |
Hi Mark
|
Mickey M. |
So here's my situation
|
Mickey M. |
I've pulled the RadialTimePicker code out of AOSP and I've integrated it into my project
|
Mickey M. |
and using the provided TimePickerDialog, it works wondeful
|
Mickey M. |
What I'm trying to do is adapt it as a DialogPreference
|
Mickey M. |
and I've been successful at that to
|
May 22 | 4:15 PM |
Mickey M. |
except the display of the dialog preference
|
Mickey M. |
I have some screen shots
|
Mickey M. | |
Mickey M. |
so that's the working TimePickerDIalog
|
Mickey M. | |
Mickey M. |
that's the time picker preference -- see the width of the dialog box?
|
Mark M. |
yes
|
Mickey M. |
is there any way I can access the dialogpreference dialog box to make it the correct size instead of defaulting to whole-screen with the padding
|
Mark M. |
you can call getDialog()
|
Mark M. |
whether that will let you affect your change, I cannot say
|
Mark M. |
have you used Hierarchy View to try to get a sense of what is driving the width that it is using?
|
Mickey M. |
I have looked at the hierachy viewer
|
Mickey M. |
let me quickly pull that up again
|
May 22 | 4:20 PM |
Susheel C. | has entered the room |
Susheel C. |
Hello
|
Mickey M. |
the layout starts with its width being MATCH_PARENT as the unnamed node before id/content
|
Mark M. |
hello, Susheel!
|
Susheel C. |
Whenever you are ready Mark
|
Mark M. |
Mickey: OK, I'm not sure you're going to be able to do much about that, though you're welcome to try, again via getDialog()
|
Mark M. |
have you tried this on a tablet (or tablet-y emulator)?
|
Mickey M. |
I'll play more with getDialog(), I'm pretty sure I tried that route, but I'll look at it again.
|
Mickey M. |
actually, funny you mention that. this is a screenshot from my Nexus 7
|
Mickey M. | |
Mark M. |
Mickey: hmmmm... yeah, that's not good
|
Mickey M. |
so you can see that the dialog preference dialog box is what's driving the width
|
Mark M. |
you might also compare and contrast your preference with other DialogPreference implementations that do not share the same visual effect
|
Mark M. |
because I don't recall EditTextPreference and kin being that wide on a tablet
|
Mickey M. |
Good idea.
|
May 22 | 4:25 PM |
Mark M. |
let me take a question from Susheel, and I'll be back with you shortly
|
Mark M. |
Susheel: your turn! do you have a question?
|
Susheel C. |
Yes...is it possible to make a 3d button in android using xml properties alone?
|
Mark M. |
what do you mean by a 3d button?
|
Susheel C. |
sorry...a button that looks like a 3d one...that actually gives the effect of moving up and down when you push and release it...
|
Mark M. |
well, you can try playing around with a custom StateListDrawable, with "3d" images to your liking for the appropriate states
|
Mark M. |
I'm skeptical that it will look all that credible
|
Susheel C. |
ok
|
Mark M. |
and the mobile industry seems to be moving to a flat UI anyway
|
Susheel C. |
I see
|
Susheel C. |
Thanks for your help Mark
|
Mark M. |
Mickey: back to you
|
Mickey M. |
well, I was just looking at the source for edittextpreference
|
Mark M. |
what constructor(s) do you have defined for your DialogPreference?
|
Mickey M. |
public TimePreference(Context context, AttributeSet attrs)
|
May 22 | 4:30 PM |
Mickey M. |
and the meat of the dialog is built in onCreateDialogView()
|
Mark M. |
you might give this a shot: http://stackoverflow.com/a/23432239/115145
|
Mickey M. |
but, I have a onBindDialogView(View view) that I might be able to pull the container out of
|
Mickey M. |
like this in the EditTextPreference:
|
Mickey M. |
View paste
|
Mark M. |
ick
|
Mark M. |
possibly necessary, but ick
|
Mickey M. |
I'll give that SO page a gander and see what I can do. looks like it's pulling a theme into the super's constructor
|
Mark M. |
right
|
Mickey M. |
I'm fortunate that at least the dialogpreference works
|
Mickey M. |
and it's all just display issues.
|
Mickey M. |
Well, Mark, I appreciate your time and insights on things. I at least have somethings to look into now.
|
Mickey M. |
I'll be sure to come back and let you know how things go.
|
Mark M. |
OK, sounds good
|
Mark M. |
Susheel: do you have another question?
|
Mickey M. |
Thank you, and have a great day!
|
Mickey M. | has left the room |
May 22 | 4:40 PM |
Mark M. |
Susheel: if you have another question, go right ahead
|
May 22 | 4:50 PM |
Susheel C. | has left the room |
May 22 | 5:00 PM |
Mark M. | turned off guest access |