List of usage examples for android.support.v4.widget NestedScrollView postDelayed
public boolean postDelayed(Runnable action, long delayMillis)
Causes the Runnable to be added to the message queue, to be run after the specified amount of time elapses.
From source file:ar.uba.fi.splitapp.ChatRoomActivity.java
private void scrollToLast() { final NestedScrollView scrollview = ((NestedScrollView) findViewById(R.id.messages_lay)); assert scrollview != null; //Debug assert scrollview.postDelayed(() -> scrollview.fullScroll(NestedScrollView.FOCUS_DOWN), 100); AppBarLayout appBarLayout = (AppBarLayout) findViewById(R.id.app_bar); assert appBarLayout != null; //Debug assert appBarLayout.setExpanded(false, true); Utility.hideKeyboard(this); }