This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final int listViewTopPadding = mListView.getPaddingTop(); | |
for (int i = 0, z = mListView.getChildCount(); i < z; i++) { | |
View child = mListView.getChildAt(i); | |
if (child.getTop() > (listViewTopPadding - child.getHeight()) && child.getTop() <= listViewTopPadding) { | |
// Bingo, we have our first visible child... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.handmark.pulltorefresh.library.PullToRefreshListView; | |
import android.os.Bundle; | |
import android.support.v4.app.ListFragment; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ListView; | |
public class PullToRefreshListFragment extends ListFragment { |
NewerOlder