Skip to content

飘赞View,基于SurfaceView,代码MVP风格,,用于直播等领域

Notifications You must be signed in to change notification settings

simonwzb/ZanView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ZanView

飘赞View,基于SurfaceView,代码MVP风格


Alt text


基本使用:


        //1. 初始化presenter和view
        zanView = findViewById(R.id.***);
        mZanPresenter = new ZanPresenterImpl(this);
        //2. 设置图片集合,可自定义
        mZanPresenter.setDefaultDrawableList();
        //3. 得到控件的宽高,以备以后使用
        mWidth = (int) DensityUtils.dp2px(this, 120f);
        mHeight = (int) DensityUtils.dp2px(this, 180f);

        //启动定时器模式
        zanView.start();
        mZanPresenter.startTimerZan(mWidth, mHeight);

        //增加一个飘赞
        mZanPresenter.popZan(mWidth, mHeight);

        //停止
        mZanPresenter.destroy();

          //直播结束或onDestroy()
          mZanPresenter.destroy();
          if (zanView != null) {
              zanView.stop();
              zanView = null;
          }

About

飘赞View,基于SurfaceView,代码MVP风格,,用于直播等领域

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages