private void resetPagerItemStyling(int page) { if (page > 0) { page--; adapter.setTurnIcon( pager.findViewWithTag("Instruction_" + page), DisplayHelper.getRouteDrawable( pager.getContext(), instructions.get(page).getTurnInstruction(), DisplayHelper.IconStyle.GRAY)); adapter.setBackgroundColorInactive(pager.findViewWithTag("Instruction_" + page)); } }
private void setCurrentPagerItemStyling(int page) { if (page == instructions.size() - 1) { adapter.setBackgroundColorComplete(pager.findViewWithTag("Instruction_" + page)); } else { adapter.setBackgroundColorActive(pager.findViewWithTag("Instruction_" + page)); } adapter.setTurnIcon( pager.findViewWithTag("Instruction_" + page), DisplayHelper.getRouteDrawable( pager.getContext(), instructions.get(page).getTurnInstruction(), DisplayHelper.IconStyle.STANDARD)); resetPagerItemStyling(page); }