(int dir)
| 143 | } |
| 144 | |
| 145 | private static void incrementCard(int dir) { |
| 146 | if (dir > 0) { |
| 147 | if (currentIndex == items.size() - 1) { |
| 148 | return; |
| 149 | } |
| 150 | currentIndex++; |
| 151 | |
| 152 | prevCard = currentCard; |
| 153 | currentCard = nextCard; |
| 154 | nextCard = currentIndex < items.size() - 1 ? getCardView(items.get(currentIndex + 1)) : null; |
| 155 | } |
| 156 | else { |
| 157 | if (currentIndex == 0) { return; } |
| 158 | currentIndex--; |
| 159 | |
| 160 | nextCard = currentCard; |
| 161 | currentCard = prevCard; |
| 162 | prevCard = currentIndex > 0 ? getCardView(items.get(currentIndex - 1)) : null; |
| 163 | } |
| 164 | onCardChanged(); |
| 165 | } |
| 166 | |
| 167 | private static void onCardChanged() { |
| 168 | mutateIconBounds = null; |
no test coverage detected