Skip to content

Commit

Permalink
更新demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajunhui committed Mar 13, 2020
1 parent d18a7c0 commit d7d5706
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ demo示例集成了播放控制组件**ControllerCover**、加载中组件**Load
* **等功能……**<br>

# Demo下载
[Demo下载](http://fir.im/lmhz)
[Demo下载](http://d.alphaqr.com/lmhz)

# QQ交流群(600201778)
<img src="https://github.com/jiajunhui/PlayerBase/raw/master/screenshot/qrcode_qq_group.jpg" width="270" height="370">
Expand Down
3 changes: 3 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
# 这个过滤器是谷歌推荐的算法,一般不做更改
-optimizations !code/simplification/cast,!field/*,!class/merging/*

# 忽略警告
-ignorewarnings


#############################################
#
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/com/kk/taurus/avplayer/cover/GestureCover.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,20 @@ public void onValueUpdate(String key, Object value) {
protected void onCoverAttachedToWindow() {
super.onCoverAttachedToWindow();
getGroupValue().registerOnGroupValueUpdateListener(mOnGroupValueUpdateListener);
notifyWH();
}

private void notifyWH() {
getView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
notifyWH();
mWidth = getView().getWidth();
mHeight = getView().getHeight();
getView().getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
}

private void notifyWH() {
mWidth = getView().getWidth();
mHeight = getView().getHeight();
}

@Override
protected void onCoverDetachedToWindow() {
super.onCoverDetachedToWindow();
Expand Down
Binary file modified screenshot/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d7d5706

Please sign in to comment.