最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Android QPython3 擴(kuò)展:視頻播放

2021-01-03 22:18 作者:乘著船  | 我要投稿

#需要QPythonSupport基礎(chǔ)窗口??https://www.bilibili.com/read/cv9100444


QPythonSupport/app/src/main/AndroidManifest.xml】添加


? ? ? ? <activity

? ? ? ? ? ? android:label="視頻播放器"

? ? ? ? ? ? android:name=".Video"

? ? ? android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >

? ?<intent-filter>

? ? ? ? ? ? ? ? <action android:name="android.intent.action.VIEW" />

? ? ? ? ? ? </intent-filter>

? ? ? ? </activity>


〖備注〗

真全屏:android:style/Theme.NoTitleBar.Fullscreen

準(zhǔn)全屏:android:style/Theme.NoTitleBar


QPythonSupport/app/src/main/res/layout/video.xml


<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

? ? android:layout_width="match_parent"

? ? android:layout_height="match_parent"

? ? android:gravity="center"

? ? android:orientation="vertical" >

? ? <VideoView

? ? ? ? android:id="@+id/videoView"

? ? ? ? android:layout_width="match_parent"

? ? ? ? android:layout_height="match_parent" />

</LinearLayout>


QPythonSupport/app/src/main/java/czc/qpython/support/Video.java


package czc.qpython.support;


import android.app.*;

import android.os.*;

import android.widget.*;

import android.text.*;

import java.io.*;

import android.net.*;

import android.content.*;


public class Video extends Activity

?{

? ? @Override

? ? public void onCreate(Bundle savedInstanceState) {

? Main.requestPermissions(this);

? ? ? ? super.onCreate(savedInstanceState);

? ? ? ? setContentView(R.layout.video);

? Intent intent=getIntent();

? String path=intent.getStringExtra("path");

? ? ? ? VideoView videoView=(VideoView)findViewById(R.id.videoView);

? videoView.setVideoPath(path);

? ? ? ? MediaController mediaController=new MediaController(this);

? mediaController.setAnchorView(mediaController);

? videoView.start();

? videoView.setMediaController(mediaController);

? ? }

}


QPythonSupport/__init__.py】添加


def VideoPlay(Path,Wait=True):

? ? jsla('startActivity','android.intent.action.VIEW',None,None,{'path':Path},Wait,'czc.qpython.support','czc.qpython.support.Video')


QPythonSupport/說明.txt】添加


? VideoPlay(Path,Wait=True)

? 視頻播放(路徑,等待=是)



視頻:https://www.bilibili.com/video/BV1zK411g7KB


作者:乘著船@Bilibili

更多文章+下載鏈接:https://www.bilibili.com/read/readlist/rl321663


Android QPython3 擴(kuò)展:視頻播放的評論 (共 條)

分享到微博請遵守國家法律
铜梁县| 云霄县| 无棣县| 抚宁县| 清远市| 登封市| 福建省| 南召县| 玉环县| 沾化县| 特克斯县| 淳安县| 固始县| 游戏| 荔波县| 忻州市| 搜索| 芮城县| 霸州市| 定结县| 闻喜县| 蒙自县| 屯昌县| 房产| 睢宁县| 新邵县| 买车| 子长县| 昌黎县| 西充县| 鄯善县| 阿巴嘎旗| 开阳县| 华宁县| 从化市| 慈溪市| 德格县| 罗山县| 子洲县| 竹山县| 宁波市|