Java Code Examples for android.widget.ListView.getVisibility()

The following are Jave code examples for showing how to use getVisibility() of the android.widget.ListView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: GitHub   File: SwipeRefreshListFragment.java   Source Code and License Vote up 5 votes
/**
 * As mentioned above, we need to override this method to properly signal when a
 * 'swipe-to-refresh' is possible.
 *
 * @return true if the {@link android.widget.ListView} is visible and can scroll up.
 */
@Override
public boolean canChildScrollUp() {
    final ListView listView = getListView();
    if (listView.getVisibility() == View.VISIBLE) {
        return canListViewScrollUp(listView);
    } else {
        return false;
    }
}