Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

add functionality of search view close using back button #160

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

EGOR-IND
Copy link

Fixes FINCN-284

WhatsApp.Video.2021-03-18.at.23.16.04.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!

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • Run the unit tests with ./gradlew check to make sure you didn't break anything.

  • If you have multiple commits please combine them into one commit by squashing them.

Comment on lines 83 to 86
private void assignBaseFragment(FineractBaseFragment baseFragment) {
this.baseFragment = baseFragment;
}

Copy link

@PatelVatsalB21 PatelVatsalB21 Mar 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Suggested change
private void assignBaseFragment(FineractBaseFragment baseFragment) {
this.baseFragment = baseFragment;
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you find it appropriate then it ok. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants