список не пустой -> список пустой -> список не пустойпропал.
@Dao
abstract class ItemDao {
@Transaction
public void replaceItems(List<Item> items) {
clearTable();
insert(items);
}
@Insert
protected abstract void insert(List<Item> items);
@Query("DELETE FROM Item")
protected abstract void clearTable();
}
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<android.support.v7.widget.RecyclerView
android:id="@+id/images"
android:layout_width="wrap_content"
android:layout_height="360dp"
>
</android.support.v7.widget.RecyclerView>
</Relativelayout>
RelativeLayout.LayoutParams lp =
new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, 500);
recyclerView.setLayoutParams(lp);