scrollview not responding
<p>In one screen in my app, I have one ListFragment that is not responding to gestures.  In other screens, my ListFragments behave appropriately - moving up and down based on touch.  But this instance does not move in response to gestures.  I have tried setting the height to a specific dip, enclosing the ListFragment in a ScrollView but nothing works. Logs prove there are 3 entries in the list but only the first one and half of the second are visible.  I can select the first entry from the list. </p>

<p>The xml follows.  It's the inner fragment identified by " android:name="com.chex.control.LabelList"" that is not scrolling.  </p>

<p>Has anyone encountered this problem and solved it?</p>

<p>Thanks</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    &gt;

    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" &gt;

        &lt;TextView
            android:id="@+id/new_interval_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="New Interval" /&gt;

        &lt;EditText
            android:id="@+id/days_in_interval"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:hint="days in interval"
            android:inputType="number"
            android:singleLine="true" /&gt;

        &lt;EditText
            android:id="@+id/goodi_goal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:hint="goodi goal"
            android:inputType="number"
            android:singleLine="true" /&gt;

        &lt;LinearLayout
            android:id="@+id/label_selector"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" &gt;

            &lt;LinearLayout
                android:id="@+id/default_label_pane"
                android:layout_width="0px"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical" &gt;

                &lt;TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Default Labels" /&gt;

                &lt;ScrollView
                    android:layout_width="match_parent"
                    android:layout_height="fill_parent"
                    android:scrollbars="vertical" &gt;

                    &lt;fragment
                        xmlns:android="http://schemas.android.com/apk/res/android"
                        android:id="@+id/default_labels_fragment"
                        android:name="com.chex.control.LabelList"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="@android:color/white"
                        android:focusable="true" &gt;
                    &lt;/fragment&gt;
                &lt;/ScrollView&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/add_remove_label_selector"
                android:layout_width="0px"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical" &gt;

                &lt;Button
                    android:id="@+id/add_label_button"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Add" /&gt;

                &lt;Button
                    android:id="@+id/remove_label_button"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Remove" /&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:id="@+id/label_pane"
                android:layout_width="0px"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical" &gt;

                &lt;TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Inteval Labels" /&gt;

                &lt;fragment
                    xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/interval_labels_fragment"
                    android:name="com.chex.control.IntervalLabelList"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:focusable="true" &gt;
                &lt;/fragment&gt;

                &lt;EditText
                    android:id="@+id/new_label"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="new label"
                    android:inputType="text"
                    android:singleLine="true" /&gt;
            &lt;/LinearLayout&gt;
        &lt;/LinearLayout&gt;

        &lt;LinearLayout
            android:id="@+id/keep_discard_button_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" &gt;

            &lt;Button
                android:id="@+id/keep_interval_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Keep" /&gt;

            &lt;Button
                android:id="@+id/discard_interval_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Discard" /&gt;
        &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;
&lt;/ScrollView&gt;
</code></pre>

<p>here is the fragment .java</p>

<pre><code>package com.chex.control;


import java.util.ArrayList;

import com.chex.R;
import com.chex.storage.Child;
import com.chex.storage.DatabaseConstants;
import com.chex.storage.DatabaseHelper;
import com.chex.storage.DatabaseIO;
import com.chex.storage.Label;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.ListActivity;
import android.content.DialogInterface;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v4.widget.CursorAdapter;
import android.support.v4.widget.SimpleCursorAdapter;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;

/**
 * presents all the labels on the device.
 */
public class LabelList extends ListFragment implements DatabaseConstants,
        GoodiList {

    private final String TAG = "LabelList";

    ArrayAdapter&lt;Label&gt; adapter = null;

    private ListParent parentActivity;

    private Label[] values;

    private Label currentItem;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Log.e(TAG, "on Create");
        ArrayList&lt;Label&gt; labelList = Label.getLabelsForInterval();

        Log.i(TAG,labelList.size()+" labels");
        // adapter = new IntervalListAdapter(getActivity(), values);

        adapter = new IntervalListAdapter(getActivity(), labelList);

        setListAdapter(adapter);

        Log.e(TAG, "finished on Create");
    }

    /*
     * (non-Javadoc)
     * 
     * @see android.support.v4.app.Fragment#onActivityCreated(android.os.Bundle)
     */
    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onActivityCreated(savedInstanceState);

        LongClickListener longClickListener = new LongClickListener();

        getListView().setOnItemLongClickListener(longClickListener);
    }

    /**
     * create and return a CursorLoader that will take care of creating a Curso
     * for the data being displayed.
     */

    /**
     * this used to delete. However, we need it to select usually. Now delete is
     * done by long click.
     */
    @Override
    public void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);

        // delete child - remove child from list and database
        Object item = l.getItemAtPosition(position);

        currentItem = (Label) item;

        Log.e(TAG,
                "selected " + currentItem.getLabel() + " id: "
                        + currentItem.getId() + " at position " + position);

        parentActivity.listItemSelected(this, position, currentItem.getId());

    }

    /**
     * Forces cursor to requery database and list to be update. Used when a new
     * child is entered in parent activity's EditText field.
     */
    public void notifyDataChanged() {

        Log.e(TAG, "told adapter that data changed");

        adapter.notifyDataSetChanged();
    }

    /*
     * (non-Javadoc)
     * 
     * @see android.support.v4.app.Fragment#onAttach(android.app.Activity)
     */
    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

        parentActivity = (ListParent) activity;

        parentActivity.setList(this);

    }

    class LongClickListener implements OnItemLongClickListener {

        public boolean onItemLongClick(AdapterView&lt;?&gt; adapterView, View view,
                int position, long id) {
            // delete child - remove child from list and database

            // adapter view. Can always call parent's getItemAtPosition
            final Object item = adapterView.getItemAtPosition(position);

            final Label label = (Label) item;

            final String name = label.getLabel();

            Log.e(TAG, "selected " + name + " at position " + position
                    + " now we'll delete them");

            // make sure user wants to delete
            AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());

            alert.setTitle("Delete " + name + "?");

            alert.setPositiveButton("Yes",
                    new DialogInterface.OnClickListener() {

                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            Label.deleteLabel(name);

                            adapter.remove(label);

                            // update the list
                            notifyDataChanged();

                        }
                    });

            alert.setNegativeButton("No",
                    new DialogInterface.OnClickListener() {

                        @Override
                        public void onClick(DialogInterface dialog, int which) {

                            // nothing happens - child remains

                        }
                    });

            alert.show();

            return true;
        }

    }

    @Override
    public void addListItem(int itemId) {
        Label labelToAdd = Label.lookupLabel(itemId);

        if (labelToAdd == null) {
            Log.e(TAG, "didn't find a label for label id " + itemId);

        } else {
            Log.e(TAG, "adding label: " + labelToAdd.getLabel() + "  "
                    + labelToAdd.getId() + "  id argument: " + itemId);

            // breaks because the adapter is currently strings
            adapter.add(labelToAdd);

            notifyDataChanged();
        }
    }

    @Override
    public void removeListItem(int itemId) {
        // TODO Auto-generated method stub

    }

    @Override
    public void removeListItem() {
        // TODO Auto-generated method stub

    }


    @Override
    public void highlightListIndex(int index) {
        ListView listView = getListView();
        listView.setItemChecked(index, true);
    }

} 
</code></pre>
