Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
PierfrancescoSoffritti committed Sep 3, 2016
1 parent 048803c commit 40ca8cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,8 @@ public void onStopTrackingTouch(SeekBar seekBar) {
public void onNewVideo() {
seekBar.setProgress(0);
}

public void showTitle(boolean show) {
videoTitle.setVisibility(show ? View.VISIBLE : View.GONE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ public YouTubePlayerView(Context context, AttributeSet attrs, int defStyleAttr)
}

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
adjustControlsSize();

super.onLayout(changed, left, top, right, bottom);
}

/**
Expand Down Expand Up @@ -266,4 +265,8 @@ public void onNetworkAvailable() {
public void onNetworkUnavailable() {

}

public void showTitle(boolean show) {
playerControlsWrapper.showTitle(show);
}
}
2 changes: 1 addition & 1 deletion YouTubePlayer/src/main/res/layout/player_controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="match_parent" >

<View
android:id="@+id/panel"
Expand Down

0 comments on commit 40ca8cc

Please sign in to comment.