I have a class like this :
import java.util.ArrayList;
/* Get ArrayList of UserModel type */
public class GetUserModelData {
public static ArrayList<UserModel> getUserModelData() {
ArrayList<UserModel> arrayList = new ArrayList<>();
arrayList.add(new UserModel("Droid", "[email protected]"));
arrayList.add(new UserModel("John", "[email protected]"));
arrayList.add(new UserModel("David" , "[email protected]"));
arrayList.add(new UserModel("Humpy", "[email protected]"));
arrayList.add(new UserModel("Sharma", "[email protected]"));
arrayList.add(new UserModel("Dravid", "[email protected]"));
return arrayList;
}
}
I want use getString instead hardcode text. Because this ArrayList dataset is use for multiple Fragment.
Can anyone helpme.