Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xuexiangjys
XVideo
提交
cb96601c
X
XVideo
项目概览
xuexiangjys
/
XVideo
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
XVideo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
cb96601c
编写于
5月 31, 2018
作者:
xuexiangjys
😊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化代码处理,将视频录制由activity改为fragment
上级
4d9140a4
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
1010 addition
and
836 deletion
+1010
-836
.idea/caches/build_file_checksums.ser
.idea/caches/build_file_checksums.ser
+0
-0
xvideo-demo/src/main/java/com/xuexiang/xvideodemo/MainActivity.java
...o/src/main/java/com/xuexiang/xvideodemo/MainActivity.java
+4
-4
xvideo-lib/build.gradle
xvideo-lib/build.gradle
+1
-0
xvideo-lib/src/main/java/com/xuexiang/xvideo/MediaRecorderActivity.java
.../main/java/com/xuexiang/xvideo/MediaRecorderActivity.java
+63
-655
xvideo-lib/src/main/java/com/xuexiang/xvideo/MediaRecorderFragment.java
.../main/java/com/xuexiang/xvideo/MediaRecorderFragment.java
+727
-0
xvideo-lib/src/main/java/com/xuexiang/xvideo/model/LocalMediaConfig.java
...main/java/com/xuexiang/xvideo/model/LocalMediaConfig.java
+14
-14
xvideo-lib/src/main/java/com/xuexiang/xvideo/model/MediaRecorderConfig.java
...n/java/com/xuexiang/xvideo/model/MediaRecorderConfig.java
+73
-47
xvideo-lib/src/main/res/layout/xvideo_activity_media_recorder.xml
...ib/src/main/res/layout/xvideo_activity_media_recorder.xml
+6
-116
xvideo-lib/src/main/res/layout/xvideo_layout_media_recorder.xml
...-lib/src/main/res/layout/xvideo_layout_media_recorder.xml
+122
-0
未找到文件。
.idea/caches/build_file_checksums.ser
浏览文件 @
cb96601c
无法预览此类型文件
xvideo-demo/src/main/java/com/xuexiang/xvideodemo/MainActivity.java
浏览文件 @
cb96601c
...
...
@@ -274,7 +274,7 @@ public class MainActivity extends AppCompatActivity {
}
// FFMpegUtils.captureThumbnails("/storage/emulated/0/DCIM/mabeijianxi/1496455533800/1496455533800.mp4", "/storage/emulated/0/DCIM/mabeijianxi/1496455533800/1496455533800.jpg", "1");
MediaRecorderConfig
config
=
new
MediaRecorderConfig
.
Bui
dl
er
()
MediaRecorderConfig
config
=
new
MediaRecorderConfig
.
Bui
ld
er
()
.
fullScreen
(
needFull
)
.
smallVideoWidth
(
needFull
?
0
:
Integer
.
valueOf
(
width
))
.
smallVideoHeight
(
Integer
.
valueOf
(
height
))
...
...
@@ -284,7 +284,7 @@ public class MainActivity extends AppCompatActivity {
.
videoBitrate
(
Integer
.
valueOf
(
bitrate
))
.
captureThumbnailsTime
(
1
)
.
build
();
MediaRecorderActivity
.
goSmall
VideoRecorder
(
this
,
SendSmallVideoActivity
.
class
.
getName
(),
config
);
MediaRecorderActivity
.
start
VideoRecorder
(
this
,
SendSmallVideoActivity
.
class
.
getName
(),
config
);
}
...
...
@@ -364,8 +364,8 @@ public class MainActivity extends AppCompatActivity {
if
(!
TextUtils
.
isEmpty
(
scale
))
{
fScale
=
Float
.
valueOf
(
scale
);
}
LocalMediaConfig
.
Bui
dler
buidler
=
new
LocalMediaConfig
.
Buidl
er
();
final
LocalMediaConfig
config
=
bui
dl
er
LocalMediaConfig
.
Bui
lder
builder
=
new
LocalMediaConfig
.
Build
er
();
final
LocalMediaConfig
config
=
bui
ld
er
.
setVideoPath
(
_data
)
.
captureThumbnailsTime
(
1
)
.
doH264Compress
(
compressMode
)
...
...
xvideo-lib/build.gradle
浏览文件 @
cb96601c
...
...
@@ -37,6 +37,7 @@ android {
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
compileOnly
deps
.
support
.
app_compat
}
apply
from:
"https://raw.githubusercontent.com/xuexiangjys/XUtil/master/JitPackUpload.gradle"
xvideo-lib/src/main/java/com/xuexiang/xvideo/MediaRecorderActivity.java
浏览文件 @
cb96601c
此差异已折叠。
点击以展开。
xvideo-lib/src/main/java/com/xuexiang/xvideo/MediaRecorderFragment.java
0 → 100644
浏览文件 @
cb96601c
此差异已折叠。
点击以展开。
xvideo-lib/src/main/java/com/xuexiang/xvideo/model/LocalMediaConfig.java
浏览文件 @
cb96601c
...
...
@@ -45,13 +45,13 @@ public final class LocalMediaConfig implements Parcelable {
private
final
float
scale
;
private
LocalMediaConfig
(
Bui
dler
buidl
er
)
{
this
.
captureThumbnailsTime
=
bui
dl
er
.
captureThumbnailsTime
;
this
.
FRAME_RATE
=
bui
dl
er
.
FRAME_RATE
;
this
.
compressConfig
=
bui
dl
er
.
compressConfig
;
this
.
videoAddress
=
bui
dl
er
.
videoPath
;
this
.
scale
=
bui
dl
er
.
scale
;
this
.
GO_HOME
=
bui
dl
er
.
GO_HOME
;
private
LocalMediaConfig
(
Bui
lder
build
er
)
{
this
.
captureThumbnailsTime
=
bui
ld
er
.
captureThumbnailsTime
;
this
.
FRAME_RATE
=
bui
ld
er
.
FRAME_RATE
;
this
.
compressConfig
=
bui
ld
er
.
compressConfig
;
this
.
videoAddress
=
bui
ld
er
.
videoPath
;
this
.
scale
=
bui
ld
er
.
scale
;
this
.
GO_HOME
=
bui
ld
er
.
GO_HOME
;
}
...
...
@@ -118,7 +118,7 @@ public final class LocalMediaConfig implements Parcelable {
}
public
static
class
Bui
dl
er
{
public
static
class
Bui
ld
er
{
/**
* 录制后会剪切一帧缩略图并保存,就是取时间轴上这个时间的画面
*/
...
...
@@ -141,7 +141,7 @@ public final class LocalMediaConfig implements Parcelable {
* @param captureThumbnailsTime 会剪切一帧缩略图并保存,就是取时间轴上这个时间的画面
* @return
*/
public
Bui
dl
er
captureThumbnailsTime
(
int
captureThumbnailsTime
)
{
public
Bui
ld
er
captureThumbnailsTime
(
int
captureThumbnailsTime
)
{
this
.
captureThumbnailsTime
=
captureThumbnailsTime
;
return
this
;
}
...
...
@@ -151,23 +151,23 @@ public final class LocalMediaConfig implements Parcelable {
* {@link AutoVBRMode }{@link VBRMode}{@link CBRMode}
* @return
*/
public
Bui
dl
er
doH264Compress
(
BaseMediaBitrateConfig
compressConfig
)
{
public
Bui
ld
er
doH264Compress
(
BaseMediaBitrateConfig
compressConfig
)
{
this
.
compressConfig
=
compressConfig
;
return
this
;
}
public
Bui
dl
er
goHome
(
boolean
GO_HOME
)
{
public
Bui
ld
er
goHome
(
boolean
GO_HOME
)
{
this
.
GO_HOME
=
GO_HOME
;
return
this
;
}
public
Bui
dl
er
setFramerate
(
int
MAX_FRAME_RATE
)
{
public
Bui
ld
er
setFramerate
(
int
MAX_FRAME_RATE
)
{
this
.
FRAME_RATE
=
MAX_FRAME_RATE
;
return
this
;
}
public
Bui
dl
er
setVideoPath
(
String
videoPath
)
{
public
Bui
ld
er
setVideoPath
(
String
videoPath
)
{
this
.
videoPath
=
videoPath
;
return
this
;
}
...
...
@@ -176,7 +176,7 @@ public final class LocalMediaConfig implements Parcelable {
* @param scale 大于1,否者无效
* @return
*/
public
Bui
dl
er
setScale
(
float
scale
)
{
public
Bui
ld
er
setScale
(
float
scale
)
{
if
(
scale
<=
1
)
{
this
.
scale
=
1
;
}
else
{
...
...
xvideo-lib/src/main/java/com/xuexiang/xvideo/model/MediaRecorderConfig.java
浏览文件 @
cb96601c
...
...
@@ -64,21 +64,22 @@ public final class MediaRecorderConfig implements Parcelable {
private
final
boolean
GO_HOME
;
private
MediaRecorderConfig
(
Buidler
buidler
)
{
this
.
FULL_SCREEN
=
buidler
.
FULL_SCREEN
;
this
.
RECORD_TIME_MAX
=
buidler
.
RECORD_TIME_MAX
;
this
.
RECORD_TIME_MIN
=
buidler
.
RECORD_TIME_MIN
;
this
.
MAX_FRAME_RATE
=
buidler
.
MAX_FRAME_RATE
;
this
.
captureThumbnailsTime
=
buidler
.
captureThumbnailsTime
;
this
.
MIN_FRAME_RATE
=
buidler
.
MIN_FRAME_RATE
;
this
.
SMALL_VIDEO_HEIGHT
=
buidler
.
SMALL_VIDEO_HEIGHT
;
this
.
SMALL_VIDEO_WIDTH
=
buidler
.
SMALL_VIDEO_WIDTH
;
this
.
VIDEO_BITRATE
=
buidler
.
VIDEO_BITRATE
;
this
.
GO_HOME
=
buidler
.
GO_HOME
;
public
static
MediaRecorderConfig
newInstance
()
{
return
new
Builder
().
build
();
}
private
MediaRecorderConfig
(
Builder
builder
)
{
this
.
FULL_SCREEN
=
builder
.
fullscreen
;
this
.
RECORD_TIME_MAX
=
builder
.
recordTimeMax
;
this
.
RECORD_TIME_MIN
=
builder
.
recordTimeMin
;
this
.
MAX_FRAME_RATE
=
builder
.
maxFrameRate
;
this
.
captureThumbnailsTime
=
builder
.
captureThumbnailsTime
;
this
.
MIN_FRAME_RATE
=
builder
.
minFrameRate
;
this
.
SMALL_VIDEO_HEIGHT
=
builder
.
smallVideoHeight
;
this
.
SMALL_VIDEO_WIDTH
=
builder
.
smallVideoWidth
;
this
.
VIDEO_BITRATE
=
builder
.
videoBitrate
;
this
.
GO_HOME
=
builder
.
goHome
;
}
protected
MediaRecorderConfig
(
Parcel
in
)
{
FULL_SCREEN
=
in
.
readByte
()
!=
0
;
...
...
@@ -105,7 +106,7 @@ public final class MediaRecorderConfig implements Parcelable {
}
};
public
boolean
isG
O_HOME
()
{
public
boolean
isG
oHome
()
{
return
GO_HOME
;
}
...
...
@@ -142,7 +143,6 @@ public final class MediaRecorderConfig implements Parcelable {
return
SMALL_VIDEO_WIDTH
;
}
public
int
getVideoBitrate
()
{
return
VIDEO_BITRATE
;
}
...
...
@@ -166,47 +166,74 @@ public final class MediaRecorderConfig implements Parcelable {
dest
.
writeByte
((
byte
)
(
GO_HOME
?
1
:
0
));
}
public
static
Builder
newBuilder
()
{
return
new
Builder
();
}
/**
* 默认录制最长时间
*/
public
static
final
int
DEFAULT_RECORD_TIME_MAX
=
6
*
1000
;
/**
* 默认录制最短时间
*/
public
static
final
int
DEFAULT_RECORD_TIME_MIN
=
(
int
)
(
1.5
*
1000
);
/**
* 默认小视频高度
*/
public
static
final
int
DEFAULT_SMALL_VIDEO_HEIGHT
=
480
;
/**
* 默认小视频宽度
*/
public
static
final
int
DEFAULT_SMALL_VIDEO_WIDTH
=
360
;
/**
* 默认最大帧率
*/
public
static
final
int
DEFAULT_SMALL_MAX_FRAME_RATE
=
20
;
/**
* 默认最小帧率
*/
public
static
final
int
DEFAULT_SMALL_MIN_FRAME_RATE
=
8
;
public
static
class
Bui
dl
er
{
public
static
class
Bui
ld
er
{
/**
* 录制时间
*/
private
int
RECORD_TIME_MAX
=
6
*
1000
;
private
int
recordTimeMax
=
DEFAULT_RECORD_TIME_MAX
;
private
int
recordTimeMin
=
DEFAULT_RECORD_TIME_MIN
;
/**
* 小视频高度,TODO 注意:宽度不能随意穿,需要传送手机摄像头手支持录制的视频高度,注意是高度(因为会选择,具体原因不多解析)。
* 获取摄像头所支持的尺寸的方式是{@link android.graphics.Camera #getSupportedPreviewSizes()}
* 一般支持的尺寸的高度有:240、480、720、1080等,具体值请用以上方法获取
*/
private
int
SMALL_VIDEO_HEIGHT
=
480
;
private
int
smallVideoHeight
=
DEFAULT_SMALL_VIDEO_HEIGHT
;
/**
* 小视频宽度
*/
private
int
SMALL_VIDEO_WIDTH
=
360
;
private
int
smallVideoWidth
=
DEFAULT_SMALL_VIDEO_WIDTH
;
/**
* 最大帧率
*/
private
int
MAX_FRAME_RATE
=
20
;
private
int
maxFrameRate
=
DEFAULT_SMALL_MAX_FRAME_RATE
;
/**
* 最小帧率
*/
private
int
MIN_FRAME_RATE
=
8
;
private
int
minFrameRate
=
DEFAULT_SMALL_MIN_FRAME_RATE
;
/**
* 视频码率//todo 注意传入>0的值后码率模式将从VBR变成CBR
*/
private
int
VIDEO_BITRATE
;
private
int
videoBitrate
;
/**
* 录制后会剪切一帧缩略图并保存,就是取时间轴上这个时间的画面
*/
private
int
captureThumbnailsTime
=
1
;
private
boolean
goHome
=
false
;
private
boolean
GO_HOME
=
false
;
public
int
RECORD_TIME_MIN
=
(
int
)
(
1.5
*
1000
);
private
boolean
FULL_SCREEN
=
false
;
private
boolean
fullscreen
=
false
;
public
MediaRecorderConfig
build
()
{
...
...
@@ -217,18 +244,17 @@ public final class MediaRecorderConfig implements Parcelable {
* @param captureThumbnailsTime 录制后会剪切一帧缩略图并保存,就是取时间轴上这个时间的画面
* @return
*/
public
Bui
dl
er
captureThumbnailsTime
(
int
captureThumbnailsTime
)
{
public
Bui
ld
er
captureThumbnailsTime
(
int
captureThumbnailsTime
)
{
this
.
captureThumbnailsTime
=
captureThumbnailsTime
;
return
this
;
}
/**
* @param MAX_FRAME_RATE 最大帧率(与视频清晰度、大小息息相关)
* @return
*/
public
Bui
dl
er
maxFrameRate
(
int
MAX_FRAME_RATE
)
{
this
.
MAX_FRAME_RATE
=
MAX_FRAME_RATE
;
public
Bui
ld
er
maxFrameRate
(
int
MAX_FRAME_RATE
)
{
this
.
maxFrameRate
=
MAX_FRAME_RATE
;
return
this
;
}
...
...
@@ -236,8 +262,8 @@ public final class MediaRecorderConfig implements Parcelable {
* @param MIN_FRAME_RATE 最小帧率(与视频清晰度、大小息息相关)
* @return
*/
public
Bui
dl
er
minFrameRate
(
int
MIN_FRAME_RATE
)
{
this
.
MIN_FRAME_RATE
=
MIN_FRAME_RATE
;
public
Bui
ld
er
minFrameRate
(
int
MIN_FRAME_RATE
)
{
this
.
minFrameRate
=
MIN_FRAME_RATE
;
return
this
;
}
...
...
@@ -245,8 +271,8 @@ public final class MediaRecorderConfig implements Parcelable {
* @param RECORD_TIME_MAX 录制时间
* @return
*/
public
Bui
dl
er
recordTimeMax
(
int
RECORD_TIME_MAX
)
{
this
.
RECORD_TIME_MAX
=
RECORD_TIME_MAX
;
public
Bui
ld
er
recordTimeMax
(
int
RECORD_TIME_MAX
)
{
this
.
recordTimeMax
=
RECORD_TIME_MAX
;
return
this
;
}
...
...
@@ -254,8 +280,8 @@ public final class MediaRecorderConfig implements Parcelable {
* @param RECORD_TIME_MIN 最少录制时间
* @return
*/
public
Bui
dl
er
recordTimeMin
(
int
RECORD_TIME_MIN
)
{
this
.
RECORD_TIME_MIN
=
RECORD_TIME_MIN
;
public
Bui
ld
er
recordTimeMin
(
int
RECORD_TIME_MIN
)
{
this
.
recordTimeMin
=
RECORD_TIME_MIN
;
return
this
;
}
...
...
@@ -266,8 +292,8 @@ public final class MediaRecorderConfig implements Parcelable {
* 一般支持的尺寸的高度有:240、480、720、1080等,具体值请用以上方法获取
* @return
*/
public
Bui
dl
er
smallVideoHeight
(
int
SMALL_VIDEO_HEIGHT
)
{
this
.
SMALL_VIDEO_HEIGHT
=
SMALL_VIDEO_HEIGHT
;
public
Bui
ld
er
smallVideoHeight
(
int
SMALL_VIDEO_HEIGHT
)
{
this
.
smallVideoHeight
=
SMALL_VIDEO_HEIGHT
;
return
this
;
}
...
...
@@ -275,8 +301,8 @@ public final class MediaRecorderConfig implements Parcelable {
* @param SMALL_VIDEO_WIDTH
* @return
*/
public
Bui
dl
er
smallVideoWidth
(
int
SMALL_VIDEO_WIDTH
)
{
this
.
SMALL_VIDEO_WIDTH
=
SMALL_VIDEO_WIDTH
;
public
Bui
ld
er
smallVideoWidth
(
int
SMALL_VIDEO_WIDTH
)
{
this
.
smallVideoWidth
=
SMALL_VIDEO_WIDTH
;
return
this
;
}
...
...
@@ -284,18 +310,18 @@ public final class MediaRecorderConfig implements Parcelable {
* @param VIDEO_BITRATE 视频码率
* @return
*/
public
Bui
dl
er
videoBitrate
(
int
VIDEO_BITRATE
)
{
this
.
VIDEO_BITRATE
=
VIDEO_BITRATE
;
public
Bui
ld
er
videoBitrate
(
int
VIDEO_BITRATE
)
{
this
.
videoBitrate
=
VIDEO_BITRATE
;
return
this
;
}
public
Bui
dl
er
goHome
(
boolean
GO_HOME
)
{
this
.
GO_HOME
=
GO_HOME
;
public
Bui
ld
er
goHome
(
boolean
GO_HOME
)
{
this
.
goHome
=
GO_HOME
;
return
this
;
}
public
Bui
dl
er
fullScreen
(
boolean
full
)
{
this
.
FULL_SCREEN
=
full
;
public
Bui
ld
er
fullScreen
(
boolean
full
)
{
this
.
fullscreen
=
full
;
return
this
;
}
}
...
...
xvideo-lib/src/main/res/layout/xvideo_activity_media_recorder.xml
浏览文件 @
cb96601c
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2018 xuexiangjys(xuexiangjys@163.com)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<?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:
background=
"@android:color/transparent
"
>
android:
orientation=
"vertical
"
>
<FrameLayout
android:id=
"@+id/fl_record_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<SurfaceView
android:id=
"@+id/record_preview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"49dp"
/>
</FrameLayout>
<RelativeLayout
android:id=
"@+id/title_layout"
android:layout_width=
"match_parent"
android:layout_height=
"49dp"
android:background=
"@color/xvideo_actionbar_bg_color"
android:gravity=
"center_vertical"
>
<ImageView
android:id=
"@+id/title_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dip"
android:padding=
"10dip"
android:src=
"@drawable/xvideo_cancel_normal"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"49dip"
android:layout_alignParentRight=
"true"
android:gravity=
"end|center_vertical"
android:orientation=
"horizontal"
>
<CheckBox
android:id=
"@+id/record_camera_led"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/xvideo_camera_flash_led_selector"
android:button=
"@null"
android:textColor=
"@android:color/white"
/>
<CheckBox
android:id=
"@+id/record_camera_switcher"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dip"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/xvideo_camera_switch_selector"
android:button=
"@null"
/>
<ImageView
android:id=
"@+id/title_next"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"5dip"
android:padding=
"10dip"
android:src=
"@drawable/xvideo_next_seletor"
android:visibility=
"gone"
/>
</LinearLayout>
</RelativeLayout>
<com.xuexiang.xvideo.ProgressView
android:id=
"@+id/record_progress"
android:layout_width=
"match_parent"
android:layout_height=
"5dp"
android:layout_below=
"@+id/title_layout"
/>
<!-- camera_bottom_bg -->
<RelativeLayout
android:id=
"@+id/bottom_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/record_progress"
android:layout_marginTop=
"300dip"
android:background=
"@color/xvideo_actionbar_bg_color"
>
<CheckedTextView
android:id=
"@+id/record_delete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18dip"
android:background=
"@drawable/xvideo_delete_selector"
android:button=
"@null"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/record_controller"
android:layout_width=
"108dp"
android:layout_height=
"108dp"
android:layout_centerInParent=
"true"
android:background=
"@drawable/xvideo_small_video_shoot"
android:gravity=
"center"
android:text=
"按住拍"
android:textColor=
"@color/xvideo_camera_progress_three"
android:textSize=
"16sp"
/>
</RelativeLayout>
android:layout_height=
"match_parent"
/>
</RelativeLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
xvideo-lib/src/main/res/layout/xvideo_layout_media_recorder.xml
0 → 100644
浏览文件 @
cb96601c
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2018 xuexiangjys(xuexiangjys@163.com)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@android:color/transparent"
>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<SurfaceView
android:id=
"@+id/record_preview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"49dp"
/>
</FrameLayout>
<RelativeLayout
android:id=
"@+id/title_layout"
android:layout_width=
"match_parent"
android:layout_height=
"49dp"
android:background=
"@color/xvideo_actionbar_bg_color"
android:gravity=
"center_vertical"
>
<ImageView
android:id=
"@+id/title_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dip"
android:padding=
"10dip"
android:src=
"@drawable/xvideo_cancel_normal"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"49dip"
android:layout_alignParentRight=
"true"
android:gravity=
"end|center_vertical"
android:orientation=
"horizontal"
>
<CheckBox
android:id=
"@+id/record_camera_led"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/xvideo_camera_flash_led_selector"
android:button=
"@null"
android:textColor=
"@android:color/white"
/>
<CheckBox
android:id=
"@+id/record_camera_switcher"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dip"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/xvideo_camera_switch_selector"
android:button=
"@null"
/>
<ImageView
android:id=
"@+id/title_next"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"5dip"
android:padding=
"10dip"
android:src=
"@drawable/xvideo_next_seletor"
android:visibility=
"gone"
/>
</LinearLayout>
</RelativeLayout>
<com.xuexiang.xvideo.ProgressView
android:id=
"@+id/record_progress"
android:layout_width=
"match_parent"
android:layout_height=
"5dp"
android:layout_below=
"@+id/title_layout"
/>
<!-- camera_bottom_bg -->
<RelativeLayout
android:id=
"@+id/bottom_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/record_progress"
android:layout_marginTop=
"300dip"
android:background=
"@color/xvideo_actionbar_bg_color"
>
<CheckedTextView
android:id=
"@+id/record_delete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"18dip"
android:background=
"@drawable/xvideo_delete_selector"
android:button=
"@null"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/record_controller"
android:layout_width=
"108dp"
android:layout_height=
"108dp"
android:layout_centerInParent=
"true"
android:background=
"@drawable/xvideo_small_video_shoot"
android:gravity=
"center"
android:text=
"按住拍"
android:textColor=
"@color/xvideo_camera_progress_three"
android:textSize=
"16sp"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录