FileDocCategorySizeDatePackage
GridInHorizontal.javaAPI DocAndroid 5.1 API1698Thu Mar 12 22:22:12 GMT 2015android.widget.gridview

GridInHorizontal

public class GridInHorizontal extends android.app.Activity
Exercises a grid in a horizontal linear layout

Fields Summary
android.os.Handler
mHandler
android.widget.TextView
mText
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_in_horizontal);

        String values[] = new String[1000];
        int i=0;
        for(i=0; i<1000; i++) {
            values[i] = ((Integer)i).toString();
        }
        
        mText = (TextView) findViewById(R.id.text);
        mGridView = (GridView) findViewById(R.id.grid);
        mGridView.setAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, values));