Answer the question
In order to leave comments, you need to log in
Elements inside RelativeView are not clickable API >=24 but 17-23 is ok. Why?
I have a view with the following structure:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true">
<!-- .... -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/layout_title"
android:layout_marginTop="20dp"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:weightSum="4">
<!-- И четыре таких RelativeLayout -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clickable="true"
android:clipChildren="false"
android:clipToPadding="false"
android:focusable="true"
android:focusableInTouchMode="true"
android:padding="8dp">
<!-- .... -->
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.0'
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Try to put this thing in the top RelativeLayout
android:descendantFocusability="blocksDescendants"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question