Skip to content

Conversation

@li-pbhadour
Copy link
Contributor

@li-pbhadour li-pbhadour commented Jul 31, 2025

Summary

Create bottom sheet for shake-to-feedback and launch them when shake is detected

  • Created following supporting files for handling bottom sheet support:
    • BottomSheetFeedbackItem: data wrapper to store content to be displayed for single row in bottomsheet.
    • BottomSheetFeedbackTypeAdapter: RecyclerView.Adapter for the select type of feedback view.
    • shaky_feedback_bottomsheet: bottomsheet's xml containing RV to show options.
    • shaky_dismiss: Dismiss icon.
  • Added support in Shaky to detect shake and launch bottom sheet accordingly.
  • Made changes to manually launch the bottom sheet in the sample app by adding a button on the main screen i.e. activity_demo.xml.
  • Updated ShakyApplication and ShakeDelegate to add methods for setting theme and boolean to handle bottomsheet support launch.
  • Added constants for dismiss and feedback actions in ActionConstants.
  • Added support to launch form fragment with FeedbackItem.GENERAL on ACTION_START_GENERAL_FEEDBACK.
  • Also added styles, string, and dimen resources as required.

Testing Done

Tested locally. Please refer the attached screenshots and recordings.

Screenshots

Scenario Before After
Sample app Home Screen before_main_screen after_main_screen
Feedback option screen before_feedback_screen after_feedback_bottomsheet

Videos

Scenario Before After
Manual flow
before-manual-bottomsheet.mp4
after-manual-bottom-sheet.mp4
Shake detected flow
before-shake-detect.mp4
after-shake-detect.mp4

…is detected

- Created following supporting files for handling bottom sheet support:
    - `BottomSheetFeedbackItem`: data wrapper to store content to be displayed for single row in bottomsheet.
    - `BottomSheetFeedbackTypeAdapter`: RecyclerView.Adapter for the select type of feedback view.
    - `shaky_feedback_bottomsheet`: bottomsheet's xml containing RV to show options.
    - `shaky_dismiss`: Dismiss icon.
- Added support in `Shaky` to detect shake and launch bottom sheet accordingly.
- Made changes to manually launch the bottom sheet in the sample app by adding a button on the main screen i.e. `activity_demo.xml`.
- Updated `ShakyApplication` and `ShakeDelegate` to add methods for setting theme and boolean to handle bottomsheet support launch.
- Added constants for dismiss and feedback actions in `ActionConstants`.
- Added support to launch form fragment with `FeedbackItem.GENERAL` on `ACTION_START_GENERAL_FEEDBACK`.
- Also added styles, string, and dimen resources as required.
android:translateX="34.269455"
android:translateY="45.790314">
<group android:translateY="139.21875">
<path android:pathData="M6.2578125,0L43.875,-55.40625L40.851562,-45.632812L40.851562,-51.257812L6.6796875,-101.46094L21.9375,-101.46094L49.078125,-60.609375L54.84375,-60.609375L46.476562,-56.109375L76.921875,-101.46094L91.33594,-101.46094L56.25,-50.625L56.25,-45L53.226562,-54.773438L90.5625,0L75.375,0L48.375,-40.5L42.609375,-40.5L50.976562,-44.929688L20.601562,0Z"
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add comment to explain this file? why so many hardcoded values? can we store them in some resource file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @li-advait , we created dismiss icon (used in bottomsheet) using vector asset (provided by android studio) and thus this path is generated from the vector asset. As per our understanding, even if we store this path under string resources, we cannot give reference to that string resource in vector asset.

Please let us know if we are missing anything here.
Thank you.

@li-advait li-advait merged commit ad37450 into linkedin:main Aug 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants