Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to add data into list model in android

List<MeModel> meModels = new ArrayList<>();

meModels.clear();
meModels.add(new MeModel(...));
// ^^^^^ add item
meModels.get(0).setFirstname("Hello"); // get item
meModels.get(0).setLastname("World");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #data #list #model #android
ADD COMMENT
Topic
Name
3+2 =