I've android layout as follows:
<RelativeLayout>
<Layout
android:id="@+id/login_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.test.console.LoginFragment" />
<Layout
android:id="@+id/transperent_fragment"
android:name="com.test.transperentFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/body_texture"
android:alpha="0.2"> />
</RelativeLayout>
If I touch on transparent layer still login button gets clicked. So how to avoid login button click after touch on transparent layout
There are 2 options to make your bottom layout non clickable:
android:clickable="false"
android:clickable="true"
, then touch wouldn't pass to lower layers.Hope it helps you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With