www.teandq.com
晓安科普

这样也行?快播大屏幕(快播大屏幕怎么设置)

2023-08-21Aix 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-08-21Aix XinLe187

这样也行?快播大屏幕(快播大屏幕怎么设置)this.isSetStatusBar = isSetStatusBar; public void setScreenRoa…

科学科学计算器在线计算开三次根号(科学函数计算器在线计算)居然可以

2023-08-21Aix XinLe33

科学计算器在线计算开三次根号(科学函数计算器在线计算)居然可以这样学会笔算开根号,能省下很多查表的时间!在中学阶段,会涉及到带二次根号的无理数,也有很多工程计算会碰到,但是每次去查表就比较麻烦,这里介绍一个简单…

趣闻这样也行?趣闻轶事的解释(牛顿的趣闻轶事)

2023-08-21Aix XinLe165

这样也行?趣闻轶事的解释(牛顿的趣闻轶事)艾萨克·牛顿爵士PRS MP(Sir Isaac Newton,1643年1月4日-1727年3月31日)[ 儒略历:1642年12月25日-1…

知识不要告诉别人快播大屏幕(快播大屏幕 WiFi起不来)

2023-08-21Aix XinLe113

不要告诉别人快播大屏幕(快播大屏幕 WiFi起不来)由于当下的生活节奏非常快,多数人都害怕掉队而努力向前奔跑。因为如果一旦回头看,你可能会感觉到10年前发生的事情仿佛就在昨天。…

百科今年中考多少分才能上高中(湖北今年中考多少分才能上高中)速看

2023-08-21Aix XinLe176

今年中考多少分才能上高中(湖北今年中考多少分才能上高中)速看据湖北省教育厅6月30日发布,从2024年开始,湖北省实施中考统一命题,切实提高中考命题质量水平,构建引导学生德智体美劳全面发展的中考评价体系,…