@Test public void shouldCheckedDefaultInventoryDay() throws Exception { inventoryList.get(1).setChecked(true); selectPeriodActivity.refreshDate(inventoryList); assertThat(selectPeriodActivity.vgContainer.getCheckedItemPosition(), is(1)); }
@Override public void refreshDate(List<SelectInventoryViewModel> inventories) { adapter.refreshDate(inventories); for (SelectInventoryViewModel selectInventoryViewModel : inventories) { if (selectInventoryViewModel.isChecked()) { int position = inventories.indexOf(selectInventoryViewModel); vgContainer.setItemChecked(position, true); selectedInventory = adapter.getItem(position); } } }
SelectPeriodActivity extends BaseActivity implements SelectPeriodPresenter.SelectPeriodView { @Override public void refreshDate(List<SelectInventoryViewModel> inventories) { adapter.refreshDate(inventories); for (SelectInventoryViewModel selectInventoryViewModel : inventories) { if (selectInventoryViewModel.isChecked()) { int position = inventories.indexOf(selectInventoryViewModel); vgContainer.setItemChecked(position, true); selectedInventory = adapter.getItem(position); } } } }
SelectPeriodActivity extends BaseActivity implements SelectPeriodPresenter.SelectPeriodView { @Override public void refreshDate(List<SelectInventoryViewModel> inventories) { adapter.refreshDate(inventories); for (SelectInventoryViewModel selectInventoryViewModel : inventories) { if (selectInventoryViewModel.isChecked()) { int position = inventories.indexOf(selectInventoryViewModel); vgContainer.setItemChecked(position, true); selectedInventory = adapter.getItem(position); } } }  }
SelectPeriodActivity extends BaseActivity implements SelectPeriodPresenter.SelectPeriodView { @Override public void refreshDate(List<SelectInventoryViewModel> inventories) { adapter.refreshDate(inventories); for (SelectInventoryViewModel selectInventoryViewModel : inventories) { if (selectInventoryViewModel.isChecked()) { int position = inventories.indexOf(selectInventoryViewModel); vgContainer.setItemChecked(position, true); selectedInventory = adapter.getItem(position); } } }  static Intent getIntentToMe(Context context, String programCode); static Intent getIntentToMe(Context context, String programCode, Period period); static Intent getIntentToMe(Context context, String programCode, boolean isMissedPeriod); static Intent getIntentToMe(Context context, String programCode, boolean isMissedPeriod, DateTime periodEnd); @Override void refreshDate(List<SelectInventoryViewModel> inventories); }
SelectPeriodActivity extends BaseActivity implements SelectPeriodPresenter.SelectPeriodView { @Override public void refreshDate(List<SelectInventoryViewModel> inventories) { adapter.refreshDate(inventories); for (SelectInventoryViewModel selectInventoryViewModel : inventories) { if (selectInventoryViewModel.isChecked()) { int position = inventories.indexOf(selectInventoryViewModel); vgContainer.setItemChecked(position, true); selectedInventory = adapter.getItem(position); } } }  static Intent getIntentToMe(Context context, String programCode); static Intent getIntentToMe(Context context, String programCode, Period period); static Intent getIntentToMe(Context context, String programCode, boolean isMissedPeriod); static Intent getIntentToMe(Context context, String programCode, boolean isMissedPeriod, DateTime periodEnd); @Override void refreshDate(List<SelectInventoryViewModel> inventories);  }