baoyongzhang / android-PullRefreshLayout

This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout.
MIT License
2.06k stars 515 forks source link

PullRefreshLayout not available #4

Open h87kg opened 9 years ago

h87kg commented 9 years ago
<com.baoyz.widget.PullRefreshLayout
        android:id="@+id/swipeRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">
        <Button
                android:layout_width="match_parent"
                android:layout_height="wrap_content"/>
        <ListView
                android:id="@+id/listView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"/>
    </LinearLayout>
</com.baoyz.widget.PullRefreshLayout>
baoyongzhang commented 9 years ago
<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
    <Button
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
    <com.baoyz.widget.PullRefreshLayout
        android:id="@+id/swipeRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
            <ListView
                    android:id="@+id/listView"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"/>

    </com.baoyz.widget.PullRefreshLayout>
</LinearLayout>
amnotarobot commented 5 years ago

@baoyongzhang , still available up to this moment, right?

amnotarobot commented 5 years ago

`<?xml version="1.0" encoding="utf-8"?> <LinearLayout 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=".MainActivity">

<com.baoyz.widget.PullRefreshLayout
    android:id="@+id/pullRefresh"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="Hello World!" />

</com.baoyz.widget.PullRefreshLayout>

`

implementation 'com.baoyz.pullrefreshlayout:library:1.2.0'

Seems to be not working. Am I missing something?

amnotarobot commented 5 years ago

@baoyongzhang @h87kg or does it work only with a list child?

Snailtamer commented 4 years ago

Just put your TextView inside a ScrollView and it will work 👍