1

I'm trying to add pull to refresh for my app , this is code that I found

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

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="25dp"
        android:gravity="center_horizontal"
        android:text="Pull to Refresh" />
</ScrollView>

but I can't add any buttons or other thing inside the layout , I tried to add it to fragment but it doesn't work , how to solve this?! thanks

Samad
  • 1,776
  • 2
  • 20
  • 35
  • 2
    There is a nice tutorial on this here: http://www.survivingwithandroid.com/2014/05/android-swiperefreshlayout-tutorial.html – xemacobra Jan 28 '15 at 03:22
  • 1
    Answers given in this question can help you better: http://stackoverflow.com/questions/23117731/android-listview-pull-down-to-refresh – Uniruddh Jan 28 '15 at 03:23

0 Answers0