FileDocCategorySizeDatePackage
Grid1.javaAPI DocGoogle Android v1.5 Example2704Sun Nov 11 13:01:04 GMT 2007com.google.android.samples.view

Grid1

public class Grid1 extends android.app.Activity

Fields Summary
android.widget.GridView
mGrid
private List
mApps
Constructors Summary
Methods Summary
private voidloadApps()

        Intent mainIntent = new Intent(Intent.MAIN_ACTION, null);
        mainIntent.addCategory(Intent.LAUNCHER_CATEGORY);

        mApps = getPackageManager().queryIntentActivities(mainIntent, 0);
    
protected voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        loadApps(); // do this in onresume?

        setContentView(R.layout.grid_1);
        mGrid = (GridView) findViewById(R.id.myGrid);
        mGrid.setAdapter(new AppsAdapter(this));