Search in sources :

Example 6 with BusSupport

use of com.tmall.wireless.tangram.eventbus.BusSupport in project Tangram-Android by alibaba.

the class LinearScrollView method onMotionEvent.

@Override
public void onMotionEvent(View view, MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_UP) {
        if (lSCell != null && lSCell.serviceManager != null) {
            BusSupport busSupport = lSCell.serviceManager.getService(BusSupport.class);
            ArrayMap<String, String> params = new ArrayMap<String, String>();
            params.put("spmcOffset", String.valueOf(lSCell.cells.size()));
            busSupport.post(BusSupport.obtainEvent("onMotionEvent", null, params, null));
        }
    }
}
Also used : BusSupport(com.tmall.wireless.tangram.eventbus.BusSupport) ArrayMap(android.support.v4.util.ArrayMap)

Example 7 with BusSupport

use of com.tmall.wireless.tangram.eventbus.BusSupport in project Tangram-Android by alibaba.

the class LinearScrollView method onOverScroll.

@Override
public void onOverScroll(View view, float offset) {
    if (lSCell != null && lSCell.serviceManager != null) {
        BusSupport busSupport = lSCell.serviceManager.getService(BusSupport.class);
        ArrayMap<String, String> params = new ArrayMap<String, String>();
        params.put("offset", String.valueOf(offset));
        busSupport.post(BusSupport.obtainEvent("onOverScroll", null, params, null));
    }
}
Also used : BusSupport(com.tmall.wireless.tangram.eventbus.BusSupport) ArrayMap(android.support.v4.util.ArrayMap)

Aggregations

BusSupport (com.tmall.wireless.tangram.eventbus.BusSupport)7 ArrayMap (android.support.v4.util.ArrayMap)2 EventContext (com.tmall.wireless.tangram.eventbus.EventContext)1 BannerListener (com.tmall.wireless.tangram.ext.BannerListener)1 BannerCell (com.tmall.wireless.tangram.structure.cell.BannerCell)1 TimerSupport (com.tmall.wireless.tangram.support.TimerSupport)1 VafContext (com.tmall.wireless.vaf.framework.VafContext)1 JSONException (org.json.JSONException)1