Android Open Source - gridview-extend Grid View Extend Demo






From Project

Back to project page gridview-extend.

License

The source code is released under:

Apache License

If you think the Android project gridview-extend listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.mcxiaoke.view;
//  ww w. ja v a 2s.  c o  m
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;

import java.util.ArrayList;
import java.util.List;

public class GridViewExtendDemo extends Activity {
    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        List<String> data = new ArrayList<String>();
        for (int i = 0; i < 200; i++) {
            data.add(String.format("Cell %1$03d", i));
        }
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1, data);
        GridViewExtend extendGridView = (GridViewExtend) findViewById(R.id.view);
        extendGridView.getRefreshableView().setAdapter(adapter);
    }
}




Java Source Code List

com.mcxiaoke.view.GridViewExtendDemo.java
com.mcxiaoke.view.GridViewExtend.java
com.mcxiaoke.view.ViewCompat.java