Buggy code:
private void cancelHiding ( ) { } @ Override public void onAnimationStart ( Animation animation ) { } @ Override public void onAnimationRepeat ( Animation animation ) { } @ Override public void onAnimationEnd ( Animation animation ) { } public void onClick ( View view ) { } @ Override public void setViewEnabled ( boolean isEnabled ) { } @ Override public void setPlayPauseReplayResume ( ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } @ Override public boolean onTouchEvent ( MotionEvent event ) { } @ Override protected void onLayout ( boolean changed , int left , int top , int right , int bottom ) { } @ Override protected void updateViews ( ) { } @ Override public void onScrubbingStart ( ) { } @ Override public void onScrubbingMove ( int time ) { } @ Override public void onScrubbingEnd ( int time , int trimStartTime , int trimEndTime ) { } public void setScreenModeManager ( ScreenModeManager manager ) { } public void setDefaultScreenMode ( ) { } public IContrllerOverlayExt getOverlayExt ( ) { } public IControllerRewindAndForward getControllerRewindAndForwardExt ( ) { } private class OverlayExtension implements IContrllerOverlayExt { private State mLastState ; private String mPlayingInfo ; private boolean mCanPause = true ; private boolean mEnableScrubbing = false ; private boolean mAlwaysShowBottom ; @ Override public void showBuffering ( boolean fullBuffer , int percent ) { } public void clearBuffering ( ) { } public void showReconnecting ( int times ) { } public void showReconnectingError ( ) { } public void setPlayingInfo ( boolean liveStreaming ) { } public void setCanPause ( boolean canPause ) { } public void setCanScrubbing ( boolean enable ) { } public void setBottomPanel ( boolean alwaysShow , boolean foreShow ) { } public boolean isPlayingEnd ( ) { } public boolean handleShowPlaying ( ) { } public boolean handleShowPaused ( ) { } public void onShowLoading ( ) { } public void onShowEnded ( ) { } public void onShowErrorMessage ( String message ) { } public boolean handleUpdateViews ( ) { } public boolean handleHide ( ) { } public void onShowMainView ( View view ) { } public boolean canHidePanel ( ) { } } class ScreenModeExt implements View . OnClickListener , ScreenModeListener { private ImageView mScreenView ; private int mScreenPadding ; private int mScreenWidth ; private static final int MARGIN = 10 ; private ViewGroup mParent ; private ImageView mSeprator ; void init ( Context context , View myTimeBar ) { } private void updateScreenModeDrawable ( ) { } @ Override public void onClick ( View v ) { } public void onStartHiding ( ) { } public void onCancelHiding ( ) { } public void onHide ( ) { } public void onShow ( ) { } public void onLayout ( int width , int paddingRight , int yPosition ) { } public int getAddedRightPadding ( ) { } @ Override public void onScreenModeChanged ( int newMode ) { } } class ControllerRewindAndForwardExt implements View . OnClickListener , IControllerRewindAndForward { private LinearLayout mContollerButtons ; private ImageView mStop ; private ImageView mForward ; private ImageView mRewind ; private IRewindAndForwardListener mListenerForRewind ; private int mButtonWidth ; private static final int BUTTON_PADDING = 40 ; private int mTimeBarHeight = 0 ; void init ( Context context ) { Log . v ( MovieControllerOverlay . TAG , "ControllerRewindAndForwardExt<seq2seq4repair_space>init" ) ; mTimeBarHeight = mTimeBar . getPreferredHeight ( ) ; Bitmap button = BitmapFactory . decodeResource ( context . getResources ( ) , ic_menu_forward ) ; mButtonWidth = button . getWidth ( ) ; button . recycle ( ) ; mContollerButtons = new LinearLayout ( context ) ; LinearLayout . LayoutParams wrapContent = new LinearLayout . LayoutParams ( getAddedRightPadding ( ) , mTimeBarHeight ) ; mContollerButtons . setHorizontalGravity ( HORIZONTAL ) ; mContollerButtons . setVisibility ( VISIBLE ) ; mContollerButtons . setGravity ( CENTER ) ; <START_BUG> LinearLayout . LayoutParams buttonParam = new LinearLayout . LayoutParams ( mTimeBarHeight , mTimeBarHeight ) ; <END_BUG> mRewind = new ImageView ( context ) ; mRewind . setImageResource ( icn_media_rewind ) ; mRewind . setScaleType ( ScaleType . CENTER ) ; mRewind . setFocusable ( true ) ; mRewind . setClickable ( true ) ; mRewind . setOnClickListener ( this ) ; mContollerButtons . addView ( mRewind , buttonParam ) ; mStop = new ImageView ( context ) ; mStop . setImageResource ( icn_media_stop ) ; mStop . setScaleType ( ScaleType . CENTER ) ; mStop . setFocusable ( true ) ; mStop . setClickable ( true ) ; mStop . setOnClickListener ( this ) ; LinearLayout . LayoutParams stopLayoutParam = new LinearLayout . LayoutParams ( mTimeBarHeight , mTimeBarHeight ) ; stopLayoutParam . setMargins ( MovieControllerOverlay . ControllerRewindAndForwardExt . BUTTON_PADDING , 0 , MovieControllerOverlay . ControllerRewindAndForwardExt . BUTTON_PADDING , 0 ) ; mContollerButtons . addView ( mStop , stopLayoutParam ) ; mForward = new ImageView ( context ) ; mForward . setImageResource ( icn_media_forward ) ; mForward . setScaleType ( ScaleType . CENTER ) ; mForward . setFocusable ( true ) ; mForward . setClickable ( true ) ; mForward . setOnClickListener ( this ) ; mContollerButtons . addView ( mForward , buttonParam ) ; mContollerButtons . setLayoutDirection ( LAYOUT_DIRECTION_LTR ) ; addView ( mContollerButtons , wrapContent ) ; } @ Override public void onClick ( View v ) { } public void onStartHiding ( ) { } public void onCancelHiding ( ) { } public void onHide ( ) { } public void onShow ( ) { } public void onLayout ( int l , int r , int b ) { } public int getAddedRightPadding ( ) { } @ Override public void setIListener ( IRewindAndForwardListener listener ) { } @ Override public void showControllerButtonsView ( boolean canStop , boolean canRewind , boolean canForward ) { } @ Override public void setListener ( Listener listener ) { } @ Override public boolean getPlayPauseEanbled ( ) { } @ Override public boolean getTimeBarEanbled ( ) { }

Fix:
LinearLayout . LayoutParams buttonParam = new LinearLayout . LayoutParams ( mButtonWidth , mTimeBarHeight ) ;