I have Problem java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
I have a Spinner with different Number contrat, i choose a contract to display all information of this contract in the same Fragment but i have all the time this error This my code
if (AareonLocataireManager.getInstance().getMultiContrateModel() != null && AareonLocataireManager.getInstance().getMultiContrateModel().size() > 0) {
ArrayList<ContratModel> contracts = AareonLocataireManager.getInstance().getMultiContrateModel();
this.contratModel = contracts.get(1);
Toast.makeText(getActivity(), ""+this.contratModel.getStationnementBailList().get(1).getADDRESS(), Toast.LENGTH_SHORT).show();
}
I put number static 1 just to test but i have all the time the same problem
E/AndroidRuntime: FATAL EXCEPTION: main Process: fr.aareon.logismetropole, PID: 18932 java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.get(ArrayList.java:411)