Skip to content

Commit

Permalink
Support more scale types
Browse files Browse the repository at this point in the history
  • Loading branch information
waynell committed Jan 5, 2017
1 parent 80e312b commit 46ab825
Show file tree
Hide file tree
Showing 10 changed files with 411 additions and 314 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ VideoListPlayer实现了在列表控件(ListView, RecyclerView)中加载并

#Changelogs

**v.14**
1.支持更多类型的scaleType,详见 [Android-ScalableVideoView](https://github.com/yqritc/Android-ScalableVideoView)
2.加入 `getCurrentPosition()``getDuration()` 接口

**v1.3**

fix在多类型列表元素中出现视频无法正常播放的bug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ void cliclVideoView() {
videoView.mute();
Toast.makeText(itemView.getContext(), "turn off video sound", Toast.LENGTH_SHORT).show();
}

Toast.makeText(itemView.getContext(), "durration: " + videoView.getDuration() + " pos: " + videoView.getCurrentPosition(), Toast.LENGTH_LONG).show();
}

private void reset() {
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/video_list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="300dp"
android:background="#000000"
android:orientation="vertical">

<FrameLayout
Expand All @@ -13,7 +14,8 @@
<com.waynell.videolist.widget.TextureVideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="300dp" />
android:layout_height="300dp"
app:scaleType="fitCenter"/>

<ImageView
android:id="@+id/video_cover"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.waynell.videolist.widget;

/**
* Create On 05/01/2017
* @author Wayne
*/
public enum PivotPoint {
LEFT_TOP,
LEFT_CENTER,
LEFT_BOTTOM,
CENTER_TOP,
CENTER,
CENTER_BOTTOM,
RIGHT_TOP,
RIGHT_CENTER,
RIGHT_BOTTOM
}

This file was deleted.

Loading

0 comments on commit 46ab825

Please sign in to comment.