Skip to content

Commit

Permalink
增加旋转播放画面的demo和库支持 (2017-04-13)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Apr 13, 2017
1 parent 56ea58a commit 118f9ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,19 @@ public void onClick(View v) {
mChangeRotate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if((mTextureView.getRotation() - mRotate) == 270) {
if ((mTextureView.getRotation() - mRotate) == 270) {
mTextureView.setRotation(mRotate);
mCoverImageView.setRotation(mRotate);

mTextureView.requestLayout();
mCoverImageView.setRotation(mRotate);
mCoverImageView.requestLayout();
} else {
mTextureView.setRotation(mTextureView.getRotation() + 90);
mCoverImageView.setRotation(mCoverImageView.getRotation() + 90);

mTextureView.requestLayout();
mCoverImageView.setRotation(mCoverImageView.getRotation() + 90);
mCoverImageView.requestLayout();
}


}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ protected void showPauseCover() {
try {
if (mCurrentState == CURRENT_STATE_PAUSE && mFullPauseBitmap != null
&& !mFullPauseBitmap.isRecycled()) {
mCoverImageView.setRotation(mRotate);
mCoverImageView.setRotation(mTextureView.getRotation());
mCoverImageView.setImageBitmap(mFullPauseBitmap);
mCoverImageView.setVisibility(VISIBLE);
}
Expand Down

0 comments on commit 118f9ed

Please sign in to comment.