Android 列表项中的垂直滚动文本?

Android 列表项中的垂直滚动文本?,android,android-listview,scroll,listitem,vertical-scrolling,Android,Android Listview,Scroll,Listitem,Vertical Scrolling,我已经为我的ListView实现了一个自定义ListItem。ListItem如下所示: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rlOfferRoot" android:layout_width="fill_parent" andro

我已经为我的ListView实现了一个自定义ListItem。ListItem如下所示:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rlOfferRoot"
    android:layout_width="fill_parent"
    android:layout_height="60dp"
    android:padding="5dp"
    android:background="@color/white">


      <RelativeLayout
        android:id="@+id/rlOfferDetails"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#000000">

        <LinearLayout
          android:id="@+id/llOfferRoot"
          android:layout_width="fill_parent"
          android:layout_height="200dp"
          android:orientation="vertical"
          android:background="@color/orange">
            <ImageView
              android:id="@+id/imgOfferImage"
              android:layout_width="fill_parent"
              android:layout_height="match_parent"/>
        </LinearLayout>
        <LinearLayout
          android:id="@+id/menuDrawerLayer"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:gravity="bottom"
          android:layout_gravity="bottom">

        <SlidingDrawer
          android:id="@+id/sdOfferDetails"
          android:layout_width="fill_parent"
          android:layout_height="200dp"
          android:layout_alignBottom="@id/imgOfferImage"
          android:content="@+id/drawerButtons"
          android:handle="@+id/slideHandleButton"
          android:topOffset="-50dp">

            <Button
               android:id="@+id/slideHandleButton"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:background="@drawable/arrowup"/>

            <RelativeLayout
              android:id="@+id/drawerButtons"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="#80000000">
              <ScrollView
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:scrollbars="vertical"
                android:padding="10dp"
                android:focusable="true">
                <TextView
                  android:id="@+id/txtOfferDetails"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:textColor="@color/white"
                  android:text="This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text end
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text end
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text end
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text end
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text end
                           This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text end"/>
              </ScrollView>
        </RelativeLayout>
      </SlidingDrawer>
    </LinearLayout>

  </RelativeLayout>
  </RelativeLayout>

除了打开我的滑动抽屉并尝试滚动文本视图中包含的文本外,这看起来很棒,并按预期执行

当我看到TextView的滚动条出现时,TextView看起来获得了焦点,但随后ListView似乎抓住了焦点,整个列表开始滚动

我是否需要实现一个自定义ListView来对其进行排序,或者它们是一个快速解决方案?我尝试了与上面相同的方法,但使用了一个水平滚动视图,它确实起作用,但这可能是因为ListView对水平滚动事件没有任何作用


感谢您提供的任何帮助

在您的ScrollView上的touch listner上设置

   OnTouchListener childScroll = new View.OnTouchListener() {

           @Override
           public boolean onTouch(View v, MotionEvent event) {
                 v.getParent().requestDisallowInterceptTouchEvent( true);
                  return false ;
          }
   };