rejoigne ce groupe pour une tres bonne formation a Android:
http://www.facebook.com/group.php?v=wallgid=268882243055
2010/1/5 TreKing treking...@gmail.com:
Another (simpler) option:
- Add a click listener to you dialog
- When it fires, get the EditText from the dialog (it's passed in as a
The view you're trying to get the text from resides in the dialog, not the
activity layout.
In your click listener, call findViewByID on the dialog you get in the
arguments, not the activity itself.
Something like this.
// ... snip ...
public void onClick(DialogInterface dialog, int whichButton)
I just give my custom dialogs a reference to my main activity so they
can access its data. Just cast the Context to your activity name.
On Jan 8, 8:18 am, TreKing treking...@gmail.com wrote:
The view you're trying to get the text from resides in the dialog, not the
activity layout.
In your
Thanks again,
It's working now.
On Jan 8, 7:18 pm, TreKing treking...@gmail.com wrote:
The view you're trying to get the text from resides in the dialog, not the
activity layout.
In your click listener, call findViewByID on the dialog you get in the
arguments, not the activity itself.
Another (simpler) option:
- Add a click listener to you dialog
- When it fires, get the EditText from the dialog (it's passed in as a
parameter to the listener)
- Get the text from the EditText object and pass it to the TextView (which I
assume you have / can get a reference to) since it's in the
I've got it done. I just created a new class and set the Theme to
@android:style/Theme.Dialog, then i created an intent and called
startActivityForResult() and
passed the parameters through Bundle. hope this helps others with the
same problem as me
Cheers,
Lenea
On Jan 5, 8:48 am, Kevin Duffey
6 matches
Mail list logo