无法解析方法setReverseLayout和setStackFromEnd?

时间:2017-03-17 13:42:56

标签: android android-studio android-linearlayout

我试图从底部开始我的recyclerview itens,所以我尝试了:

//Initializing Views
recyclerView = (RecyclerView) findViewById(R.id.recyclerViewLf);
recyclerView.setHasFixedSize(true);
layoutManager = new LinearLayoutManager(this);

layoutManager.setReverseLayout(true);
layoutManager.setStackFromEnd(true);

recyclerView.setLayoutManager(layoutManager);

问题是setReverseLayout和setStackFromEnd无法解析方法... boolean。

任何想法?

1 个答案:

答案 0 :(得分:3)

更改

RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);

LinearLayoutManager layoutManager = new LinearLayoutManager(this);