Search in sources :

Example 1 with ITangramViewLifeCycle

use of com.tmall.wireless.tangram3.structure.view.ITangramViewLifeCycle in project Tangram-Android by alibaba.

the class MVHelper method postMountView.

private void postMountView(BaseCell cell, View view) {
    if (!cell.mIsExposed && cell.serviceManager != null) {
        ExposureSupport exposureSupport = cell.serviceManager.getService(ExposureSupport.class);
        if (exposureSupport != null) {
            cell.mIsExposed = true;
            exposureSupport.onExposure(view, cell, cell.pos);
        }
    }
    if (view instanceof ITangramViewLifeCycle) {
        ((ITangramViewLifeCycle) view).postBindView(cell);
    } else {
        if (postBindMap.get(cell) != null) {
            try {
                postBindMap.get(cell).invoke(view, cell);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
Also used : ExposureSupport(com.tmall.wireless.tangram3.support.ExposureSupport) ITangramViewLifeCycle(com.tmall.wireless.tangram3.structure.view.ITangramViewLifeCycle)

Aggregations

ITangramViewLifeCycle (com.tmall.wireless.tangram3.structure.view.ITangramViewLifeCycle)1 ExposureSupport (com.tmall.wireless.tangram3.support.ExposureSupport)1