1. 程式人生 > >解決RecyclerView 使用 gridlayoutmanager 時item不居中問題

解決RecyclerView 使用 gridlayoutmanager 時item不居中問題

請查閱http://blog.csdn.net/u010940300/article/details/49151411這篇文章.

其中,cardview相當於framlayout佈局.

item的根佈局請選擇linearlayout,其中layout_width選擇match_parent,要不然仍然不會居中.