├── .classpath
├── .gitignore
├── .project
├── .settings
├── org.eclipse.core.resources.prefs
└── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── README.md
├── apk
├── mini.apk
├── sdcl_resume_live_20160303.apk
└── sdcl_xpai_autofocus.apk
├── bin
└── mini.apk
├── libs
├── arm64-v8a
│ └── libxavc2.so
├── armeabi-v7a
│ └── libxavc2.so
├── core.jar
└── hiksdk.jar
├── project.properties
├── res
├── anim
│ ├── fadein_left2right.xml
│ └── fadeout_right2left.xml
├── drawable-hdpi
│ ├── border.xml
│ ├── btn_download.png
│ ├── fs_shadow.png
│ ├── ic_file_refresh.png
│ ├── ic_media_thumb.png
│ ├── progress_bg.9.png
│ ├── progress_no_bg.9.png
│ ├── seek_thumb.png
│ ├── seekbar_style.xml
│ ├── tipbg.9.png
│ ├── vp_backward.png
│ ├── vp_forward.png
│ ├── vp_info_show.png
│ ├── vp_pause.png
│ └── vp_play.png
├── drawable-mdpi
│ ├── change_camera_id.png
│ ├── flash_off.png
│ ├── flash_on.png
│ ├── link.png
│ ├── link_break.png
│ ├── link_go.png
│ ├── media_player.png
│ ├── mic.png
│ ├── mic_mute.png
│ ├── preview.png
│ ├── preview_inactive.png
│ ├── record.png
│ ├── record_active.png
│ ├── record_pause.png
│ ├── setting.png
│ └── take_picture.png
├── drawable
│ ├── alert.png
│ ├── icon.png
│ ├── rounded_corners_bg.xml
│ ├── seek_bar.xml
│ └── stop.png
├── layout
│ ├── audio_encoder_type.xml
│ ├── connection_dialog.xml
│ ├── file_list.xml
│ ├── file_view.xml
│ ├── info.xml
│ ├── input_text.xml
│ ├── login_dialog.xml
│ ├── main.xml
│ ├── play_item.xml
│ ├── player.xml
│ ├── progress_popup_window_layout.xml
│ ├── radio_btn_item.xml
│ ├── seek_bar.xml
│ ├── setting.xml
│ ├── setting_edittext.xml
│ ├── setting_menu.xml
│ ├── transcode_dialog.xml
│ └── txt_item.xml
└── values
│ ├── colors.xml
│ ├── setting_menu_animation.style
│ └── strings.xml
└── src
└── cn
└── com
└── xpai
├── Config.java
├── DialogFactory.java
├── FileArrayAdapter.java
├── FileChooser.java
├── FpsListAdapter.java
├── MainHandler.java
├── NetWorkingAdaptiveAdapter.java
├── Option.java
├── PopAudioEncoderTypeView.java
├── PopEditTextView.java
├── PopListView.java
├── PopSeekbar.java
├── Preview.java
├── ProgressDialog.java
├── ProgressPopupWindow.java
├── RecordButton.java
├── RecordTypeAdapter.java
├── ResolutionListAdapter.java
├── SaveVideoFileAdapter.java
├── SettingItemAdapter.java
├── TranscoderImpl.java
├── XPAndroid.java
├── XPHandler.java
└── demo
└── player
├── DemoPlayer.java
├── FilelistActivity.java
├── FilelistAdapter.java
├── Globals.java
├── SqliteOpenHelper.java
└── VideoFile.java
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/*
2 | gen/
3 | jni/
4 | core/
5 | !bin/mini.apk
6 | .DS_Store
7 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | mini
4 |
5 |
6 | core
7 |
8 |
9 |
10 | com.android.ide.eclipse.adt.ResourceManagerBuilder
11 |
12 |
13 |
14 |
15 | com.android.ide.eclipse.adt.PreCompilerBuilder
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javabuilder
21 |
22 |
23 |
24 |
25 | com.android.ide.eclipse.adt.ApkBuilder
26 |
27 |
28 |
29 |
30 |
31 | com.android.ide.eclipse.adt.AndroidNature
32 | org.eclipse.jdt.core.javanature
33 |
34 |
35 |
36 | XPCore_src
37 | 2
38 | /home/li/workspace/mv.git/mv_android/core/src
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.6
12 |
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 直播云Android平台SDK库及示例程序源码
2 |
3 | ## 下载说明
4 |
5 | + 有关SDK的文档,请参考直播云文档中心的[相关内容](http://www.zhiboyun.cn/zh/document/sdk/android-sdk)
6 | + 下载最新版本请点击右边的[下载链接](../../archive/master.zip),或用git工具下载源码
7 | + 下载某个指定版本请点击上方的[release](../../releases),其中有编绎好的apk用于直接安装运行。
8 |
9 | # 版本号说明
10 |
11 | release中版本号规则如下:
12 |
13 | xxx-xxx
14 |
15 | 前在三位表示此次发布基于SDK的版本号,后三位表示demo源码的修订版本
16 |
17 | 例如:
18 |
19 | + 449表示仅SDK库升级到了449版本, demo源码没有改动
20 | + 449-1 表示基于449版本的demo版本1
21 |
--------------------------------------------------------------------------------
/apk/mini.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/apk/mini.apk
--------------------------------------------------------------------------------
/apk/sdcl_resume_live_20160303.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/apk/sdcl_resume_live_20160303.apk
--------------------------------------------------------------------------------
/apk/sdcl_xpai_autofocus.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/apk/sdcl_xpai_autofocus.apk
--------------------------------------------------------------------------------
/bin/mini.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/bin/mini.apk
--------------------------------------------------------------------------------
/libs/arm64-v8a/libxavc2.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/libs/arm64-v8a/libxavc2.so
--------------------------------------------------------------------------------
/libs/armeabi-v7a/libxavc2.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/libs/armeabi-v7a/libxavc2.so
--------------------------------------------------------------------------------
/libs/core.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/libs/core.jar
--------------------------------------------------------------------------------
/libs/hiksdk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/libs/hiksdk.jar
--------------------------------------------------------------------------------
/project.properties:
--------------------------------------------------------------------------------
1 | android.library=false
2 | target=android-19
3 |
4 | #android.library.reference.1=../core
5 |
--------------------------------------------------------------------------------
/res/anim/fadein_left2right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/res/anim/fadeout_right2left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/btn_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/btn_download.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/fs_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/fs_shadow.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_file_refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/ic_file_refresh.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_media_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/ic_media_thumb.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/progress_bg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/progress_bg.9.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/progress_no_bg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/progress_no_bg.9.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/seek_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/seek_thumb.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/seekbar_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
14 |
15 |
16 | -
17 |
18 |
19 |
20 |
21 |
27 |
28 |
29 |
30 | -
31 |
32 |
33 |
34 |
35 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/tipbg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/tipbg.9.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/vp_backward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/vp_backward.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/vp_forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/vp_forward.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/vp_info_show.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/vp_info_show.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/vp_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/vp_pause.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/vp_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-hdpi/vp_play.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/change_camera_id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/change_camera_id.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/flash_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/flash_off.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/flash_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/flash_on.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/link.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/link_break.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/link_break.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/link_go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/link_go.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/media_player.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/media_player.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/mic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/mic.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/mic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/mic_mute.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/preview.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/preview_inactive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/preview_inactive.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/record.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/record.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/record_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/record_active.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/record_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/record_pause.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/setting.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/take_picture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable-mdpi/take_picture.png
--------------------------------------------------------------------------------
/res/drawable/alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable/alert.png
--------------------------------------------------------------------------------
/res/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable/icon.png
--------------------------------------------------------------------------------
/res/drawable/rounded_corners_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/res/drawable/seek_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - // 背景项
5 | // 背景图 // 这里使用9文件,因此这么配置如果使用的是普通图片可直接使用标签,或者使用标签,自定义图形
6 |
7 | - // 进度项
8 |
9 | // 进度图
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/res/drawable/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WoAnTech/xpai-android-demo/43bfc010ef3afa8e14586d82c7b3445544b71578/res/drawable/stop.png
--------------------------------------------------------------------------------
/res/layout/audio_encoder_type.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
17 |
27 |
28 |
35 |
36 |
45 |
46 |
47 |
48 |
57 |
58 |
66 |
67 |
73 |
74 |
84 |
85 |
86 |
87 |
97 |
98 |
109 |
110 |
119 |
127 |
128 |
136 |
137 |
147 |
148 |
149 |
158 |
166 |
167 |
173 |
174 |
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/res/layout/connection_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
20 |
21 |
33 |
34 |
38 |
39 |
48 |
49 |
54 |
55 |
56 |
60 |
61 |
70 |
71 |
77 |
78 |
79 |
91 |
92 |
101 |
102 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/res/layout/file_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
16 |
17 |
26 |
27 |
37 |
38 |
49 |
50 |
51 |
52 |
59 |
60 |
61 |
62 |
75 |
76 |
--------------------------------------------------------------------------------
/res/layout/file_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/res/layout/info.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
26 |
27 |
28 |
29 |
37 |
38 |
39 |
40 |
48 |
49 |
50 |
58 |
59 |
60 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/res/layout/input_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
17 |
18 |
19 |
22 |
23 |
28 |
29 |
33 |
34 |
35 |
41 |
42 |
43 |
44 |
45 |
48 |
49 |
55 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/res/layout/login_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
14 |
15 |
27 |
28 |
38 |
39 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
18 |
19 |
23 |
31 |
32 |
38 |
39 |
47 |
48 |
55 |
56 |
64 |
65 |
66 |
67 |
72 |
73 |
79 |
80 |
90 |
91 |
100 |
101 |
112 |
113 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/res/layout/play_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
20 |
21 |
22 |
28 |
29 |
39 |
40 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/res/layout/player.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
19 |
20 | "
25 |
26 |
34 |
35 |
36 |
37 |
38 |
46 |
47 |
53 |
54 |
63 |
64 |
79 |
80 |
91 |
92 |
93 |
97 |
98 |
109 |
110 |
117 |
118 |
125 |
126 |
132 |
133 |
143 |
144 |
150 |
151 |
152 |
159 |
160 |
161 |
162 |
163 |
--------------------------------------------------------------------------------
/res/layout/progress_popup_window_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
18 |
19 |
27 |
28 |
36 |
37 |
49 | android:background="@drawable/cancle_button"
50 |
--------------------------------------------------------------------------------
/res/layout/radio_btn_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/res/layout/seek_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
25 |
26 |
33 |
34 |
39 |
40 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/res/layout/setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
14 |
15 |
22 |
23 |
28 |
29 |
36 |
37 |
38 |
43 |
44 |
51 |
52 |
53 |
66 |
67 |
72 |
73 |
80 |
81 |
82 |
87 |
88 |
95 |
96 |
101 |
102 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/res/layout/setting_edittext.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
28 |
29 |
--------------------------------------------------------------------------------
/res/layout/setting_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/res/layout/transcode_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
14 |
15 |
27 |
28 |
38 |
39 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/res/layout/txt_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
26 |
27 |
--------------------------------------------------------------------------------
/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #DDDDDD
5 | #000000
6 | #333333
7 | #777777
8 | #FF0000
9 | #00FF00
10 | #2222EF
11 | #880000FF
12 | #80333333
13 | #00bfff
14 | #00fa9a
15 | #ff8080
16 |
--------------------------------------------------------------------------------
/res/values/setting_menu_animation.style:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Xpai
4 | 113.11.194.211
5 | 2222
6 |
7 |
8 | Connection
9 | 服务码
10 | 连接方式
11 | 主机地址
12 | 主机端口
13 | 连接直播云
14 | 直连TCP端口
15 | 连接
16 | 取消
17 |
18 |
19 | Error
20 | OK
21 |
22 |
23 | Error
24 | OK
25 |
26 |
27 | Try again
28 | Exit
29 |
30 |
31 | 用户登录
32 | 用户名
33 | 密码
34 | OK
35 | Cancel
36 |
37 |
38 | Setting
39 | Codec ID
40 | MPEG2
41 | MPEG4
42 | Photo Width
43 | Photo Height
44 | Video Width
45 | Video Height
46 | Bit Rate
47 | Frame Rate
48 | Network Time Out
49 | 确认
50 | 取消
51 | go
52 | --:--:--
53 | 断开连接
54 |
55 |
56 | 文件打点
57 | 开始时间(秒)
58 | 视频长度(秒)
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/cn/com/xpai/Config.java:
--------------------------------------------------------------------------------
1 | package cn.com.xpai;
2 |
3 | import android.app.Activity;
4 | import android.content.SharedPreferences;
5 | import cn.com.xpai.core.Manager.AudioEncoderType;
6 | import cn.com.xpai.core.RecordMode;
7 |
8 | public class Config {
9 |
10 | final static String PREFS_NAME = "XPAndroid";
11 |
12 | static String userName = "";
13 | static String userPass = ""; //for test, not been encrypt.
14 | static int timeOut = 5 * 1000;
15 | static int retryConnectTimes = 3;
16 |
17 | static String mvHost = "";
18 | static String mvPort = "";
19 | static String mvHost_default = "ps.zhiboyun.com";
20 | static String mvPort_default = "9999";
21 | //通过connectCloud api与直播云建立连接
22 | static String getVSUrl = "http://c.zhiboyun.com/api/20140928/get_vs";
23 | //连接私有云(其中192.168.1.1只是个例子,具体填写私有云服务器地址)
24 | static String privateCloudGetVSUrl = "http://192.168.1.1/api/20140928/get_vs";
25 | static String serviceCode = "";
26 | static String output_tag = "";
27 | static boolean isOpenNetWorkingAdaptive = true;
28 | static boolean isSavingVideoFile = false;
29 | static boolean isConnectToTcpPort = false;
30 | static int connectionMode = 0;//0:连接直播云 1:连接私有云 2:连接视频服务器
31 | //音频编码类型 默认为AMR_NB
32 | static AudioEncoderType audioEncoderType = AudioEncoderType.AMR_NB;
33 | //声道
34 | static int channel = 1;
35 | //音频采样率
36 | static int audioSampleRate = 8000;
37 | //音频比特率
38 | static int audioBitRate = 12200;
39 | static int hwMode = 0;
40 | static int videoWidth = 0;
41 | static int videoHeight = 0;
42 | static int videoBitRate = 320; //bitrate单位kbit
43 |
44 | static int photoWidth = 2048;
45 | static int photoHeight = 1536;
46 |
47 | static int netTimeout = 0; //网络超时时间,0代表不判断, 单位是秒
48 |
49 | static SharedPreferences sp;
50 |
51 | //决定拍传流中包含音频或视频的组合
52 | static RecordMode recordMode = RecordMode.HwAudioAndVideo;
53 |
54 | static int [] fpsRange = new int[2];
55 |
56 | static String playUrl = "http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8";
57 |
58 | static void load(Activity a) {
59 | SharedPreferences settings = a.getSharedPreferences(PREFS_NAME, 0);
60 | sp = settings;
61 | netTimeout = sp.getInt("net_time_out", netTimeout);
62 | photoWidth = sp.getInt("photo_width", photoWidth);
63 | photoHeight = sp.getInt("photo_height", photoHeight);
64 |
65 | videoBitRate = sp.getInt("bit_rate", videoBitRate);
66 | videoWidth = sp.getInt("video_width", videoWidth);
67 | videoHeight = sp.getInt("video_height", videoHeight);
68 | serviceCode = sp.getString("service_code", serviceCode);
69 | mvPort = sp.getString("mv_port", mvPort);
70 | mvHost = sp.getString("mv_host", mvHost);
71 | retryConnectTimes = sp.getInt("retry_connect_times", 3);
72 | timeOut = sp.getInt("time_out", timeOut);
73 | userName = sp.getString("user_name", userName);
74 | userPass = sp.getString("user_pass", userPass);
75 | playUrl = sp.getString("play_url", playUrl);
76 | int st_value = sp.getInt("stream_type", recordMode.value());
77 | RecordMode st = RecordMode.cast(st_value);
78 | if (st != null) {
79 | recordMode = st;
80 | } else {
81 | recordMode = RecordMode.HwAudioAndVideo;
82 | }
83 | fpsRange[0] = sp.getInt("min_fps", 0);
84 | fpsRange[1] = sp.getInt("max_fps", 0);
85 | isConnectToTcpPort = sp.getBoolean("is_connect_to_tcp", false);
86 | output_tag = sp.getString("output_tag", output_tag);
87 | isOpenNetWorkingAdaptive = sp.getBoolean("net_adaptive", isOpenNetWorkingAdaptive);
88 | int at_value = sp.getInt("audio_encoder_type", cast(audioEncoderType));
89 | if (at_value == 0) {
90 | audioEncoderType = AudioEncoderType.AMR_NB;
91 | } else {
92 | audioEncoderType = AudioEncoderType.AAC;
93 | }
94 | channel = sp.getInt("channel", channel);
95 | audioSampleRate = sp.getInt("audio_sample_rate", audioSampleRate);
96 | audioBitRate = sp.getInt("audio_bit_rate", audioBitRate);
97 | connectionMode = sp.getInt("connection_mode", connectionMode);
98 | privateCloudGetVSUrl = sp.getString("p_getvs_url", privateCloudGetVSUrl);
99 | isSavingVideoFile = sp.getBoolean("is_saving_video_file", isSavingVideoFile);
100 | }
101 |
102 | static void save() {
103 | SharedPreferences.Editor editor = sp.edit();
104 | editor.putInt("net_time_out", netTimeout);
105 | editor.putInt("photo_width", photoWidth);
106 | editor.putInt("photo_height", photoHeight);
107 |
108 | editor.putInt("bit_rate", videoBitRate);
109 | editor.putInt("video_width", videoWidth);
110 | editor.putInt("video_height", videoHeight);
111 | editor.putString("service_code", serviceCode);
112 | editor.putString("mv_port", mvPort);
113 | editor.putString("mv_host", mvHost);
114 | editor.putInt("retry_connect_times", retryConnectTimes);
115 | editor.putInt("time_out", timeOut);
116 | editor.putString("user_name", userName);
117 | editor.putString("user_pass", userPass);
118 | editor.putString("play_url", playUrl);
119 | editor.putInt("stream_type", recordMode.value());
120 | editor.putInt("min_fps", fpsRange[0]);
121 | editor.putInt("max_fps", fpsRange[1]);
122 | editor.putBoolean("is_connect_to_tcp", isConnectToTcpPort);
123 | editor.putString("output_tag", output_tag);
124 | editor.putBoolean("net_adaptive", isOpenNetWorkingAdaptive);
125 | editor.putInt("audio_encoder_type", cast(audioEncoderType));
126 | editor.putInt("channel", channel);
127 | editor.putInt("audio_sample_rate", audioSampleRate);
128 | editor.putInt("audio_bit_rate", audioBitRate);
129 | editor.putInt("connection_mode", connectionMode);
130 | editor.putString("p_getvs_url", privateCloudGetVSUrl);
131 | editor.putBoolean("is_saving_video_file", isSavingVideoFile);
132 | editor.commit();
133 | }
134 |
135 | private static int cast(AudioEncoderType type) {
136 | int typeInt = -1;
137 | if(type == AudioEncoderType.AMR_NB) {
138 | typeInt = 0;
139 | } else {
140 | typeInt = 1;
141 | }
142 | return typeInt;
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/src/cn/com/xpai/DialogFactory.java:
--------------------------------------------------------------------------------
1 | package cn.com.xpai;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.app.AlertDialog;
5 | import android.app.AlertDialog.Builder;
6 | import android.app.Dialog;
7 | import android.content.Context;
8 | import android.content.DialogInterface;
9 | import android.os.Message;
10 | import android.text.InputType;
11 | import android.view.LayoutInflater;
12 | import android.view.View;
13 | import android.widget.AdapterView;
14 | import android.widget.AdapterView.OnItemSelectedListener;
15 | import android.widget.ArrayAdapter;
16 | import android.widget.CheckBox;
17 | import android.widget.CompoundButton;
18 | import android.widget.CompoundButton.OnCheckedChangeListener;
19 | import android.widget.EditText;
20 | import android.widget.Spinner;
21 | import android.widget.TextView;
22 | import android.widget.Toast;
23 | import cn.com.xpai.core.Manager;
24 |
25 | public class DialogFactory {
26 |
27 | private static final String TAG = "DialogFactory";
28 | private static Context mContext = null;
29 |
30 | public static final int CONNECTION_DIALOG = 0x20001;
31 | public static final int ALERT_DIALOG = 0x20002;
32 | public static final int ERR_DIALOG = 0x20003;
33 | public static final int CONNECTION_FAILED_DIALOG = 0x20004;
34 | public static final int LOGIN_DIALOG = 0x20005;
35 | public static final int MSG_DIALOG = 0x20006;
36 | public static final int INFO_DIALOG = 0x20007;
37 | public static final int SETTING_DIALOG = 0x20008;
38 | private static final String[] connectionModes = {"连接直播云", "连接私有云", "连接视频服务器"};
39 | private static View connectionEntryView;
40 | private static CheckBox connectTcpCheckBox;
41 | private static TextView mvHostTV;
42 | private static TextView mvPortTV;
43 | private static EditText mvCodeET;
44 | private static EditText mvHostET;
45 | private static EditText mvPortET;
46 |
47 | public static void register(Context context) {
48 | mContext = context;
49 |
50 | }
51 |
52 | public static Dialog getInstance(int dialogID) {
53 | return getInstance(dialogID, null);
54 | }
55 |
56 | public static Dialog getInstance(int dialogID, String msgStr) {
57 | if (mContext == null) {
58 | Message msg = new Message();
59 | msg.what = XPHandler.ERR_NOT_REGISTER_DIALOG_FACTORY;
60 | XPHandler.getInstance().sendMessage(msg);
61 | return null;
62 | }
63 | switch (dialogID) {
64 | case CONNECTION_DIALOG:
65 | return ConnectionDialog();
66 | case ALERT_DIALOG:
67 | return AlertDialog(msgStr);
68 | case ERR_DIALOG:
69 | return ErrorDialog(msgStr);
70 | case CONNECTION_FAILED_DIALOG:
71 | return ConnectionFailedDialog(msgStr);
72 | case LOGIN_DIALOG:
73 | return LoginDialog();
74 | case INFO_DIALOG:
75 | return infoDialog();
76 | default:
77 | return null;
78 | }
79 | }
80 |
81 | private static Dialog infoDialog() {
82 | Dialog dialog = new Dialog(mContext);
83 | dialog.findViewById(R.layout.info);
84 | return dialog;
85 | }
86 |
87 | private static Dialog ConnectionDialog() {
88 | LayoutInflater factory = LayoutInflater.from(mContext);
89 | connectionEntryView = factory.inflate(
90 | R.layout.connection_dialog, null);
91 | connectTcpCheckBox = (CheckBox) connectionEntryView
92 | .findViewById(R.id.mvconnect_tcp_checkbox);
93 | mvHostTV = (TextView) connectionEntryView
94 | .findViewById(R.id.mvhost_view);
95 | mvPortTV = (TextView) connectionEntryView
96 | .findViewById(R.id.mvport_view);
97 | mvCodeET = (EditText) connectionEntryView
98 | .findViewById(R.id.mvcode_edit);
99 | mvHostET = (EditText) connectionEntryView
100 | .findViewById(R.id.mvhost_edit);
101 | mvPortET = (EditText) connectionEntryView
102 | .findViewById(R.id.mvport_edit);
103 | Spinner mSpinner = (Spinner) connectionEntryView
104 | .findViewById(R.id.connection_mode_spinner);
105 | ArrayAdapter mAdapter = new ArrayAdapter(mContext,
106 | android.R.layout.simple_spinner_item, connectionModes);
107 | mSpinner.setAdapter(mAdapter);
108 | mAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
109 | for (int position=0;position parent, View view,
119 | int position, long id) {
120 | // TODO Auto-generated method stub
121 | Config.connectionMode = position;
122 | updateView();
123 | Config.save();
124 | }
125 |
126 | @Override
127 | public void onNothingSelected(AdapterView> parent) {
128 | // TODO Auto-generated method stub
129 | }
130 | });
131 |
132 | updateView();
133 |
134 | if(Config.isConnectToTcpPort) {
135 | connectTcpCheckBox.setChecked(true);
136 | } else {
137 | connectTcpCheckBox.setChecked(false);
138 | }
139 |
140 | Dialog dialog = new AlertDialog.Builder(mContext).setTitle(R.string.connection_dialog_title)
141 | .setView(connectionEntryView).setPositiveButton(
142 | R.string.connection_dialog_connect,
143 | new DialogInterface.OnClickListener() {
144 | public void onClick(DialogInterface dialog,
145 | int whichButton) {
146 | String mCode = mvCodeET.getText().toString();
147 | String mHost = mvHostET.getText().toString();
148 | String mPort = mvPortET.getText().toString();
149 | Config.serviceCode = mCode;
150 | Config.mvPort = mPort;
151 | if(Config.connectionMode == 2 &&
152 | (mPort == null || "".equals(mPort))) {
153 | Toast.makeText(mContext, "端口号不能为空!", Toast.LENGTH_LONG).show();
154 | return;
155 | }
156 |
157 | if (Config.connectionMode == 2) {
158 | Config.mvHost = mHost;
159 | if (Config.isConnectToTcpPort) {
160 | try {
161 | Manager.connectVS(mHost, Integer.parseInt(mPort),
162 | Config.netTimeout * 1000, Config.serviceCode, 0);
163 | } catch (NumberFormatException e) {
164 | // TODO Auto-generated catch block
165 | Toast.makeText(mContext, "非法的端口号!", Toast.LENGTH_LONG).show();
166 | e.printStackTrace();
167 | }
168 | } else {
169 | try {
170 | Manager.initNet(mHost, Integer.parseInt(mPort),
171 | Config.netTimeout * 1000, Config.serviceCode, 0);
172 | } catch (NumberFormatException e) {
173 | // TODO Auto-generated catch block
174 | Toast.makeText(mContext, "非法的端口号!", Toast.LENGTH_LONG).show();
175 | e.printStackTrace();
176 | }
177 | }
178 | } else if(Config.connectionMode == 0) {
179 | Manager.connectCloud(Config.getVSUrl,
180 | Config.netTimeout * 1000, Config.serviceCode, 0);
181 | } else {
182 | Config.privateCloudGetVSUrl = mHost;
183 | Manager.connectCloud(Config.privateCloudGetVSUrl,
184 | Config.netTimeout * 1000, Config.serviceCode, 0);
185 | }
186 | Config.save();
187 | }
188 | }).setNegativeButton(R.string.connection_dialog_cancel,
189 | new DialogInterface.OnClickListener() {
190 | public void onClick(DialogInterface dialog,
191 | int whichButton) {
192 | if(connectTcpCheckBox.isChecked()){
193 | Config.isConnectToTcpPort = true;
194 | } else {
195 | Config.isConnectToTcpPort = false;
196 | }
197 | Config.save();
198 | }
199 | }).create();
200 | mvCodeET.setText(Config.serviceCode);
201 | mvPortET.setText(Config.mvPort);
202 |
203 | connectTcpCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
204 |
205 | @Override
206 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
207 | // TODO Auto-generated method stub
208 | Config.isConnectToTcpPort = isChecked;
209 | Config.save();
210 | }
211 | });
212 | return dialog;
213 | }
214 |
215 | private static void updateView() {
216 | switch(Config.connectionMode) {
217 | case 0:
218 | mvPortTV.setVisibility(View.GONE);
219 | mvPortET.setVisibility(View.GONE);
220 | connectTcpCheckBox.setVisibility(View.GONE);
221 | mvHostET.setVisibility(View.GONE);
222 | mvHostTV.setVisibility(View.GONE);
223 | break;
224 | case 1:
225 | mvPortTV.setVisibility(View.GONE);
226 | mvPortET.setVisibility(View.GONE);
227 | connectTcpCheckBox.setVisibility(View.GONE);
228 | mvHostET.setVisibility(View.VISIBLE);
229 | mvHostTV.setVisibility(View.VISIBLE);
230 | mvHostET.setText(Config.privateCloudGetVSUrl);
231 | mvHostTV.setText("getVS地址");
232 | break;
233 | case 2:
234 | mvPortTV.setVisibility(View.VISIBLE);
235 | mvPortET.setVisibility(View.VISIBLE);
236 | connectTcpCheckBox.setVisibility(View.VISIBLE);
237 | mvHostET.setVisibility(View.VISIBLE);
238 | mvHostTV.setVisibility(View.VISIBLE);
239 | mvHostET.setText(Config.mvHost);
240 | mvHostTV.setText("主机地址");
241 | break;
242 | default:
243 | break;
244 | }
245 | }
246 |
247 | private static Dialog AlertDialog(String msg) {
248 | return new AlertDialog.Builder(mContext).setIcon(R.drawable.alert)
249 | .setTitle(R.string.msg_dialog_title).setMessage(msg)
250 | .setPositiveButton(R.string.msg_dialog_ok,
251 | new DialogInterface.OnClickListener() {
252 | public void onClick(DialogInterface dialog,
253 | int whichButton) {
254 |
255 | /* User clicked OK so do some stuff */
256 | }
257 | }).create();
258 | }
259 |
260 | private static Dialog ErrorDialog(String errMsg) {
261 | return new AlertDialog.Builder(mContext).setIcon(R.drawable.stop)
262 | .setTitle(R.string.error_dialog_title).setMessage(errMsg)
263 | .setPositiveButton(R.string.error_dialog_ok,
264 | new DialogInterface.OnClickListener() {
265 | public void onClick(DialogInterface dialog,
266 | int whichButton) {
267 |
268 | /* User clicked OK so do some stuff */
269 | }
270 | }).create();
271 | }
272 |
273 |
274 |
275 | private static Dialog ConnectionFailedDialog(String errMsg) {
276 | return new AlertDialog.Builder(mContext).setIcon(R.drawable.stop)
277 | .setTitle(R.string.error_dialog_title).setMessage(errMsg)
278 | .setPositiveButton(R.string.connection_failed_dialog_connect,
279 | new DialogInterface.OnClickListener() {
280 | public void onClick(DialogInterface dialog,
281 | int whichButton) {
282 | ConnectionDialog().show();
283 | }
284 | }).setNegativeButton(
285 | R.string.connection_failed_dialog_exit,
286 | new DialogInterface.OnClickListener() {
287 | public void onClick(DialogInterface dialog,
288 | int whichButton) {
289 | Message msg = new Message();
290 | msg.what = XPHandler.EXIT_APP;
291 | XPHandler.getInstance().sendMessage(msg);
292 | }
293 | }).create();
294 | }
295 |
296 | private static Dialog LoginDialog() {
297 | LayoutInflater factory = LayoutInflater.from(mContext);
298 | final View loginView = factory.inflate(R.layout.login_dialog, null);
299 | Dialog loginDialog = new AlertDialog.Builder(mContext).setTitle(R.string.login_dialog_title).setView(
300 | loginView).setPositiveButton(R.string.login_dialog_ok,
301 | new DialogInterface.OnClickListener() {
302 | public void onClick(DialogInterface dialog, int whichButton) {
303 | String mUserName = ((EditText) loginView
304 | .findViewById(R.id.mv_username_edit)).getText()
305 | .toString();
306 | String mPassword = ((EditText) loginView
307 | .findViewById(R.id.mv_password_edit)).getText()
308 | .toString();
309 | Config.userName = mUserName;
310 | Config.userPass = mPassword;
311 | Config.save();
312 | Manager.tryLogin(Config.userName, Config.userPass,
313 | Config.serviceCode);
314 | }
315 | }).setNegativeButton(R.string.login_dialog_cancel,
316 | new DialogInterface.OnClickListener() {
317 | public void onClick(DialogInterface dialog, int whichButton) {
318 |
319 | }
320 | }).create();
321 | ((EditText) loginView.findViewById(R.id.mv_username_edit))
322 | .setText(Config.userName);
323 | ((EditText) loginView.findViewById(R.id.mv_password_edit))
324 | .setText(Config.userPass);
325 | return loginDialog;
326 | }
327 |
328 | static void confirmDialog(String title, String msg, DialogInterface.OnClickListener yesListenser) {
329 | AlertDialog.Builder builder = new Builder(mContext);
330 | builder.setMessage(msg);
331 | builder.setTitle(title);
332 | builder.setPositiveButton(R.string.dialog_confirm, yesListenser);
333 |
334 | builder.setNegativeButton(R.string.dialog_cancel,
335 | new DialogInterface.OnClickListener() {
336 | @Override
337 | public void onClick(DialogInterface dialog, int which) {
338 | dialog.dismiss();
339 | }
340 | });
341 |
342 | builder.create().show();
343 | }
344 |
345 | }
--------------------------------------------------------------------------------
/src/cn/com/xpai/FileArrayAdapter.java:
--------------------------------------------------------------------------------
1 | package cn.com.xpai;
2 |
3 | import java.util.List;
4 |
5 | import android.content.Context;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.ArrayAdapter;
10 | import android.widget.TextView;
11 |
12 | public class FileArrayAdapter extends ArrayAdapter