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

Grid2

public class Grid2 extends android.app.Activity
A grid that displays a set of framed photos.

Fields Summary
private android.widget.ImageSwitcher
mSwitcher
Constructors Summary
Methods Summary
public android.view.ViewmakeView()

        ImageView i = new ImageView(this);
        i.setBackgroundColor(0xFF000000);
        i.setScaleType(ImageView.ScaleType.FIT_CENTER);
        i.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
                LayoutParams.FILL_PARENT));
        return i;
    
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        setContentView(R.layout.grid_2);
        
        GridView g = (GridView) findViewById(R.id.myGrid);
        g.setAdapter(new ImageAdapter(this));