예제 #1
0
 @Override
 public void prepare(BaseDanmakuParser parser) {
   prepare();
   handler.setParser(parser);
   handler.setCallback(mCallback);
   handler.prepare();
 }
예제 #2
0
 @Override
 public void start(long postion) {
   if (handler == null) {
     prepare();
   } else {
     handler.removeCallbacksAndMessages(null);
   }
   handler.obtainMessage(DrawHandler.START, postion).sendToTarget();
 }
예제 #3
0
  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);
  }