@Override public void prepare(BaseDanmakuParser parser) { prepare(); handler.setParser(parser); handler.setCallback(mCallback); handler.prepare(); }
@Override public void start(long postion) { if (handler == null) { prepare(); } else { handler.removeCallbacksAndMessages(null); } handler.obtainMessage(DrawHandler.START, postion).sendToTarget(); }
private void init() { danmakuView.prepare(new BiliDanmukuParser(), danmukuContext); danmakuView.setCallback( new DrawHandler.Callback() { @Override public void prepared() { danmakuView.start(); } @Override public void updateTimer(DanmakuTimer timer) {} @Override public void danmakuShown(BaseDanmaku danmaku) {} @Override public void drawingFinished() {} }); danmakuView.enableDanmakuDrawingCache(true); }