Get RecyclerView last visible item
问题 findLastVisibleItemPosition returns -1 with the following sequence: onViewCreated() { recyclerView.setAdapter(adapter = new Adapter()); adapter.updateContent(List<Content>); // will call notifyItemRangeChanged post(new Runnable() { run() { layoutManager.getLastVisibleItem(); // == -1 (using runnable or not) } } } It seems that the children views are not ready yet. Using a tree observer on the RecyclerView seems to solve the problem, but what would be the best approach to get the last visible