I have the this code and I get 2 error on line with getChildCount() and on the last line.

protected void onScrollChanged(int l, int t, int oldl, int oldt) 
{
        // Grab the last child placed in the ScrollView, we need it to determinate the bottom position.
        View view = (View) getChildAt(getChildCount()-1);

        // Calculate the scrolldiff
        int diff = (view.getBottom()-(view.getHeight()+view.getScrollY()));

        // if diff is zero, then the bottom has been reached
        if( diff == 0 )
        {
                // notify that we have reached the bottom
                Log.d("Hier", "MyScrollView: Bottom has been reached" );
        }
        super.onScrollChanged(l, t, oldl, oldt);
}



Question: native-activity sample project won't compile if I change file exteension to .cpp
Answer: I had to delete the object files. Dumb mistake.