Search in sources :

Example 16 with ObservableGridView

use of com.github.ksoichiro.android.observablescrollview.ObservableGridView in project UltimateAndroid by cymcsg.

the class ActionBarControlGridViewActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.observable_scroll_view_activity_actionbarcontrolgridview);
    ObservableGridView gridView = (ObservableGridView) findViewById(R.id.grid);
    gridView.setScrollViewCallbacks(this);
    List<String> items = new ArrayList<String>();
    for (int i = 1; i <= 100; i++) {
        items.add("Item " + i);
    }
    gridView.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items));
}
Also used : ArrayList(java.util.ArrayList) ObservableGridView(com.github.ksoichiro.android.observablescrollview.ObservableGridView)

Aggregations

ObservableGridView (com.github.ksoichiro.android.observablescrollview.ObservableGridView)16 View (android.view.View)11 AbsListView (android.widget.AbsListView)4 ObservableScrollViewCallbacks (com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks)4 SuppressLint (android.annotation.SuppressLint)3 Activity (android.app.Activity)3 Bundle (android.os.Bundle)2 FrameLayout (android.widget.FrameLayout)2 Fragment (android.support.v4.app.Fragment)1 ViewGroup (android.view.ViewGroup)1 AdapterView (android.widget.AdapterView)1 TextView (android.widget.TextView)1 ArrayList (java.util.ArrayList)1