Horje
android double click to exit Code Example
android double click to exit
private var doubleBackToExitPressedOnce = false
override fun onBackPressed() {
        if (doubleBackToExitPressedOnce) {
            super.onBackPressed()
            return
        }

        this.doubleBackToExitPressedOnce = true
        Toast.makeText(this, "Please click BACK again to exit", Toast.LENGTH_SHORT).show()

        Handler(Looper.getMainLooper()).postDelayed(Runnable { doubleBackToExitPressedOnce = false }, 2000)
    }




Java

Related
bulkwrite mongodb array of objects Code Example bulkwrite mongodb array of objects Code Example
subtract two variables in java Code Example subtract two variables in java Code Example
spring yml property boolean Code Example spring yml property boolean Code Example
minecraft fabric client message Code Example minecraft fabric client message Code Example
converting temperature from fahrenheit to celsius Code Example converting temperature from fahrenheit to celsius Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7