Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.widget.ListView;

public class Main {
    public static boolean isLastMessageVisible(ListView messageListView) {
        if (messageListView == null || messageListView.getAdapter() == null) {
            return false;
        }

        if (messageListView.getLastVisiblePosition() >= messageListView.getAdapter().getCount() - 1
                - messageListView.getFooterViewsCount()) {
            return true;
        } else {
            return false;
        }
    }
}