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

The following examples show how to use android.widget.listview#getVisibility() . 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 check out the related API usage on the sidebar.
Example 1
Source File: FragmentSocialTimeline.java    From aptoide-client with GNU General Public License v2.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 2
Source File: SwipeRefreshListFragment.java    From catnut with 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
Source File: SwipeRefreshListFragment.java    From android-SwipeRefreshListFragment with 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 4
Source File: SwipeRefreshListFragment.java    From soas with 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
Source File: SwipeRefreshListFragment.java    From Conversations with GNU General Public License v3.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 listView.canScrollVertically(-1);
    } else {
        return false;
    }
}
 
Example 6
Source File: ArticleListFragment.java    From CrimeTalk-Reader with Apache License 2.0 3 votes vote down vote up
@Override
public boolean canChildScrollUp() {

    final ListView listView = getListView();

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

}