jeudi 21 avril 2016

ImageArray not populating when the feilds are passed to it

So I have an imageArray it finds the 17 fields. But will not populate them to an Array at the end. It says the image array is empty. My dubugger shows that the log is populated with 17 fields from the database. But the array fails to include them @

imageArray.add(rn);

Java onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_myreceipts);

    ReceiptsOperations ro = new ReceiptsOperations(this);

    List<Receipt> receipts = ro.getReceipts();
    for(Receipt rn : receipts){
        String log = "RECEIPTID:" + rn.getReceiptID() + "RECEIPTURI:" + rn.getReceiptURI();

        Log.d("Result: ", log);
        imageArray.add(rn);

    }

If you need any further code please ask for it. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire