As the error suggests, you're using the wrong type for setOnClickListener.
Try *View*.OnClickListener instead of *DialogInterface*.OnClickListener.
On Wed, Nov 11, 2009 at 1:48 AM, Jeffrey jeffisagen...@gmail.com wrote:
I am trying to get a custom dialog to have buttons that manipulate the
progress of a seekbar. I've set up the dialog layout through xml but I
can't get the buttons to work.
This is the code I'm getting stuck on:
protected Dialog onCreateDialog(int id) {
Dialog WoundSlider = new Dialog(this);
Button BDOWN = (Button)
WoundSlider.findViewById(R.id.BDOWN);
BDOWN.setOnClickListener(new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
});
I keep getting an error that says: The method setOnClickListener
(View.OnClickListener) in the type View is not applicable for the
arguments (new DialogInterface.OnClickListener(){})
It then lists several other listeners that it suggest I change to but
I get the same error for all of them. How do I set up a listener
within a custom dialog?
--
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
--
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en