知識(shí)
不管是網(wǎng)站,軟件還是小程序,都要直接或間接能為您產(chǎn)生價(jià)值,我們?cè)谧非笃湟曈X表現(xiàn)的同時(shí),更側(cè)重于功能的便捷,營銷的便利,運(yùn)營的高效,讓網(wǎng)站成為營銷工具,讓軟件能切實(shí)提升企業(yè)內(nèi)部管理水平和效率。優(yōu)秀的程序?yàn)楹笃谏?jí)提供便捷的支持!
videoView讓視頻的寬高可以手動(dòng)設(shè)置
發(fā)表時(shí)間:2021-1-4
發(fā)布人:葵宇科技
瀏覽次數(shù):58
自定義控件,覆寫父類如下:
import android.content.Context; import android.util.AttributeSet; import android.widget.VideoView; /** * The CustomVideoView is to make videoView view length-width based on the parameters you set to decide. * @author peter. * */ public class CustomVideoView extends VideoView { private int mVideoWidth; private int mVideoHeight; public CustomVideoView(Context context) { super(context); } public CustomVideoView(Context context, AttributeSet attrs) { super(context, attrs); } public CustomVideoView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { /* The following code is to make videoView view length-width based on the parameters you set to decide. */ int width = getDefaultSize(mVideoWidth, widthMeasureSpec); int height = getDefaultSize(mVideoHeight, heightMeasureSpec); setMeasuredDimension(width, height); } }
相關(guān)案例查看更多
相關(guān)閱讀
- 云南網(wǎng)站建設(shè)首選
- 小程序被攻擊
- web教程
- 前端技術(shù)
- 高端網(wǎng)站建設(shè)公司
- 云南省建設(shè)廳官方網(wǎng)站
- 昆明軟件定制公司
- 網(wǎng)站建設(shè)公司地址
- 南通小程序制作公司
- 百度小程序
- 生成海報(bào)
- 云南小程序開發(fā)報(bào)價(jià)
- 網(wǎng)站制作
- 網(wǎng)絡(luò)公司
- 用戶登錄
- 搜索引擎自然排名
- 網(wǎng)站建設(shè)電話
- 云南網(wǎng)站建設(shè)哪家好
- 微信小程序
- Web開發(fā)框架
- 網(wǎng)站建設(shè)首選公司
- 前端開發(fā)
- 網(wǎng)站建設(shè)靠譜公司
- 網(wǎng)站建設(shè)快速優(yōu)化
- 網(wǎng)站沒排名
- 江蘇小程序開發(fā)
- 云南網(wǎng)站建設(shè)首選公司
- 云南百度小程序
- uniapp開發(fā)小程序
- 云南小程序被騙蔣軍