Skip to content

SettingPanelWidget closes on X button press fix - #763

Open
xBambusekD wants to merge 1 commit into
dji-sdk:dev-sdk-mainfrom
xBambusekD:dev-sdk-main
Open

SettingPanelWidget closes on X button press fix#763
xBambusekD wants to merge 1 commit into
dji-sdk:dev-sdk-mainfrom
xBambusekD:dev-sdk-main

Conversation

@xBambusekD

Copy link
Copy Markdown

The SettingPanelWidget has an X close button, but clicking it does nothing. The reason is that setting menu layout already declares a close button view (setting_menu_header_close), but SettingMenuFragment does not bind or handle it. As a result, pressing the close button has no effect.

This change wires the existing close button and closes the containing DrawerLayout when it is pressed.

Changes

  • Adds mCloseBtn binding in SettingMenuFragment
  • Registers a click listener for the close button
  • Walks up the parent view hierarchy to find the containing DrawerLayout
  • Closes the direct drawer child view when found
  • Clears the close button reference in onDestroyView()

…ragment and close the containing DrawerLayout when it is pressed.
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.

1 participant