Search in sources :

Example 1 with BaseCellBinder

use of com.tmall.wireless.tangram.dataparser.concrete.BaseCellBinder in project Tangram-Android by alibaba.

the class BaseTangramEngine method registerVirtualViewTemplate.

/**
 * set compiled binary data after engine has been setup, used when load template data dynamically
 * @param type
 * @param data
 */
public void registerVirtualViewTemplate(String type, byte[] data) {
    BaseCellBinderResolver baseCellBinderResolver = getService(BaseCellBinderResolver.class);
    BaseCardBinderResolver baseCardBinderResolver = getService(BaseCardBinderResolver.class);
    if (baseCellBinderResolver != null && baseCardBinderResolver != null) {
        CardResolver cardResolver = baseCardBinderResolver.getDelegate();
        MVHelper mMVHelper = getService(MVHelper.class);
        if (cardResolver != null && mMVHelper != null) {
            baseCellBinderResolver.register(type, new BaseCellBinder(type, mMVHelper));
            cardResolver.register(type, VVCard.class);
            setVirtualViewTemplate(data);
        }
    }
}
Also used : BaseCellBinderResolver(com.tmall.wireless.tangram.dataparser.concrete.BaseCellBinderResolver) CardResolver(com.tmall.wireless.tangram.dataparser.concrete.CardResolver) BaseCellBinder(com.tmall.wireless.tangram.dataparser.concrete.BaseCellBinder) BaseCardBinderResolver(com.tmall.wireless.tangram.dataparser.concrete.BaseCardBinderResolver)

Aggregations

BaseCardBinderResolver (com.tmall.wireless.tangram.dataparser.concrete.BaseCardBinderResolver)1 BaseCellBinder (com.tmall.wireless.tangram.dataparser.concrete.BaseCellBinder)1 BaseCellBinderResolver (com.tmall.wireless.tangram.dataparser.concrete.BaseCellBinderResolver)1 CardResolver (com.tmall.wireless.tangram.dataparser.concrete.CardResolver)1