How to view data from a TXT in my arrayList - Android Studio

Asked

Viewed 25 times

1

Currently I do so:

ArrayList<produtoItem> lista = new ArrayList<produtoItem>();

lista.add(new produtoItem(R.drawable.imagem, "AA", "AA", "AA", "AA"));

adapter = new produtoAdapter(this, lista);
ListView listView = (ListView) findViewById(R.id.listView1);
listView.setAdapter(adapter);

THE QUESTION IS: How to use a TXT as "DATABASE"?

I need to enter more than 3000 items, which generates error: method code Too large. I believe that using a TXT as "DATABASE" will solve my problem.

NOTE: This app needs to work without the need for internet. I mean, I cannot use an external database.

  • https://developer.android.com/training/data-storage/sqlite

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.