title: ListView in Scrolling Activity displays Only A Single Item
body: <p>I am using a Scrolling Activity, that comes with Android Studio 1.4 In this I have an ImageView and a ListView. The xml for this layout is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.NestedScrollView 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"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"
      tools:context="com.viv.droidchef.EachRec"
      tools:showIn="@layout/each_rec"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:id="@+id/recPixx"/&gt;
          &lt;ListView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:id="@+id/ingredients_list"&gt;&lt;/ListView&gt;
  
      &lt;/LinearLayout&gt;
  
  
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>
  
  <p>The problem I am facing is that in my ListView only the first item is shown. Here's my code for the ListView</p>
  
  <pre><code>String ingredients = new String[]{
                      " Boneless Chicken                    - 300 g",
                      "Ginger garlic paste                   - 2 tsp",
                      " Kashmiri red chilly pwd              - ¾ tsp",
                      "Lemon juice                           - 1 tsp",
                      "Salt to taste                                ",
                      "Cooking oil                     - 3 to 4 tbsp",
                      "Gram / besan flour (kadalai maavu    - 2 tbsp",
                      "Yoghurt                               - 1 cup",
                      "Kashmiri red chilly pwd               - 1 tsp",
                      " Ginger garlic paste                  - 1 tsp",
                      "Turmeric pwd                          - ¼ tsp",
                      "Garam masala pwd                      - ½ tsp",
                      "Salt as required                             "
              };
  ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_multiple_choice, ingredients);
          ListView lv= (ListView)findViewById(R.id.ingredients_list);
          lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
          lv.setAdapter(adapter);
  lv.setOnTouchListener(new ListView.OnTouchListener() {
              @Override
              public boolean onTouch(View v, MotionEvent event) {
                  int action = event.getAction();
                  switch (action) {
                      case MotionEvent.ACTION_DOWN:
                          // Disallow ScrollView to intercept touch events.
                          v.getParent().requestDisallowInterceptTouchEvent(true);
                          break;
  
                      case MotionEvent.ACTION_UP:
                          // Allow ScrollView to intercept touch events.
                          v.getParent().requestDisallowInterceptTouchEvent(false);
                          break;
                  }
  
                  // Handle ListView touch events.
                  v.onTouchEvent(event);
                  return true;
              }
          });
  </code></pre>
  
  <p>I've used choice mode multiple, because I want a checklist. I'm using the setOnTouchListener because I already have a NestedScrollView in my Layout. I found this on another SO post.
  If I put the height of the dp fixed it seems to work, but that doesn't help as 
  it will look different on each screen size.
  Is there a way to fix the issue I am facing and get all items on the list without using Dp?</p>