AlertDialog in android -


मैं AlertDialog दो EditText और 2 TextView ?

custom_dialog.xml

  & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & Lt; LinearLayout एंड्रॉइड: ओरिएंटेशन = "क्षैतिज" एंड्रॉइड: एंड्रॉइड: एंड्रॉइड: एंड्रॉइड: padding = "10.0dip" android: layout_width = "fill_parent" एंड्रॉइड: layout_height = "fill_parent" xmlns: android = "http: / /schemas.android.com/apk/res/android"> & Lt; TextView android: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: text = "Libellà ©" android: id = "@ + id / text_libelle" / & gt; & Lt; EditText android: id = "@ + id / edit_libelle" एंड्रॉइड: layout_width = "wrap_content" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: टेक्स्ट = "" / & gt; & Lt; EditText android: id = "@ + id / edit_ url" एंड्रॉइड: layout_width = "wrap_content" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: टेक्स्ट = "" / & gt; बटन पर क्लिक करने पर मैं इस इंटरफ़ेस को चेतावनी संवाद में दिखाना चाहता हूं।   

आपको मूल रूप से लेआउट बनाया गया है, इसलिए आपको जो करना है उसे अपने कस्टम संवाद पर असाइन करें जैसे कि ..

आरंभ करने के बाद संवाद में कस्टम लेआउट सेट करें ..

  डायलॉग डायलॉग = नया डायलॉग (कुछ कंटबॉक्स); dialog.setContentView (R.layout.customdialoglayout); // कस्टम लेआउट में संवाद दृश्य सेट करें   

अपने हैंडलर्स को तार करने के लिए आपको कुछ के लिए कुछ करना होगा ..

  EditText myText = ( EditText) dialog.findViewById (R.id.Edit_Libelle);    

Comments

Popular posts from this blog

android - How can I execute default sms app? -

jquery .css('text-decoration') doesn't work from parents -

java - What characters are available on Android? -