Skip to content

Instantly share code, notes, and snippets.

Avatar

Bogdan Melnychuk bmelnychuk

  • Hamburg, Germany
View GitHub Profile
@gabrielemariotti
gabrielemariotti / GridActivity.java
Created Jul 27, 2014
Android Wear: How to use a simple a GridViewPager with a FragmentGridPagerAdapter.
View GridActivity.java
public class GridActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.grid);
final GridViewPager mGridPager = (GridViewPager) findViewById(R.id.pager);
mGridPager.setAdapter(new SampleGridPagerAdapter(this, getFragmentManager()));
}