1 / 11
文档名称:

android弹幕实现:基于某b站弹幕开源系统(1).docx

格式:docx   大小:370KB   页数:11页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

android弹幕实现:基于某b站弹幕开源系统(1).docx

上传人:511709291 2019/8/22 文件大小:370 KB

下载得到文件列表

android弹幕实现:基于某b站弹幕开源系统(1).docx

相关文档

文档介绍

文档介绍:Android弹幕实现:基于B站弹幕开源系统(1)Android弹幕实现:基于B站弹幕开源系统(1)如今的视频播放,流行在视频上飘弹幕。这里面做的相对比较成熟、稳定、使用量较多的弹幕系统,当推B站的弹幕系统,B站的弹幕系统已经作为开源项目在github上,其项目地址:https:///Bilibili/DanmakuFlameMaster 以B站开源的弹幕项目为基础,现给出一个简单的例子,实现发送简单的文本弹幕。第一步,:[plain] viewplain copyrepositories {          jcenter()  }      dependencies {        compile ':DanmakuFlameMaster:'      compile ':ndkbitmap-armv7a:'    }  第二步,写一个布局文件,引入B站的弹幕view:[html] viewplain copy<?xml version="" encoding="utf-8"?>  <LinearLayout xmlns:android="http://schemas./apk/res/android"      android:layout_width="match_parent"      android:layout_height="match_parent"      android:orientation="vertical">        <Button          android:id="@+id/show"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="显示弹幕" />        <Button          android:id="@+id/hide"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="隐藏弹幕" />        <Button          android:id="@+id/sendText"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="发送文本弹幕" />        <Button          android:id="@+id/pause"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="暂停弹幕" />        <Button          android:id="@+id/resume"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="重启弹幕" />        <          android:id="@+id/danmakuView"          android:layout_width="match_parent"          android:layout_height="match_parent" />    </LinearLayout>  第三步,写上层Java代码(该处java代码改造自B站弹幕github上的demo代码):[java] viewplain copypackage ;    import ;  import ;  import ;  import ;  import androi