https://github.com/carrys17/RecyclerViewTest自己跟著視頻敲的代碼,需要的可以看下。
2017-06-26
https://github.com/carrys17/RecyclerViewTest 自己跟著這個視頻敲的代碼,需要的可以看下。
為什么我使用同樣的代碼, recyclerView.setLayoutManager(new StaggeredGridLayoutManager(5,
StaggeredGridLayoutManager.HORIZONTAL));,但是現實出來的效果不一樣
StaggeredGridLayoutManager.HORIZONTAL));,但是現實出來的效果不一樣
2017-04-26
大家在做的時候有一個細節需要注意:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@color/color_pressed"/>
<item android:drawable="@color/color_normal"/>
</selector>
默認的顏色的item應該放在按壓顏色item的后面(向上面這樣),如果顛倒順序的話,則在按壓時無法顯示指定的顏色
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@color/color_pressed"/>
<item android:drawable="@color/color_normal"/>
</selector>
默認的顏色的item應該放在按壓顏色item的后面(向上面這樣),如果顛倒順序的話,則在按壓時無法顯示指定的顏色
2017-04-03
老師忽略了一個問題,瀑布流的itemView的高度當時是根據mDatas的size添加的。當點擊增加刪除時mDatas的size發生了變化,但并沒有刷新mHeights數組。所以當添加或者刪除view后,向下滑到底必然會報數組越界的Exception。
2017-03-27