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/18 17:49:21 UTC

[GitHub] [fineract-cn-mobile] EGOR-IND opened a new pull request #160: add functionality of search view close using back button

EGOR-IND opened a new pull request #160:
URL: https://github.com/apache/fineract-cn-mobile/pull/160


   Fixes [FINCN-284](https://issues.apache.org/jira/browse/FINCN-284)
   
   https://user-images.githubusercontent.com/56648862/111672602-1c5be100-8840-11eb-9795-1c4c74f7fe11.mp4
   
   Added functionality of closing search view from back button in every activity with search view.
   
   Please make sure these boxes are checked before submitting your pull request - thanks!
   
   - [x] Apply the `AndroidStyle.xml` style template to your code in Android Studio.
   
   - [x] Run the unit tests with `./gradlew check` to make sure you didn't break anything.
   
   - [x] If you have multiple commits please combine them into one commit by squashing them.
   
   
   


-- 
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



[GitHub] [fineract-cn-mobile] PatelVatsalB21 commented on a change in pull request #160: add functionality of search view close using back button

Posted by GitBox <gi...@apache.org>.
PatelVatsalB21 commented on a change in pull request #160:
URL: https://github.com/apache/fineract-cn-mobile/pull/160#discussion_r597167176



##########
File path: app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
##########
@@ -77,6 +80,10 @@ protected void onCreate(Bundle savedInstanceState) {
         }
     }
 
+    private void assignBaseFragment(FineractBaseFragment baseFragment) {
+        this.baseFragment = baseFragment;
+    }
+

Review comment:
       @EGOR-IND this looks very lengthy code. There is one solution if you want to try. Searchview assigned in every fragment is correct but instead of assigning fragment use `onPause()` in every fragment and in onPause method type `searchview.OnActionViewCollapsed()` it will make you work done with less code. For more reference follow this [pr made for similar issue](https://github.com/apache/fineract-cn-mobile/pull/149).
   
   ```suggestion
     ```




-- 
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



[GitHub] [fineract-cn-mobile] PatelVatsalB21 commented on a change in pull request #160: add functionality of search view close using back button

Posted by GitBox <gi...@apache.org>.
PatelVatsalB21 commented on a change in pull request #160:
URL: https://github.com/apache/fineract-cn-mobile/pull/160#discussion_r597397486



##########
File path: app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
##########
@@ -77,6 +80,10 @@ protected void onCreate(Bundle savedInstanceState) {
         }
     }
 
+    private void assignBaseFragment(FineractBaseFragment baseFragment) {
+        this.baseFragment = baseFragment;
+    }
+

Review comment:
       If you find it appropriate then it ok. 👍 




-- 
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



[GitHub] [fineract-cn-mobile] EGOR-IND commented on a change in pull request #160: add functionality of search view close using back button

Posted by GitBox <gi...@apache.org>.
EGOR-IND commented on a change in pull request #160:
URL: https://github.com/apache/fineract-cn-mobile/pull/160#discussion_r597178923



##########
File path: app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
##########
@@ -77,6 +80,10 @@ protected void onCreate(Bundle savedInstanceState) {
         }
     }
 
+    private void assignBaseFragment(FineractBaseFragment baseFragment) {
+        this.baseFragment = baseFragment;
+    }
+

Review comment:
       Now here is the problem because my is actually a little bit shorter than appying on pause every fragment and also I think using interface is little better in software development sense because it keeps coupling low in a broad view.




-- 
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



[GitHub] [fineract-cn-mobile] PatelVatsalB21 commented on a change in pull request #160: add functionality of search view close using back button

Posted by GitBox <gi...@apache.org>.
PatelVatsalB21 commented on a change in pull request #160:
URL: https://github.com/apache/fineract-cn-mobile/pull/160#discussion_r597167176



##########
File path: app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
##########
@@ -77,6 +80,10 @@ protected void onCreate(Bundle savedInstanceState) {
         }
     }
 
+    private void assignBaseFragment(FineractBaseFragment baseFragment) {
+        this.baseFragment = baseFragment;
+    }
+

Review comment:
       @EGOR-IND this looks very lengthy code. There is one solution if you want to try. Searchview assigned in every fragment is correct but instead of assigning Basefragments use `onPause()` in every fragment and in onPause method type `searchview.OnActionViewCollapsed()` it will make you work done with less code. For more reference follow this [pr made for similar issue](https://github.com/apache/fineract-cn-mobile/pull/149).
   
   ```suggestion
     ```




-- 
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