I have an EditText
that is wrapped in a TextInputLayout
that is inside
a LinearLayout
and I want to show a fragment
when the LinearLayout
is touched
. However the EditText
is intercepting the touch
.
I tried setting focusable="false"
and clickable="false"
on the EditText
and the TextInputLayout
but now the touch
doesn't do anything except change the hint color slightly
for a little bit.
I don't want to set enabled="false"
because of the grayed out style color
changes.
My xml:
<LinearLayout
android:id="@+id/type_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:id="@+id/type_input_layout"
android:clickable="false"
android:focusable="false">
<EditText
android:id="@+id/type_input"
android:hint="Type"
android:text="Public"
android:clickable="false"
android:focusable="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions|textMultiLine"
android:background="@color/transparent"
android:gravity="left"
android:textSize="22sp"/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
My solution for now: just put a view on top of the edittext