|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
1.Mainfest.xml文件的配置:- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.video"
- android:versionCode="1"
- android:versionName="1.0" >
- <uses-sdk
- android:minSdkVersion="12"
- android:targetSdkVersion="17" />
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/AppTheme" >
- <activity
- android:name="com.example.video.MainActivity"
- android:label="@string/app_name" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
- </manifest>
复制代码 2.activity_main.xml文件的配置:
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- tools:context=".MainActivity" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="视频名称" />
-
- <EditText
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:id="@+id/voidename"
- android:inputType="none"
- />
- <SeekBar
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:id="@+id/seekBar"
- />
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- >
-
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="播放"
- android:id="@+id/start"
- android:onClick="startVideo"
- />
-
- </RelativeLayout>
-
- <SurfaceView
- android:layout_width="fill_parent"
- android:layout_height="240dp"
- android:id="@+id/surfaceView"
- />
- </LinearLayout>
复制代码 3、activity代码的实现:
|
评分
-
查看全部评分
|