I'm trying to hide the text selection handles when the user clicks somewhere else (a floating button) in webview, as shown in images the handles overlap with my linear layout. layout_meaning_selected_text
is the element I hide and show after selection and clicking on the button.
any idea how to resolve this overlapping, and I want the text to be selected, it's just I want to make focus on that yellow part and after closing that, focus on the selected text.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.myview.HorizontalWebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"
tools:layout_editor_absoluteX="10dp"
tools:layout_editor_absoluteY="10dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
<View
android:layout_width="@dimen/afc_200dp"
android:layout_height="@dimen/afc_200dp"
android:layout_centerInParent="true"
android:background="@drawable/watermark_logo_grey" />
<include
android:id="@+id/selection_panel"
layout="@layout/custom_popup_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_margin="@dimen/afc_10dp"
android:visibility="gone"
tools:visibility="visible" />
<include
android:id="@+id/layout_editbookmark"
layout="@layout/toast_with_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="@dimen/afc_10dp"
android:visibility="gone" />
<include
android:id="@+id/search_panel"
layout="@layout/search_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_margin="@dimen/afc_10dp"
android:visibility="gone" />
<include layout="@layout/config_layout" />
<include
android:id="@+id/layout_meaning_selected_text"
layout="@layout/layout_meaning_selected_text"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignParentBottom="true" />
</RelativeLayout>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…