-5

I have a Category List & I want to implement History.Java in my project. which has same fields or parameters as a Category List . Now how to use same ListView for history. I am taking a global boolean Function . I think it will work. But I want to know any good technique for this. Please tell me? I want to call same Category.Java Class for history & Category List.

Michael Yaworski
  • 13,410
  • 19
  • 69
  • 97
Deepanker Chaudhary
  • 1,694
  • 3
  • 15
  • 35

2 Answers2

1

You can also pass 1 dimension array list in Intent

Bundle intentbundle = new Bundle();
        intentbundle.putStringArrayList("arrList",arrList);

       intent.putExtras(intentbundle);

       startActivity(intent);

and get values by nex activity

Bundle extras = getIntent().getExtras();
mArrList = extras.getStringArrayList("arrList");
Ashwani Tyagi
  • 510
  • 1
  • 5
  • 15
0

Create ListView adapter. Then you'll put some data into the adapter, set it in Listview, and your data will be changed. Read here: http://www.vogella.com/articles/AndroidListView/article.html

SVS
  • 200
  • 9