Search in sources :

Example 6 with Section

use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.

the class DefaultSectionAdapter method setData.

public void setData(int headerCount, int itemCount) {
    sections.clear();
    for (int i = 0; i < headerCount; i++) {
        Section s = new Section();
        s.setSectionTitle("Section " + i);
        for (int j = 0; j < itemCount; j++) {
            s.addItem(new Object());
        }
        sections.add(s);
    }
}
Also used : Section(com.comcast.freeflow.core.Section) Paint(android.graphics.Paint)

Example 7 with Section

use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.

the class HGridLayout method getContentWidth.

@Override
public int getContentWidth() {
    if (itemsAdapter == null || itemsAdapter.getNumberOfSections() <= 0) {
        return 0;
    }
    int sectionIndex = itemsAdapter.getNumberOfSections() - 1;
    Section s = itemsAdapter.getSection(sectionIndex);
    if (s.getDataCount() == 0)
        return 0;
    Object lastFrameData = s.getDataAtIndex(s.getDataCount() - 1);
    FreeFlowItem fd = proxies.get(lastFrameData);
    return (fd.frame.left + fd.frame.width());
}
Also used : FreeFlowItem(com.comcast.freeflow.core.FreeFlowItem) Section(com.comcast.freeflow.core.Section)

Example 8 with Section

use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.

the class HLayout method getContentWidth.

@Override
public int getContentWidth() {
    if (itemsAdapter == null || itemsAdapter.getNumberOfSections() <= 0) {
        return 0;
    }
    int sectionIndex = itemsAdapter.getNumberOfSections() - 1;
    Section s = itemsAdapter.getSection(sectionIndex);
    if (s.getDataCount() == 0)
        return 0;
    Object lastFrameData = s.getDataAtIndex(s.getDataCount() - 1);
    FreeFlowItem fd = proxies.get(lastFrameData);
    return (fd.frame.left + fd.frame.width());
}
Also used : FreeFlowItem(com.comcast.freeflow.core.FreeFlowItem) Section(com.comcast.freeflow.core.Section)

Example 9 with Section

use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.

the class VGridLayout method getContentHeight.

@Override
public int getContentHeight() {
    if (itemsAdapter == null || itemsAdapter.getNumberOfSections() <= 0) {
        return 0;
    }
    int sectionIndex = itemsAdapter.getNumberOfSections() - 1;
    Section s = itemsAdapter.getSection(sectionIndex);
    if (s.getDataCount() == 0)
        return 0;
    Object lastFrameData = s.getDataAtIndex(s.getDataCount() - 1);
    FreeFlowItem fd = proxies.get(lastFrameData);
    if (fd == null) {
        return 0;
    }
    return (fd.frame.top + fd.frame.height());
}
Also used : FreeFlowItem(com.comcast.freeflow.core.FreeFlowItem) Section(com.comcast.freeflow.core.Section)

Aggregations

Section (com.comcast.freeflow.core.Section)9 FreeFlowItem (com.comcast.freeflow.core.FreeFlowItem)8 Rect (android.graphics.Rect)4 Paint (android.graphics.Paint)1