我已經開發了代碼,它顯示來自服務器在gridview中的圖像,但stageredgridview不起作用。 下面是我的代碼StaggeredGridLayoutManager不能用於回收站查看
StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2, LinearLayoutManager.VERTICAL);
CustomAdapter customAdapter = new CustomAdapter(MainActivity.this, personNames, personImages);
recyclerView.setLayoutManager(staggeredGridLayoutManager);
recyclerView.setAdapter(customAdapter);
發表您的代碼.. –
請檢查代碼。 –
我有同樣的問題。我檢查了兩次並解決了我自己。祝你好運 –