felipecsl / AsymmetricGridView

Android ListView that mimics a GridView with asymmetric items. Supports items with row span and column span
http://felipecsl.com/AsymmetricGridView
MIT License
1.84k stars 431 forks source link

Hello ,I find a bug. #52

Open weorwe opened 8 years ago

weorwe commented 8 years ago

Hey,I find a bug, can you help me to solve this bug。thank you。 content :
i setting listView.setRequestedColumnCount(4),and in DemoUtils.class “moarItems” mathod ,alter 。this is the code 。The results of last item Don't show。 public List moarItems(int qty) { List items = new ArrayList<>(); for (int i = 0; i < 4; i++) { int colSpan = Math.random() < 0.2f ? 2 : 1; // Swap the next 2 lines to have items with variable // column/row span. // int rowSpan = Math.random() < 0.2f ? 2 : 1; int rowSpan = colSpan; DemoItem item=null; if (i == 0) { item = new DemoItem(2, 2, currentOffset + i); }else if(i==1){ item = new DemoItem(2, 1, currentOffset + i); }else{ item = new DemoItem(1, 1, currentOffset + i); } items.add(item); } currentOffset += qty; return items; } thank you for you。my god