Android capture back button -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 3 जवाब

    मैं वापस कब्जा करना चाहता हूँ उपयोगकर्ता को यह पूछने के लिए कि वह फॉर्म डेटा को कैसे सहेजना चाहता है, कुछ गतिविधि में बटन। क्या यह संभव है?

    मुझे कुछ की तरह (स्यूडोकोड) की आवश्यकता होगी:

      onBackButtonPressed {AlertDialog ("क्या आप सहेजना चाहते हैं?") अगर (OkPressed) {// किसी भी मदद की सराहना की जाएगी  

    धन्यवाद

    < "post-text" itemprop = "text">

    ओवरराइड ऑन बैकप्रेस () आपकी गतिविधि में

      सार्वजनिक शून्य पर बैकड () {AlertDialog ("क्या आप सहेजना चाहते हैं?") अगर (ठीक दबाया गया है) {// बचत करना है} अन्य {// बैक बटन कार्रवाई के साथ जारी रखें}}    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

php - How can I cram 6+31 numeric characters into 22 alphanumeric characters? -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -