FileDocCategorySizeDatePackage
GridPadding.javaAPI DocAndroid 5.1 API1473Thu Mar 12 22:22:12 GMT 2015android.widget.gridview

GridPadding

public class GridPadding extends android.app.Activity
Exercises a grid with padding

Fields Summary
private android.widget.GridView
mGridView
Constructors Summary
Methods Summary
public android.widget.GridViewgetGridView()

        return mGridView;
    
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        setContentView(R.layout.grid_padding);

        String values[] = new String[1000];
        for(int i = 0; i < 1000; i++) {
            values[i] = String.valueOf(i);
        }

        mGridView = (GridView) findViewById(R.id.grid);
        mGridView.setAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, values));