[Enhancement] Make custom image selector available from Nearby #5095
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (required)
As the nearby functions needs to be modified and add up a component of buttons
Both Activity and XML files which are corresponding to each other need to be changed and modified
Fixes #4611
What changes did you make and why?
Activity parts
Since the issue is to add up a component of button to provide an extra path towards the custom image selector, what I did is to find and target the two existing buttons that worked in this java file of the nearby activity:
I.First is to add up this button to @BindView to create an object to manage in the methods
II.showFB() to add up a fabCustomGallery
III.Add startAnimation of fabCustomGallery button to expandFABs()
IV.Add hide function to fabCustomGallery button from the method:
V.Add collapse function to fabCustomGallery button when the button is collapse sfrom the method collapseFABs():
VI.Add button click on listener to passInfoToSheet()
XML parts
It is not easy to manually draw the new button and setup design pattern in the Design
Since all the parameters need to be added up which are hidden and unknown(needs to be on trails for a few times to design)
By looking at the XML code:
I.The two existing buttons are setup in each empty view:
So the third extra button need to be included in a new view:
II.The extra floating button need to add up in xml code with different attributes:
Tests performed (required)
Tested on {Pixel 3 XL API 32} with API level {32}.
Screenshots (for UI changes only)
Before:
After:
Need help? See https://support.google.com/android/answer/9075928
Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.