/** * Scroll to a group. * * @param groupPosition Position of the group item * @param childItemHeight Height of each child item height * @param topMargin Top margin * @param bottomMargin Bottom margin */ public void scrollToGroup(int groupPosition, int childItemHeight, int topMargin, int bottomMargin) { int totalChildrenHeight = getChildCount(groupPosition) * childItemHeight; scrollToGroupWithTotalChildrenHeight(groupPosition, totalChildrenHeight, topMargin, bottomMargin, null); }
/** * Scroll to a group. * * @param groupPosition Position of the group item * @param childItemHeight Height of each child item height * @param topMargin Top margin * @param bottomMargin Bottom margin * @param path Adapter path for the wrapped adapter returned by the {@link #createWrappedAdapter(RecyclerView.Adapter)}. */ public void scrollToGroup(int groupPosition, int childItemHeight, int topMargin, int bottomMargin, AdapterPath path) { int totalChildrenHeight = getChildCount(groupPosition) * childItemHeight; scrollToGroupWithTotalChildrenHeight(groupPosition, totalChildrenHeight, topMargin, bottomMargin, path); }