VideoLoadingView
来源:互联网 发布:linux snmp v3测试 编辑:程序博客网 时间:2024/06/05 15:19
项目地址:VideoLoadingView
简介:一个简单的加载界面
中文版
It's a loading view which can customize its color, change its speed or control it by yourselves(register a listener).
Maybe it's suitable for those video playing layouts.
Preview
Integration
Android Studio
allprojects { repositories { ... maven { url "https://jitpack.io" } } } dependencies { compile 'com.github.XuDeveloper:VideoLoadingView:v1.0' }
Eclipse
Maybe you can copy my code to your project!
Usage
Declare a VideoLoadingView inside your XML layout file:
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <com.xu.library.VideoLoadingView android:id="@+id/videoloadingview" android:layout_width="wrap_content" android:layout_height="wrap_content" app:ArcColor="@color/green" app:TriangleColor="@color/green" /></RelativeLayout>
Or use Java code dynamically.
view = (VideoLoadingView) findViewById(R.id.videoLoadingView); view.setArcColor(Color.GREEN); view.setTriangleColor(Color.GREEN); view.setSpeed(VideoLoadingViewSpeed.SPEED_FAST); //Default: VideoLoadingViewSpeed.SPEED_MEDIUM // view.setSpeed(VideoLoadingViewSpeed.SPEED_SLOW); view.start(); //Default: stop() // view.pause(); // view.stop();
You can register a listener:
view.registerVideoViewListener(new VideoLoadingView.VideoViewListener() { @Override public void onStart() { Log.i(TAG, "video_loading_view onStart"); } @Override public void onPause(double progress) { Log.i(TAG, "video_loading_view onPause, progress:" + progress); } @Override public void onStop() { Log.i(TAG, "video_loading_view onStop"); } });
0 0
- VideoLoadingView
- 常用用户输入验证
- facebook提供的持有环检测工具(待总结)
- HTML第一章上机练习4
- DeepID2:Deep Learning Face Representation by Joint Identification-Verification
- C++设计模式之策略模式
- VideoLoadingView
- Android BitmapShader 实现圆形、圆角图片
- unity代码笔记<3>自动寻径
- java跨服务器保存文件:jcifs & FTP
- Android SDK在线更新镜像服务器
- 成败得失
- 为什么用scp不能在不同网段中拷贝?
- AngularJS的UI-Router学习
- DeepID2+:Deeply Learned Attributes for Crowded Scene Understanding