Q:

Making listview move to last item position

Am trying to make my listview move to the last item when new items are added to the view. With textview I could just achieve this by doing this 
Layout layout = MyView.getLayout();
        if(layout != null){
            int scrollDelta = layout.getLineBottom(MyView.getLineCount() - 1) 
                - MyView.getScrollY() - MyView.getHeight();
            if(scrollDelta > 0)
                MyView.scrollBy(0, scrollDelta);
        }

But with listview with an adapter, I can't seem to figure out the method to call.
My adapter setup
MyView = (ListView) findviewById(R.id.MyView_list);
MyAdapter = new ArrayAdapter<>(this, R.layout.list, Entries);
MyView.setAdapter(MyAdapter);

A:

Use smoothScrollToPosition(int position).  THis will scroll the listview so the passed in element is on screen.  If you don't know the number of items, use listView.smoothScrollToPosition(adapter.getCount());

