use of com.marshalchen.common.demoofui.artbook.data.DribbbleDataAdapter in project UltimateAndroid by cymcsg.
the class FreeFlowArtbookActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.free_flow_artbook);
container = (FreeFlowContainer) findViewById(R.id.container);
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
findViewById(R.id.load_more).setOnClickListener(this);
//Our new layout
custom = new ArtbookLayout();
//Grid Layout
grid = new VGridLayout();
VGridLayout.LayoutParams params = new VGridLayout.LayoutParams(size.x / 2, size.x / 2);
grid.setLayoutParams(params);
//Vertical Layout
VLayout vlayout = new VLayout();
VLayout.LayoutParams params2 = new VLayout.LayoutParams(size.x);
vlayout.setLayoutParams(params2);
//HLayout
HLayout hlayout = new HLayout();
hlayout.setLayoutParams(new HLayout.LayoutParams(size.x));
layouts = new FreeFlowLayout[] { custom, grid, vlayout, hlayout };
adapter = new DribbbleDataAdapter(this);
container.setLayout(layouts[currLayoutIndex]);
container.setAdapter(adapter);
fetch = new DribbbleFetch();
fetch.load(this, itemsPerPage, pageIndex);
}
Aggregations