我的家園
我的家園
導(dǎo)航
首頁
管理
常用鏈接
我的隨筆
我的評論
我的參與
最新評論
我的收藏
1
2
www.javady.com
www.javady.com
最新評論
1.?re: CXF 入門:創(chuàng)建一個基于WS-Security標(biāo)準(zhǔn)的安全驗證(CXF回調(diào)函數(shù)使用,)
@qping
寫的真好,項目中要用,我試了一下,可以!萬分感謝!!!
--李虎鵬
2.?re: HTML的target屬性中_blank、_self、_parent、_top含義[未登錄]
111
--1
3.?re: CXF 入門:創(chuàng)建一個基于WS-Security標(biāo)準(zhǔn)的安全驗證(CXF回調(diào)函數(shù)使用,)
謝謝~
--qping
4.?re: CXF 入門:創(chuàng)建一個基于WS-Security標(biāo)準(zhǔn)的安全驗證(CXF回調(diào)函數(shù)使用,)[未登錄]
好文章!
--hello
5.?re: CXF 入門:創(chuàng)建一個基于SOAPHeader的安全驗證(CXF攔截器使用)
樓主,soapheader 驗證未通過,只能以拋出異常的方式防止繼續(xù)訪問webservice?
--jaja1900
Android VideoView播放視頻
Posted on 2012-04-15 16:37
zljpp
閱讀(787)
評論(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)行效果:
源碼下載
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發(fā)表評論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
Powered by:
BlogJava
Copyright © zljpp
主站蜘蛛池模板:
拜泉县
|
丘北县
|
河间市
|
万宁市
|
蒙城县
|
仪陇县
|
衡水市
|
鄂托克旗
|
田林县
|
永新县
|
定远县
|
渝北区
|
库车县
|
宜良县
|
广安市
|
乐业县
|
昆明市
|
仙桃市
|
博爱县
|
大安市
|
夏河县
|
建水县
|
莆田市
|
玛纳斯县
|
吐鲁番市
|
宜良县
|
涞水县
|
岑溪市
|
绥芬河市
|
左云县
|
武平县
|
西吉县
|
林口县
|
长沙市
|
贵南县
|
中宁县
|
平泉县
|
迁西县
|
达拉特旗
|
宁津县
|
洛宁县
|