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

The following examples show how to use android.widget.ListView#getVisibility() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
/**
 * 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;
    }
}
 
Example 2
Source Project: catnut   File: SwipeRefreshListFragment.java    License: MIT License 5 votes vote down vote up
/**
 * 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;
	}
}
 
Example 3
/**
 * 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;
    }
}
 
Example 4
Source Project: soas   File: SwipeRefreshListFragment.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 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;
    }
}
 
Example 5
/**
 * 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 listView.canScrollVertically(-1);
    } else {
        return false;
    }
}
 
Example 6
@Override
public boolean canChildScrollUp() {

    final ListView listView = getListView();

    return listView.getVisibility() != View.VISIBLE || canListViewScrollUp(listView);

}