2016-04-26 4 views
1

У меня есть приложение с SwipeRefreshLayout, в котором есть ListView. Когда заполняется ListView, я могу легко прокрутить вниз, чтобы прочитать старые элементы в списке, но при попытке прокрутки это действие ошибочно принимается за действие Pull2Refresh, даже если я пытаюсь прокручивать вверх. Неважно, где я позиционирую свой палец, он по-прежнему ошибочно принимает это за действие Pull2Refresh. Как я могу сортировать эту проблему, так как прокрутка вверх по верхней части является проблемой.

Вот XML для этого фрагмента с SwipeRefreshLayout:
SwipeRefreshLayout не позволяет мне прокручивать вверх

<android.support.v4.widget.SwipeRefreshLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/swipe_refresh_layout_general" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"> 

    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.inc.automata.unamupdates.fragments.GeneralNewsFragment"> 

    <ListView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:id="@+id/listViewGeneral"> 
    </ListView> 
    </FrameLayout> 
</android.support.v4.widget.SwipeRefreshLayout> 

ответ

0

попытка использовать follwoing атрибуты в ListView

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.inc.automata.unamupdates.fragments.GeneralNewsFragment"> 

    <ListView 
     android:id="@+id/listViewGeneral" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:smoothScrollbar="true" 
     android:fadeScrollbars="true"></ListView> 

</FrameLayout> 

+0

все еще не работает – Manny265

+0

ListView внутри SwipeRefreshLayout, внутри FrameLayout, не работает? – maja89