use of uk.co.senab.actionbarpulltorefresh.library.viewdelegates.AbsListViewDelegate in project ActionBar-PullToRefresh by chrisbanes.
the class GridViewActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gridview);
GridView gridView = (GridView) findViewById(R.id.ptr_gridview);
ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ITEMS);
gridView.setAdapter(adapter);
// Now find the PullToRefreshLayout and set it up
mPullToRefreshLayout = (PullToRefreshLayout) findViewById(R.id.ptr_layout);
ActionBarPullToRefresh.from(this).options(Options.create().scrollDistance(.75f).headerLayout(R.layout.customised_header).headerTransformer(new CustomisedHeaderTransformer()).build()).allChildrenArePullable().listener(this).useViewDelegate(GridView.class, new AbsListViewDelegate()).setup(mPullToRefreshLayout);
}
use of uk.co.senab.actionbarpulltorefresh.library.viewdelegates.AbsListViewDelegate in project ActionBar-PullToRefresh by chrisbanes.
the class GridViewActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gridview);
GridView gridView = (GridView) findViewById(R.id.ptr_gridview);
ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ITEMS);
gridView.setAdapter(adapter);
// Now find the PullToRefreshLayout and set it up
mPullToRefreshLayout = (PullToRefreshLayout) findViewById(R.id.ptr_layout);
ActionBarPullToRefresh.from(this).options(Options.create().scrollDistance(.75f).headerLayout(R.layout.customised_header).headerTransformer(new CustomisedHeaderTransformer()).build()).allChildrenArePullable().listener(this).useViewDelegate(GridView.class, new AbsListViewDelegate()).setup(mPullToRefreshLayout);
}
use of uk.co.senab.actionbarpulltorefresh.library.viewdelegates.AbsListViewDelegate in project ActionBar-PullToRefresh by chrisbanes.
the class GridViewActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gridview);
GridView gridView = (GridView) findViewById(R.id.ptr_gridview);
ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, ITEMS);
gridView.setAdapter(adapter);
// Now find the PullToRefreshLayout and set it up
mPullToRefreshLayout = (PullToRefreshLayout) findViewById(R.id.ptr_layout);
ActionBarPullToRefresh.from(this).options(Options.create().scrollDistance(.75f).headerLayout(R.layout.customised_header).headerTransformer(new CustomisedHeaderTransformer()).build()).allChildrenArePullable().listener(this).useViewDelegate(GridView.class, new AbsListViewDelegate()).setup(mPullToRefreshLayout);
}
Aggregations