Hi thanks for your use-full tutorial i watched on youtube. i have an issue after i watched your tutorial. you are using ArrayList when you add item on the listView. in my case i am using ArrayList. Item is a different class where i use setter and getter method.
when i try to read the file
try {
stream = new FileInputStream ( readFrom );
stream.read ( content );
String s = new String ( content );
s = s.substring ( 1, s.length () - 1 );
String split[] = s.split ( ", " );
listOfItem = new ArrayList<> ( Arrays.asList (split));
mAdapter = new CustomAdapter_1 ( getContext (), listOfItem );
recyclerView.setAdapter ( mAdapter );
} catch (Exception e) {
e.printStackTrace ();
}
listofitem is reference from ArrayList.
this is where i am getting an error
listOfItem = new ArrayList<> ( Arrays.asList (split));
can you please solve my issue i really appreciate for your time. thanks
Hi thanks for your use-full tutorial i watched on youtube. i have an issue after i watched your tutorial. you are using ArrayList when you add item on the listView. in my case i am using ArrayList. Item is a different class where i use setter and getter method.
when i try to read the file
try {
stream = new FileInputStream ( readFrom );
stream.read ( content );
listofitem is reference from ArrayList.
this is where i am getting an error
listOfItem = new ArrayList<> ( Arrays.asList (split));
can you please solve my issue i really appreciate for your time. thanks