miPlodder commented on a change in pull request #34: "feat: added double tap to 
exit feature on Dashboard"
URL: https://github.com/apache/fineract-cn-mobile/pull/34#discussion_r288702894
 
 

 ##########
 File path: 
app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
 ##########
 @@ -140,6 +144,19 @@ public void onBackPressed() {
         } else {
             super.onBackPressed();
         }
+        if (doubleBackToExitPressedOnce) {
+            super.onBackPressed();
+            return;
+        }
+        this.doubleBackToExitPressedOnce = true;
+        toast = Toast.makeText(this, "Please click BACK again to exit", 
Toast.LENGTH_SHORT);
 
 Review comment:
   No need to create a variable for Toast and don't hard-code the message.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to