# Data Loader

The dummy data displayed load by Class **/data/DataGenerator.java**\
Here example , we construct List from array data.

```java
/**
 * Generate dummy data people
 *
 * @param ctx android context
 * @return list of object
 */

public static List<People> getPeopleData(Context ctx) {
	List<People> items = new ArrayList<>();
	TypedArray drw_arr = ctx.getResources().obtainTypedArray(R.array.people_images);
	String name_arr[] = ctx.getResources().getStringArray(R.array.people_names);
	for (int i = 0; i < drw_arr.length(); i++) {
		People obj = new People();
		obj.image = drw_arr.getResourceId(i, -1);
		obj.name = name_arr[i];
		obj.email = Tools.getEmailFromName(obj.name);
		obj.imageDrw = ctx.getResources().getDrawable(obj.image);
		items.add(obj);
	}
	Collections.shuffle(items);
	return items;
}
/**
 * Generate dummy data social
 *
 * @param ctx android context
 * @return list of object
 */
public static List<Social> getSocialData(Context ctx) {
	List<Social> items = new ArrayList<>();
	TypedArray drw_arr = ctx.getResources().obtainTypedArray(R.array.social_images);
	String name_arr[] = ctx.getResources().getStringArray(R.array.social_names);

	for (int i = 0; i < drw_arr.length(); i++) {
		Social obj = new Social();
		obj.image = drw_arr.getResourceId(i, -1);
		obj.name = name_arr[i];
		obj.imageDrw = ctx.getResources().getDrawable(obj.image);
		items.add(obj);
	}
	Collections.shuffle(items);
	return items;
}
```
