www.teandq.com
晓安科普

一篇读懂快播大屏幕(快播大屏幕怎么设置)

2023-12-13Aix XinLe

this.isSetStatusBar = isSetStatusBar; public void setScreenRoa

一篇读懂快播大屏幕(快播大屏幕怎么设置)

 

《快播》,仿网易云音乐UI,整体采用RxJava+Retrofit+MVP的架构,支持在线视频播放,在线图片浏览等功能用到第三方开源库:ButterKnife:依赖注入框架glide:图片加载retrofit:网络请求。

jieCaoVideoPlayer:播放器抓取接口用于数据展示效果图如下:

基类:package com.zmj.qvod.base; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo;

import android.os.Build; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import

android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.Window;

import android.view.WindowManager; import android.widget.Toast; publicabstractclassBaseActivityextends

AppCompatActivity{ /** * 是否沉浸状态栏 **/privateboolean isSetStatusBar = false; /** * 是否允许全屏 **/

privateboolean mAllowFullScreen = false; /** * 是否允许屏幕旋转 **/privateboolean isAllowScreenRotate =

false; /** * 当前Activity渲染的视图View **/private View mContextView = null; /** * 日志输出标志 **/

protectedfinal String TAG = this.getClass().getSimpleName(); @OverrideprotectedvoidonCreate(Bundle savedInstanceState)

{ super.onCreate(savedInstanceState); Log.d(TAG, "BaseActivity-->onCreate()"); Bundle bundle = getIntent().getExtras(); initPrams(bundle);

// mContextView = LayoutInflater.from(this).inflate(bindLayout(), null); //if (mAllowFullScreen) { requestWindowFeature(Window.FEATURE_NO_TITLE); }

//if (isSetStatusBar) { steepStatusBar(); } // setContentView(bindLayout());

//if (!isAllowScreenRotate) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); }

// initView(mContextView); // setListener(); // doBusiness(this

); } /** * [沉浸状态栏] */privatevoidsteepStatusBar(){ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {

// 透明状态栏 getWindow().addFlags( WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);

// 透明导航栏 getWindow().addFlags( WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); } }

/** * [初始化参数--加载xml视图之前] * * @param bundle */publicabstractvoidinitPrams(Bundle bundle)

; /** * [绑定布局] * * @return */publicabstractintbindLayout(); /** * [初始化控件] * *

@param view */publicabstractvoidinitView(final View view); /** * [绑定控件] * *

@param resId * @return */protected T $(int resId) { return (T) super

.findViewById(resId); } /** * [设置监听] */publicabstractvoidsetListener(); /** * [业务操作] * *

@param mContext */publicabstractvoiddoBusiness(Context mContext); /** * [页面跳转] * *

@param clz */publicvoidstartActivity(Class clz){ startActivity(new Intent(BaseActivity.

this, clz)); } /** * [携带数据的页面跳转] * * @param clz * @param bundle */public

voidstartActivity(Class clz, Bundle bundle){ Intent intent = new Intent(); intent.setClass(

this, clz); if (bundle != null) { intent.putExtras(bundle); } startActivity(intent); }

/** * [含有Bundle通过Class打开编辑界面] * * @param cls * @param bundle * @param requestCode */

publicvoidstartActivityForResult(Class cls, Bundle bundle,

int requestCode){ Intent intent = new Intent(); intent.setClass(this, cls); if

(bundle != null) { intent.putExtras(bundle); } startActivityForResult(intent, requestCode); }

@OverrideprotectedvoidonRestart(){ super.onRestart(); Log.d(TAG, "onRestart()"); }

@OverrideprotectedvoidonStart(){ super.onStart(); Log.d(TAG, "onStart()"); }

@OverrideprotectedvoidonResume(){ super.onResume(); Log.d(TAG, "onResume()"); }

@OverrideprotectedvoidonPause(){ super.onPause(); Log.d(TAG, "onPause()"); }

@OverrideprotectedvoidonStop(){ super.onStop(); Log.d(TAG, "onStop()"); } @Override

protectedvoidonDestroy(){ super.onDestroy(); Log.d(TAG, "onDestroy()"); } /** * [简化Toast] * *

@param msg */protectedvoidshowToast(String msg){ Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); }

/** * [简化Toast] * * @param msg */protectedvoidshowToast(int msg){ Toast.makeText(

this, msg, Toast.LENGTH_SHORT).show(); } /** * [是否允许全屏] * * @param allowFullScreen */

publicvoidsetAllowFullScreen(boolean allowFullScreen){ this.mAllowFullScreen = allowFullScreen; }

/** * [是否设置沉浸状态栏] * * @param isSetStatusBar */publicvoidsetSteepStatusBar(boolean

isSetStatusBar){ this.isSetStatusBar = isSetStatusBar; } /** * [是否允许屏幕旋转] * *

@param isAllowScreenRotate */publicvoidsetScreenRoate(boolean isAllowScreenRotate){ this

.isAllowScreenRotate = isAllowScreenRotate; } } 作者:zhaomingjian;Github开源地址:https://github.com/zhao-mingjian/qvod

免责声明:本站所有信息均搜集自互联网,并不代表本站观点,本站不对其真实合法性负责。如有信息侵犯了您的权益,请告知,本站将立刻处理。联系QQ:1640731186

科普一篇读懂快播大屏幕(快播大屏幕怎么设置)

2023-12-13Aix XinLe142

一篇读懂快播大屏幕(快播大屏幕怎么设置)this.isSetStatusBar = isSetStatusBar; public void setScreenRoa…

历史骁龙8GEN2(骁龙8gen2和骁龙888哪个好)学会了吗

2023-12-13Aix XinLe181

骁龙8GEN2(骁龙8gen2和骁龙888哪个好)学会了吗现在主流移动芯片就三家,苹果A芯片、高通骁龙和联发科天玑,其中骁龙8Gen2目前是安卓阵营的顶级处理器,台积…

历史骁龙8GEN2(骁龙8gen2和骁龙888哪个好)硬核推荐

2023-12-13Aix XinLe26

骁龙8GEN2(骁龙8gen2和骁龙888哪个好)硬核推荐根据高通工程机的成绩分析,连续跑分十次以后,骁龙8 Gen 2的CPU最高温度为43摄氏度,搭载骁龙888的安卓机型同样跑十次分,CPU温度最高…

历史骁龙8GEN2(骁龙8gen2发热严重吗)硬核推荐

2023-12-13Aix XinLe152

骁龙8GEN2(骁龙8gen2发热严重吗)硬核推荐2023年安卓手机进步最大的是哪一块?如果只能说一个答案,老刘会投票给处理器!因为它的进步可以说超出大家的预…

历史居然可以这样快播大屏幕(快播大屏幕官网)

2023-12-13Aix XinLe111

居然可以这样快播大屏幕(快播大屏幕官网)今日,北京市海淀区法院开庭审理被告单位深圳市快播科技有限公司,被告人王欣、吴铭、张克东、牛文举涉嫌传播淫秽物品牟利罪一案。…