Make whole row with switch clickable

This commit is contained in:
Chumva 2019-07-23 21:09:25 +03:00
parent e608b4839d
commit f9c34e88cd
5 changed files with 18 additions and 1 deletions

View file

@ -43,6 +43,10 @@
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding" />

View file

@ -43,6 +43,10 @@
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding" />

View file

@ -83,6 +83,10 @@
android:id="@+id/showOnMapToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingLeft="16dp"
android:paddingRight="8dp"/>

View file

@ -43,6 +43,10 @@
android:id="@+id/gpx_join_gaps_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding" />

View file

@ -321,9 +321,10 @@ public class TrackActivityFragmentAdapter implements TrackBitmapDrawerListener {
}
vis.setChecked(gpxFileSelected);
vis.setOnClickListener(new View.OnClickListener() {
headerView.findViewById(R.id.showOnMapContainer).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
vis.toggle();
if (!vis.isChecked()) {
selectedSplitInterval = 0;
}