Tenho este RecyclerView porem ele começa mostrando o meio da pista, deveria abrir mostrando o topo. ja tentei varias coisas, porem sem sucesso
rv_noticas.setHasFixedSize(false); LinearLayoutManager llm = new LinearLayoutManager(getActivity()); llm.setReverseLayout(true); rv_noticas.setLayoutManager(llm); rv_noticas.setAdapter(new AdapterNoticias(getContext(),response.body()));
XML:
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" app:elevation="0dp"> <android.support.design.widget.CollapsingToolbarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="false" app:layout_scrollFlags="scroll|enterAlways"> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" app:layout_collapseMode="pin"> <com.nex3z.togglebuttongroup.SingleSelectToggleGroup android:id="@+id/group_unidades" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/transparent" android:padding="4dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:tbgCheckedButton="@+id/tudo"> <com.nex3z.togglebuttongroup.button.LabelToggle android:id="@+id/tudo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="2dp" android:text="Tudo" app:tbgMarkerColor="@color/colorPrimary" /> <com.nex3z.togglebuttongroup.button.LabelToggle android:id="@+id/unidade" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="2dp" android:text="Praia da Costa" app:tbgMarkerColor="@color/colorPrimary" /> </com.nex3z.togglebuttongroup.SingleSelectToggleGroup> </android.support.constraint.ConstraintLayout> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout> <android.support.v7.widget.RecyclerView android:id="@+id/rv_noticias" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior" />