diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/insulin/InsulinProfileEditor.java b/app/src/main/java/com/eveningoutpost/dexdrip/insulin/InsulinProfileEditor.java index 8ef5486ade..a5722af830 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/insulin/InsulinProfileEditor.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/insulin/InsulinProfileEditor.java @@ -1,7 +1,6 @@ package com.eveningoutpost.dexdrip.insulin; import android.os.Bundle; -import android.view.MotionEvent; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; @@ -9,7 +8,6 @@ import android.widget.CheckBox; import android.widget.LinearLayout; import android.widget.Spinner; -import android.widget.ScrollView; import com.eveningoutpost.dexdrip.BaseAppCompatActivity; import com.eveningoutpost.dexdrip.R; @@ -36,8 +34,6 @@ public class InsulinProfileEditor extends BaseAppCompatActivity { private Spinner basalSpinner, bolusSpinner; private HashMap checkboxes; private HashMap profiles; - private ScrollView parentScrollView; - private ScrollView childScrollView; //private Context mContext; @@ -56,19 +52,7 @@ protected void onCreate(Bundle savedInstanceState) { linearLayout = (LinearLayout) findViewById(R.id.profile_layout_view); basalSpinner = (Spinner) findViewById(R.id.basalSpinner); bolusSpinner = (Spinner) findViewById(R.id.bolusSpinner); - parentScrollView = (ScrollView) findViewById(R.id.parent_scroll_view); - childScrollView = (ScrollView) findViewById(R.id.child_scroll_view); - parentScrollView.setOnTouchListener((v, event) -> { - findViewById(R.id.parent_scroll_view).getParent().requestDisallowInterceptTouchEvent(false); - return false; - }); - - childScrollView.setOnTouchListener((v, event) -> { - // Disallow the touch request for parent scroll on touch of child view - v.getParent().getParent().requestDisallowInterceptTouchEvent(true); - return false; - }); val iprofiles = InsulinManager.getAllProfiles(); if (iprofiles == null) { JoH.static_toast_long("Can't initialize insulin profiles"); diff --git a/app/src/main/res/layout/activity_insulinprofile_editor.xml b/app/src/main/res/layout/activity_insulinprofile_editor.xml index 093c4b4635..7ec51e416e 100644 --- a/app/src/main/res/layout/activity_insulinprofile_editor.xml +++ b/app/src/main/res/layout/activity_insulinprofile_editor.xml @@ -8,7 +8,6 @@ android:fitsSystemWindows="true"> + android:layout_height="wrap_content" + android:weightSum="1"> - - - - + android:scrollbars="vertical"> +