Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.graphics.drawable.Drawable; import android.widget.ArrayAdapter; import android.widget.GridView; import java.util.List; public class Main { public static void fillGrid(Context context, GridView lv, List<Drawable> ls) { ArrayAdapter<Drawable> adapter = new ArrayAdapter<>(context, android.R.layout.simple_list_item_1, ls); lv.setAdapter(adapter); } }