package com.example.gsyvideoplayer.video;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;

import com.example.gsyvideoplayer.R;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;

/**
 * Created by shuyu on 2016/12/23.
 * CustomGSYVideoPlayer是试验中，建议使用的时候使用StandardGSYVideoPlayer
 */
public class LandLayoutVideo extends StandardGSYVideoPlayer {

    /**
     * 1.5.0开始加入，如果需要不同布局区分功能，需要重载
     */
    public LandLayoutVideo(Context context, Boolean fullFlag) {
        super(context, fullFlag);
    }

    public LandLayoutVideo(Context context) {
        super(context);
    }

    public LandLayoutVideo(Context context, AttributeSet attrs) {
        super(context, attrs);
    }


    //这个必须配置最上面的构造才能生效
    @Override
    public int getLayoutId() {
        if (mIfCurrentIsFullscreen) {
            return R.layout.sample_video_land;
        }
        return R.layout.sample_video_normal;
    }

    @Override
    protected void updateStartImage() {
        if (mIfCurrentIsFullscreen) {
            if(mStartButton instanceof  ImageView) {
                ImageView imageView = (ImageView) mStartButton;
                if (mCurrentState == CURRENT_STATE_PLAYING) {
                    imageView.setImageResource(R.drawable.video_click_pause_selector);
                } else if (mCurrentState == CURRENT_STATE_ERROR) {
                    imageView.setImageResource(R.drawable.video_click_play_selector);
                } else {
                    imageView.setImageResource(R.drawable.video_click_play_selector);
                }
            }
        } else {
            super.updateStartImage();
        }
    }


}

@@ -102,16 +102,73 @@
 uteSet;%0A
+import android.view.View;%0Aimport android.view.ViewGroup;%0A
 import a
@@ -291,16 +291,138 @@
 oPlayer;
+%0Aimport com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer;%0Aimport com.shuyu.gsyvideoplayer.video.base.GSYVideoPlayer;
 %0A%0A/**%0A *
@@ -1860,11 +1860,215 @@
 %0A    %7D%0A%0A
+    @Override%0A    public int getEnlargeImageRes() %7B%0A            return R.drawable.custom_enlarge;%0A    %7D%0A%0A    @Override%0A    public int getShrinkImageRes() %7B%0A        return R.drawable.custom_shrink;%0A    %7D%0A%0A
 %0A%7D%0A

fix demo