Search in sources :

Example 1 with FakeHeaderItem

use of com.abewy.android.apps.klyph.items.FakeHeaderItem in project Klyph by jonathangerbaud.

the class FakeHeaderItemAdapter method mergeViewWithData.

@Override
protected void mergeViewWithData(View view, GraphObject data) {
    FakeHeaderItem item = (FakeHeaderItem) data;
    LayoutParams params = view.getLayoutParams();
    params.height = item.getHeight();
    view.setLayoutParams(params);
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams) FakeHeaderItem(com.abewy.android.apps.klyph.items.FakeHeaderItem)

Example 2 with FakeHeaderItem

use of com.abewy.android.apps.klyph.items.FakeHeaderItem in project Klyph by jonathangerbaud.

the class KlyphFakeHeaderGridFragment method populate.

@Override
protected void populate(List<GraphObject> data) {
    if (fakeHeaderHeight > 0 && data.size() > 0 && getAdapter().getCount() == 0) {
        for (int i = 0, n = getNumColumn(); i < n; i++) {
            FakeHeaderItem fakeHeaderItem = new FakeHeaderItem();
            fakeHeaderItem.setHeight(fakeHeaderHeight);
            fakeHeaders.add(fakeHeaderItem);
            getAdapter().add(fakeHeaderItem);
        }
    }
    super.populate(data);
}
Also used : FakeHeaderItem(com.abewy.android.apps.klyph.items.FakeHeaderItem)

Aggregations

FakeHeaderItem (com.abewy.android.apps.klyph.items.FakeHeaderItem)2 LayoutParams (android.view.ViewGroup.LayoutParams)1