@@ -158,23 +158,28 @@ class LiveEditorOnScreenButtonController(
158158
159159 private fun showImageInfo (context : Context ) {
160160 val windowContext = getWindowContext(context)
161- addWindow(
162- windowContext,
161+ val infoView =
163162 LiveEditorUiUtils (imageSelector?.currentEditor, debugDataProviders)
164163 .createImageInfoView(windowContext) { showImageToggleButtons(windowContext) }
165- .apply { background = ColorDrawable (editorBackgroundColor) },
166- )
164+ .apply { background = ColorDrawable (editorBackgroundColor) }
165+
166+ // Wrap in OverlayHandlerView so Flipper UI Debugger excludes it from inspection
167+ addWindow(windowContext, OverlayHandlerView (windowContext).apply { addView(infoView) })
167168 }
168169
169170 private fun showLiveEditor (context : Context ) {
170171 val windowContext = getWindowContext(context)
171- addWindow(
172- windowContext,
172+ val editorView =
173173 LiveEditorUiUtils (imageSelector?.currentEditor, debugDataProviders)
174174 .createView(windowContext, customOptions.entries) {
175175 showImageToggleButtons(windowContext)
176176 }
177- .apply { background = ColorDrawable (editorBackgroundColor) },
177+ .apply { background = ColorDrawable (editorBackgroundColor) }
178+
179+ // Wrap in OverlayHandlerView so Flipper UI Debugger excludes it from inspection
180+ addWindow(
181+ windowContext,
182+ OverlayHandlerView (windowContext).apply { addView(editorView) },
178183 DisplayMetrics ()
179184 .apply { getWindowManager(context).defaultDisplay.getMetrics(this ) }
180185 .heightPixels / 2 ,
@@ -234,8 +239,15 @@ class LiveEditorOnScreenButtonController(
234239 currentView = view
235240 }
236241
242+ /* *
243+ * Custom ViewGroup class to wrap the live editor overlay buttons. Uses the "OverlayHandlerView"
244+ * naming pattern that Flipper's UI Debugger already recognizes and excludes from inspection,
245+ * preventing this overlay from blocking the main UI view hierarchy during debugging.
246+ */
247+ private class OverlayHandlerView (context : Context ) : LinearLayout(context)
248+
237249 private fun createOnScreenButtons (context : Context ): View {
238- return LinearLayout (context).apply {
250+ return OverlayHandlerView (context).apply {
239251 orientation = LinearLayout .VERTICAL
240252 val cornerRadius = 16 .dpToPxF(context)
241253 val buttonLayoutParams: LinearLayout .LayoutParams =
0 commit comments