Example usage for android.support.v4.widget NestedScrollView getBottom

List of usage examples for android.support.v4.widget NestedScrollView getBottom

Introduction

In this page you can find the example usage for android.support.v4.widget NestedScrollView getBottom.

Prototype

@ViewDebug.CapturedViewProperty
public final int getBottom() 

Source Link

Document

Bottom position of this view relative to its parent.

Usage

From source file:com.fbartnitzek.tasteemall.addentry.AddLocationFragment.java

private void focusOnMap() {
    new Handler().post(new Runnable() {
        @Override/*  w  w  w .  ja  v  a  2  s .  c  om*/
        public void run() {
            Log.v(LOG_TAG, "focusOnMap-run, hashCode=" + this.hashCode() + ", " + "");

            NestedScrollView scrollView = (NestedScrollView) getActivity().findViewById(R.id.nested_scrollView);
            if (scrollView != null) {
                Log.v(LOG_TAG, "focusOnMap-run, hashCode=" + this.hashCode() + ", position="
                        + scrollView.getBottom() + "");
                scrollView.smoothScrollTo(0, scrollView.getBottom());
            } else {
                Log.v(LOG_TAG, "focusOnMap-run, scrollView == null");
            }
        }
    });
}