android - How to get data from custom dialog? -
i have created custom dialog class(extended dialog) 3 buttons, , each button must call different activity. seem having problems calling activity onclick.
private class oklistener implements android.view.view.onclicklistener { @override public void onclick(view v) { dismiss(); intent myintent = new intent(myapp.this,nextact.class) startactivity(myintent); } } }
what missing? can give me specific examples on how call activity custom dialog class? appreciate much! desperate after going through whole night without sleep.
i followed tutorial way: how display custom dialog in android
~ciao
in onclick have check,which button click , load intent according button click.
dismiss(); if (v== firstbutton) { intent = new intent(getbasecontext(),buttonone.class); startactivity(i); } if (v == cancelbutton) { intent = new intent(getbasecontext(),buttontwo.class); startactivity(i); }
hope useful
Comments
Post a Comment