You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2021/03/19 19:18:04 UTC
[GitHub] [fineract-cn-mobile] PatelVatsalB21 commented on a change in pull request #164: resolve tasks bottom sheet direct exit issue
PatelVatsalB21 commented on a change in pull request #164:
URL: https://github.com/apache/fineract-cn-mobile/pull/164#discussion_r597921018
##########
File path: app/src/main/java/org/apache/fineract/ui/online/customers/customertasks/CustomerTasksBottomSheetFragment.java
##########
@@ -125,6 +127,18 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
break;
}
+ dialog.setOnKeyListener((dialog1, keyCode, event) -> {
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+ if (event.getAction() == KeyEvent.ACTION_DOWN) {
+ if (isTaskFormVisible()) {
+ hideTaskForm();
+ return true;
+ }
+ }
+ }
+ return false;
+ });
+
Review comment:
@EGOR-IND isn't it possible to reduce code by using `onBackPressed()`? Also we can remove `llTaskList.getVisibility() == View.GONE` as both are contradictory anyone of them will do the same.
--
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:
users@infra.apache.org