我的家園
我的家園
導(dǎo)航
首頁(yè)
管理
常用鏈接
我的隨筆
我的評(píng)論
我的參與
最新評(píng)論
我的收藏
1
2
www.javady.com
www.javady.com
最新評(píng)論
1.?re: CXF 入門(mén):創(chuàng)建一個(gè)基于WS-Security標(biāo)準(zhǔn)的安全驗(yàn)證(CXF回調(diào)函數(shù)使用,)
@qping
寫(xiě)的真好,項(xiàng)目中要用,我試了一下,可以!萬(wàn)分感謝!!!
--李虎鵬
2.?re: HTML的target屬性中_blank、_self、_parent、_top含義[未登錄](méi)
111
--1
3.?re: CXF 入門(mén):創(chuàng)建一個(gè)基于WS-Security標(biāo)準(zhǔn)的安全驗(yàn)證(CXF回調(diào)函數(shù)使用,)
謝謝~
--qping
4.?re: CXF 入門(mén):創(chuàng)建一個(gè)基于WS-Security標(biāo)準(zhǔn)的安全驗(yàn)證(CXF回調(diào)函數(shù)使用,)[未登錄](méi)
好文章!
--hello
5.?re: CXF 入門(mén):創(chuàng)建一個(gè)基于SOAPHeader的安全驗(yàn)證(CXF攔截器使用)
樓主,soapheader 驗(yàn)證未通過(guò),只能以拋出異常的方式防止繼續(xù)訪問(wèn)webservice?
--jaja1900
Android VideoView播放視頻
Posted on 2012-04-15 16:37
zljpp
閱讀(785)
評(píng)論(0)
編輯
收藏
Android 利用自帶VideoView控件播放視頻
Activity
public class Activity01 extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final VideoView videoView = (VideoView) findViewById(R.id.VideoView01); Button PauseButton = (Button) this.findViewById(R.id.PauseButton); Button LoadButton = (Button) this.findViewById(R.id.LoadButton); Button PlayButton = (Button) this.findViewById(R.id.PlayButton); // load LoadButton.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { // videoView.setVideoPath("/sdcard/test.mp4"); videoView.setVideoPath("android.resource://com.homer/"+R.raw.china); videoView.setMediaController(new MediaController(Activity01.this)); videoView.requestFocus(); } }); // play PlayButton.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { videoView.start(); } }); // pause PauseButton.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { videoView.pause(); } }); } }
main.xml
<?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <VideoView android:id="@+id/VideoView01" android:layout_width="320px" android:layout_height="240px" /> <Button android:id="@+id/LoadButton" android:layout_width="80px" android:layout_height="wrap_content" android:layout_x="30px" android:layout_y="300px" android:text="裝載" /> <Button android:id="@+id/PlayButton" android:layout_width="80px" android:layout_height="wrap_content" android:layout_x="120px" android:layout_y="300px" android:text="播放" /> <Button android:id="@+id/PauseButton" android:layout_width="80px" android:layout_height="wrap_content" android:layout_x="210px" android:layout_y="300px" android:text="暫停" /> </AbsoluteLayout>
運(yùn)行效果:
源碼下載
新用戶注冊(cè)
刷新評(píng)論列表
只有注冊(cè)用戶
登錄
后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問(wèn)
管理
Powered by:
BlogJava
Copyright © zljpp
主站蜘蛛池模板:
永春县
|
潼南县
|
五河县
|
繁峙县
|
新巴尔虎右旗
|
肥乡县
|
雷州市
|
荣成市
|
武宣县
|
张家口市
|
崇阳县
|
石景山区
|
明水县
|
西充县
|
古蔺县
|
格尔木市
|
凌源市
|
抚顺县
|
阳泉市
|
太原市
|
行唐县
|
彰化市
|
突泉县
|
富平县
|
武威市
|
团风县
|
山阴县
|
内江市
|
宁城县
|
遂宁市
|
黄骅市
|
松潘县
|
合肥市
|
合川市
|
伊通
|
天津市
|
芜湖市
|
定南县
|
佛冈县
|
城固县
|
曲水县
|