Java Code Examples for cn.ycbjie.ycstatusbarlib.bar.StateAppBar#translucentStatusBar()

The following examples show how to use cn.ycbjie.ycstatusbarlib.bar.StateAppBar#translucentStatusBar() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestClarityActivity.java    From YCVideoPlayer with Apache License 2.0 6 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    videoPlayer = (VideoPlayer) findViewById(R.id.nice_video_player);
    mBtnTiny1 = (Button) findViewById(R.id.btn_tiny_1);
    mBtnTiny2 = (Button) findViewById(R.id.btn_tiny_2);


    videoPlayer.setPlayerType(ConstantKeys.IjkPlayerType.TYPE_IJK);
    VideoPlayerController controller = new VideoPlayerController(this);
    controller.setTitle("Beautiful China...");
    controller.setLength(117000);
    controller.setClarity(getClarites(), 0);
    Glide.with(this)
            .load("http://imgsrc.baidu.com/image/c0%3Dshijue%2C0%2C0%2C245%2C40/sign=304dee3ab299a9012f38537575fc600e/91529822720e0cf3f8b77cd50046f21fbe09aa5f.jpg")
            .placeholder(R.drawable.image_default)
            .into(controller.imageView());
    controller.setTopPadding(24);
    videoPlayer.continueFromLastPosition(false);
    videoPlayer.setController(controller);
}
 
Example 2
Source File: AdvertActivity.java    From YCAudioPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    cdvTime.setVisibility(View.VISIBLE);
    llBottom.setVisibility(View.GONE);
    startLoading();
    getLocalSplash();
}
 
Example 3
Source File: NightActivity.java    From YCBanner with Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_night);
    StateAppBar.translucentStatusBar(this,true);
    mRecyclerView = findViewById(R.id.recyclerView);
    fl_container = findViewById(R.id.fl_container);
    recyclerView2 = findViewById(R.id.recyclerView2);
    recyclerView3 = findViewById(R.id.recyclerView3);
    initRecyclerView();
    initRecyclerView2();
    initRecyclerView3();
}
 
Example 4
Source File: EightActivity.java    From YCBanner with Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_eight);
    StateAppBar.translucentStatusBar(this,true);
    mRecyclerView = findViewById(R.id.recyclerView);
    recyclerView2 = findViewById(R.id.recyclerView2);
    fl_container = findViewById(R.id.fl_container);
    initRecyclerView();
    initRecyclerView2();
}
 
Example 5
Source File: TestTinyActivity.java    From YCVideoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    videoPlayer = (VideoPlayer) findViewById(R.id.nice_video_player);
    mBtnTiny1 = (Button) findViewById(R.id.btn_tiny_1);
    mBtnTiny2 = (Button) findViewById(R.id.btn_tiny_2);


    videoPlayer.setPlayerType(ConstantKeys.IjkPlayerType.TYPE_IJK);
    videoPlayer.setUp(ConstantVideo.VideoPlayerList[0], null);
    VideoPlayerController controller = new VideoPlayerController(this);
    controller.setLoadingType(ConstantKeys.Loading.LOADING_RING);
    controller.setTitle("办公室小野开番外了,居然在办公室开澡堂!老板还点赞?");
    controller.setLength(98000);
    Glide.with(this)
            .load("http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2017/05/2017-05-17_17-30-43.jpg")
            .placeholder(R.drawable.image_default)
            .into(controller.imageView());
    controller.setHideTime(2000);
    controller.setTopPadding(24);
    //设置横屏播放时,tv和audio图标是否显示
    controller.setTvAndAudioVisibility(true,true);
    controller.setOnVideoControlListener(new OnVideoControlListener() {
        @Override
        public void onVideoControlClick(int type) {
            switch (type){
                case ConstantKeys.VideoControl.TV:
                    //BaseToast.showRoundRectToast("投影tv电视");
                    break;
                case ConstantKeys.VideoControl.HOR_AUDIO:
                    //BaseToast.showRoundRectToast("切换音频");
                    break;
                default:
                    break;
            }
        }
    });
    videoPlayer.continueFromLastPosition(false);
    videoPlayer.setController(controller);
}
 
Example 6
Source File: TestSavePosActivity.java    From YCVideoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    videoPlayer = findViewById(R.id.video_player);
    //必须关键的4步,播放视频最简单的方式
    videoPlayer.setPlayerType(ConstantKeys.IjkPlayerType.TYPE_IJK);
    videoPlayer.setUp(ConstantVideo.VideoPlayerList[0], null);
    controller = new VideoPlayerController(this);
    controller.setTopPadding(24.0f);
    videoPlayer.continueFromLastPosition(true);
    videoPlayer.setController(controller);
}
 
Example 7
Source File: TestNormalActivity.java    From YCVideoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    videoPlayer = findViewById(R.id.video_player);
    //必须关键的4步,播放视频最简单的方式
    videoPlayer.setPlayerType(ConstantKeys.IjkPlayerType.TYPE_IJK);
    videoPlayer.setUp(ConstantVideo.VideoPlayerList[0], null);
    controller = new VideoPlayerController(this);
    controller.setTopPadding(24.0f);
    videoPlayer.continueFromLastPosition(false);
    videoPlayer.setController(controller);
}
 
Example 8
Source File: SplashMvActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    initTimer();
}
 
Example 9
Source File: SplashAdActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    initTimer();
    initFlView();
}
 
Example 10
Source File: SplashPagerActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    StateAppBar.translucentStatusBar(this, true);
}
 
Example 11
Source File: GuideActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    presenter.subscribe();
    StateAppBar.translucentStatusBar(this, true);
}
 
Example 12
Source File: TestFullActivity.java    From YCVideoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    StateAppBar.translucentStatusBar(this, true);
    videoPlayer = (VideoPlayer) findViewById(R.id.nice_video_player);
    mBtnTiny1 = (Button) findViewById(R.id.btn_tiny_1);
    mBtnTiny2 = (Button) findViewById(R.id.btn_tiny_2);

    videoPlayer.setPlayerType(ConstantKeys.IjkPlayerType.TYPE_IJK);
    videoPlayer.setUp(ConstantVideo.VideoPlayerList[0], null);
    VideoPlayerController controller = new VideoPlayerController(this);
    controller.setTitle("办公室小野开番外了,居然在办公室开澡堂!老板还点赞?");
    controller.setLength(98000);
    Glide.with(this)
            .load("http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2017/05/2017-05-17_17-30-43.jpg")
            .placeholder(R.drawable.image_default)
            .into(controller.imageView());
    //设置中间播放按钮是否显示
    controller.setTopPadding(24.0f);
    controller.setTopVisibility(true);
    controller.setOnVideoControlListener(new OnVideoControlListener() {
        @Override
        public void onVideoControlClick(int type) {
            switch (type){
                case ConstantKeys.VideoControl.DOWNLOAD:
                    //BaseToast.showRoundRectToast("下载");
                    break;
                case ConstantKeys.VideoControl.SHARE:
                    //BaseToast.showRoundRectToast("分享");
                    break;
                case ConstantKeys.VideoControl.MENU:
                    //BaseToast.showRoundRectToast("更多");
                    break;
                case ConstantKeys.VideoControl.AUDIO:
                    //BaseToast.showRoundRectToast("下载");
                    break;
                default:
                    break;
            }
        }
    });
    videoPlayer.setController(controller);
    videoPlayer.continueFromLastPosition(false);
    videoPlayer.postDelayed(new Runnable() {
        @Override
        public void run() {
            videoPlayer.start();
        }
    },500);
}