2017-10-26 3 views

答えて

1

recyclerView

賛否の数長所と短所があります。

· integrated animations for adding, updating and removing items 
· enforces the recycling of views by using the ViewHolder pattern 
· supports both grids and lists 
· supports vertical and horizontal scrolling 

短所:あなたがしている場合は

· adds complexity 

ていることを確認して

· There won't be more then 5 elements ever in future 
· You don't need integrated animations for items 
· You don't need to edit each item in the list 
· You don't need to change the appearance of grid vs list dynamically 

次に、RecyclerViewを使用しないことをお勧めします。それは複雑さを追加し、あなたが好きなように各itemViewで遊ぶのが簡単になります。

0

5要素まで、スクロールする権利はありません。だからそれにはtextviewをよく作成してください。スクロールしている 画面場合は、それが現在画面に表示されているメモリ内の項目を開催しますので、その後、recyclerviewは意味をなさないだろう

0

余分なアイテムを追加したい場合は、リサイクルビューを使用するアイテムは5つだけです。

関連する問題