मैं बटन प्रेसएंड्रॉयड पास कस्टम संवाद
//set up dialog
Dialog dialog = new Dialog(BrowseActivity.this);
dialog.setContentView(R.layout.about);
dialog.setTitle("This is my custom dialog box");
dialog.setCancelable(true);
//there are a lot of settings, for dialog, check them all out!
//set up text
TextView text = (TextView) dialog.findViewById(R.id.TextView01);
text.setText(R.string.app_help_message);
//set up image view
ImageView img = (ImageView) dialog.findViewById(R.id.ImageView01);
img.setImageResource(R.drawable.icon);
//set up button
Button button = (Button) dialog.findViewById(R.id.Button01);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Dialog.dismiss();
}
});
//now that the dialog is set up, it's time to show it
dialog.show();
return true;
dialog.dismiss मेरे लिए काम नहीं कर रहा है पर बंद करने के लिए कस्टम संवाद पाने के लिए कोशिश कर रहा हूँ। मैं बस एक कस्टम स्क्रीन के रूप में इस कस्टम संवाद का उपयोग करने की कोशिश कर रहा हूं और इसे बंद करने के लिए बटन दबाएं।
मैं बहुत एंड्रॉयड देव के लिए नया हूँ, लेकिन कई कई घंटों के लिए इस कोशिश कर रहे हैं
धन्यवाद किसी भी सलाह देने के लिए
आपको डायलॉग क्लास पर डायलॉग डायलॉग = नया संवाद (ब्राउज़ एक्टिविटी.थिस) का उपयोग करके संवाद उदाहरण पर खारिज करने की आवश्यकता है। –