国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(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ò)展:視頻播放的評論 (共 條)

分享到微博請遵守國家法律
利川市| 蕲春县| 孟津县| 巩义市| 晋州市| 阳山县| 田阳县| 通榆县| 石门县| 阿拉善左旗| 获嘉县| 筠连县| 桦南县| 武山县| 连江县| 平果县| 海伦市| 项城市| 寿阳县| 竹北市| 安远县| 修水县| 太原市| 临夏县| 明水县| 文安县| 榆社县| 台南县| 苏尼特右旗| 麻阳| 天祝| 博白县| 潜江市| 寿宁县| SHOW| 昌邑市| 丰原市| 临泉县| 麻江县| 峨边| 称多县|