Apr 2 | 9:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Apr 2 | 10:00 AM |
Kadrov N. | has entered the room |
Kadrov N. |
Hi
|
Mark M. |
hello, Kadrov!
|
Mark M. |
how can I help you today?
|
Mark M. |
Kadrov: do you have a question?
|
Kadrov N. |
Do you know any easy to implement ways to make
gift codes system for application? My application is free with in-app
purchase for unlocking PRO version.
|
Mark M. |
sorry, but I have never used the in-app purchasing system
|
Kadrov N. |
I need this functionality to say thanks to my beta testers
|
Apr 2 | 10:05 AM |
Mark M. |
you might try asking this on StackOverflow, or if there is a Google Group dedicated for the in-app purchasing stuff
|
Kadrov N. |
ok, thanks
|
Mark M. |
sorry that I could not be of greater help on that question
|
Mark M. |
if you have other questions (not related to in-app purchases), feel free to ask -- nobody else is in the chat room presently
|
Apr 2 | 10:20 AM |
Kadrov N. | has left the room |
Apr 2 | 10:45 AM |
Andrew G. | has entered the room |
Mark M. |
hello, Andrew!
|
Mark M. |
how can I help you today?
|
Andrew G. |
hi Mark
|
Andrew G. |
nowt too crowded today eh? :)
|
Mark M. |
another person was here earlier and left
|
Apr 2 | 10:50 AM |
Mark M. |
otherwise, yes, rather quiet
|
Andrew G. |
qjuick question, I am finally getting around to implementing my dialogs as Fragments
|
Andrew G. |
I'm setting up a custom DialogFragment since I want to make the layout appear a certain way
|
Andrew G. |
The dialog just consists of a TextView that I have styled appropriately
|
Mark M. |
meaning that you are using onCreateView()? or are you still creating a Dialog in onCreateDialog()?
|
Andrew G. |
onCreateDialog since I'm subclassing SherlockDialogFragment
|
Andrew G. |
so from onCreateDialog I inflate the XML and set it up etc
|
Mark M. |
FWIW, onCreateView() still works with SherlockDialogFragment AFAIK -- the resulting View is wrapped in a generic Dialog
|
Andrew G. |
problem is, after that creation, I need to set some new text in that text field from outside the class
|
Mark M. |
but your approach should be fine
|
Andrew G. |
I can't get a handle to it by any way I've tried
|
Mark M. |
you inflated the layout
|
Mark M. |
just find the TextView there and hold onto it in the SherlockDialogFragment
|
Mark M. |
(though you will need to watch out for
configuration changes, making sure you get the fresh TextView if/when
the dialog is re-created)
|
Andrew G. |
well, right now the TextView is local to the inner class (DialogFragment child)
|
Andrew G. |
doesn't have to be that way but can I just refer to it directly after I inflate it or do I have to do getFragment().findById?
|
Apr 2 | 10:55 AM |
Mark M. |
there is no findById() on the fragment IIRC
|
Mark M. |
you can call getDialog().findViewById() on your DialogFragment, though
|
Mark M. |
leastways, that should work -- haven't tried it
|
Andrew G. |
yeah I have tried the getDialog().findViewById() route but get a null back
|
Mark M. |
that's odd
|
Mark M. |
then I'd roll back to trying to hold onto the TextView after inflation
|
Andrew G. |
Honestly I don't fully understand the diferences
between manually inflating with a Layoutinflator vs using the
findVyewById of the root
|
Mark M. |
those are apples and oranges
|
Mark M. |
inflating a layout *creates* Views
|
Mark M. |
findViewById() *retrieves* Views that somebody else created, perhaps via inflation
|
Andrew G. |
by specifying a layout in the xml - do you need to inflate those layouts or are they considered already inflated?
|
Andrew G. |
I feel like I never use the LayoutInflator
|
Mark M. |
somebody, somewhere, is inflating layout XML resources
|
Mark M. |
setContentView(), for example, uses LayoutInflater under the covers
|
Andrew G. |
ah
|
Andrew G. |
that was the key I was missing
|
Mark M. |
yeah, any time there is a layout XML resource, somebody is using LayoutInflater
|
Andrew G. |
so if I wanted to do things with a laout specified
in a different xml file (not the one set as content view) I'd have to
inflate them myself
|
Apr 2 | 11:00 AM |
Mark M. |
yes, such as having a very fancy Adapter where you have different row structures for different types of items
|
Andrew G. |
gotcha
|
Andrew G. |
I will tinker with this DialogFragment a bit more and if I have issue I'll try to be in next time earlier
|
Mark M. |
OK
|
Andrew G. |
thanks Mark
|
Mark M. |
the next chat is Thursday, 10am Eastern
|
Andrew G. |
gotcha
|
Mark M. |
this chat's transcript will be archived on http://commonsware.com/office-hours/ shortly
|
Mark M. |
have a pleasant day!
|
Andrew G. | has left the room |
Mark M. | turned off guest access |