Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
fdcdb8bf
Commit
fdcdb8bf
authored
Jul 06, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 咨询详情页视频播放
parent
cce84b56
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
399 additions
and
43 deletions
+399
-43
BasePhotoFragment.java
m-consultant/src/main/java/com/yidianling/consultant/preview/BasePhotoFragment.java
+209
-26
GPreviewActivity.java
m-consultant/src/main/java/com/yidianling/consultant/preview/GPreviewActivity.java
+14
-10
GridPreviewActivity.java
m-consultant/src/main/java/com/yidianling/consultant/preview/GridPreviewActivity.java
+1
-1
SmoothImageView.java
m-consultant/src/main/java/com/yidianling/consultant/preview/SmoothImageView.java
+13
-0
TestImageLoader.java
m-consultant/src/main/java/com/yidianling/consultant/preview/TestImageLoader.java
+5
-0
ic_video_play.png
m-consultant/src/main/res/drawable-xxxhdpi/ic_video_play.png
+0
-0
consultant_back.png
m-consultant/src/main/res/drawable/consultant_back.png
+0
-0
consultant_bg_loading.xml
m-consultant/src/main/res/drawable/consultant_bg_loading.xml
+8
-0
consultant_seekbar_style.xml
m-consultant/src/main/res/drawable/consultant_seekbar_style.xml
+56
-0
consultant_seekbar_thumb.xml
m-consultant/src/main/res/drawable/consultant_seekbar_thumb.xml
+19
-0
consultant_image_preview_photo.xml
m-consultant/src/main/res/layout/consultant_image_preview_photo.xml
+1
-0
fragment_image_photo_layout.xml
m-consultant/src/main/res/layout/fragment_image_photo_layout.xml
+73
-6
No files found.
m-consultant/src/main/java/com/yidianling/consultant/preview/BasePhotoFragment.java
View file @
fdcdb8bf
package
com
.
yidianling
.
consultant
.
preview
;
import
android.animation.ObjectAnimator
;
import
android.graphics.Color
;
import
android.graphics.drawable.Drawable
;
import
android.net.Uri
;
...
...
@@ -9,8 +10,10 @@ import android.text.TextUtils;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.SeekBar
;
import
androidx.annotation.CallSuper
;
import
androidx.annotation.Nullable
;
...
...
@@ -18,8 +21,18 @@ import androidx.core.view.ViewCompat;
import
androidx.fragment.app.Fragment
;
import
com.dou361.ijkplayer.widget.IjkVideoView
;
import
com.ydl.ydlcommon.ui.Loading
;
import
com.yidianling.consultant.R
;
import
java.util.concurrent.TimeUnit
;
import
io.reactivex.Observable
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.schedulers.Schedulers
;
import
tv.danmaku.ijk.media.player.IMediaPlayer
;
/**
* @author rainb
...
...
@@ -44,6 +57,16 @@ public class BasePhotoFragment extends Fragment {
private
LinearLayout
btnLL
;
private
RelativeLayout
videoContainer
;
private
IjkVideoView
videoView
;
private
Disposable
disposable
;
private
SeekBar
seekBar
;
private
View
ivPlay
;
private
boolean
isPrepared
=
false
;
private
ImageView
ivImg
;
private
volatile
boolean
isTouch
=
false
;
private
boolean
isCompletion
=
false
;
private
boolean
isVisiable
=
false
;
private
View
ivBack
;
// public static VideoClickListener listener;
...
...
@@ -102,20 +125,34 @@ public class BasePhotoFragment extends Fragment {
public
void
setUserVisibleHint
(
boolean
isVisibleToUser
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
);
isVisiable
=
isVisibleToUser
;
if
(!
isVisibleToUser
&&
beanViewInfo
!=
null
)
{
videoView
.
seekTo
(
0
);
seekBar
.
setProgress
(
0
);
videoView
.
pause
();
if
(
ivPlay
!=
null
&&
!
TextUtils
.
isEmpty
(
beanViewInfo
.
getVideoUrl
()))
{
ivPlay
.
setVisibility
(
View
.
VISIBLE
);
if
(
ivImg
!=
null
)
{
ivImg
.
setVisibility
(
View
.
VISIBLE
);
}
}
stopTiming
();
}
}
@Override
public
void
onDestroy
()
{
super
.
onDestroy
();
ZoomMediaLoader
.
getInstance
().
getLoader
().
clearMemory
(
getActivity
());
if
(
getActivity
()
!=
null
&&
getActivity
().
isFinishing
())
{
// listener = null;
}
}
public
void
release
()
{
isTransPhoto
=
false
;
if
(
videoView
!=
null
)
{
videoView
.
release
(
true
);
stopTiming
();
}
}
/**
...
...
@@ -132,8 +169,19 @@ public class BasePhotoFragment extends Fragment {
imageView
.
setBtnLL
(
btnLL
);
videoContainer
=
view
.
findViewById
(
R
.
id
.
videoContainer
);
videoView
=
view
.
findViewById
(
R
.
id
.
videoView
);
seekBar
=
view
.
findViewById
(
R
.
id
.
seekbar
);
ivPlay
=
view
.
findViewById
(
R
.
id
.
ivPlay
);
ivImg
=
view
.
findViewById
(
R
.
id
.
ivImage
);
ivBack
=
view
.
findViewById
(
R
.
id
.
ivBack
);
imageView
.
setBackIv
(
ivBack
);
ivBack
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
transformOutAnim
();
((
GPreviewActivity
)
getActivity
()).
transformOut
();
}
});
// btnVideo.setOnClickListener(new View.OnClickListener() {
// @Override
...
...
@@ -151,27 +199,23 @@ public class BasePhotoFragment extends Fragment {
// });
mySimpleTarget
=
new
MySimpleTarget
()
{
@Override
public
void
onResourceReady
()
{
loading
.
setVisibility
(
View
.
GONE
);
String
video
=
beanViewInfo
.
getVideoUrl
();
if
(
video
!=
null
&&
!
video
.
isEmpty
())
{
btnVideo
.
setVisibility
(
View
.
VISIBLE
);
ViewCompat
.
animate
(
btnVideo
).
alpha
(
1
).
setDuration
(
1000
).
start
();
}
else
{
btnVideo
.
setVisibility
(
View
.
GONE
);
}
//
String video = beanViewInfo.getVideoUrl();
//
if (video != null && !video.isEmpty()) {
//
btnVideo.setVisibility(View.VISIBLE);
//
ViewCompat.animate(btnVideo).alpha(1).setDuration(1000).start();
//
} else {
//
btnVideo.setVisibility(View.GONE);
//
}
}
@Override
public
void
onLoadFailed
(
Drawable
errorDrawable
)
{
loading
.
setVisibility
(
View
.
GONE
);
btnVideo
.
setVisibility
(
View
.
GONE
);
if
(
errorDrawable
!=
null
)
{
imageView
.
setImageDrawable
(
errorDrawable
);
}
...
...
@@ -198,7 +242,8 @@ public class BasePhotoFragment extends Fragment {
//是否展示动画
isTransPhoto
=
bundle
.
getBoolean
(
KEY_TRANS_PHOTO
,
false
);
if
(!
TextUtils
.
isEmpty
(
beanViewInfo
.
getUrl
())){
if
(!
TextUtils
.
isEmpty
(
beanViewInfo
.
getUrl
()))
{
ivPlay
.
setVisibility
(
View
.
GONE
);
if
(
beanViewInfo
.
getUrl
().
toLowerCase
().
contains
(
".gif"
))
{
imageView
.
setVisibility
(
View
.
VISIBLE
);
videoContainer
.
setVisibility
(
View
.
GONE
);
...
...
@@ -209,20 +254,103 @@ public class BasePhotoFragment extends Fragment {
//加载图
ZoomMediaLoader
.
getInstance
().
getLoader
().
displayImage
(
this
,
beanViewInfo
.
getUrl
(),
imageView
,
mySimpleTarget
);
}
}
else
{
}
else
{
ivPlay
.
setVisibility
(
View
.
VISIBLE
);
videoContainer
.
setVisibility
(
View
.
VISIBLE
);
imageView
.
setVisibility
(
View
.
GONE
);
// IjkVideoView videoView = new IjkVideoView(getContext());
// videoContainer.addView(videoView);
String
videoUlr
=
beanViewInfo
.
getVideoUrl
();
ZoomMediaLoader
.
getInstance
().
getLoader
().
displayImage
(
this
,
"https://hellorfimg.zcool.cn/preview260/123343987.jpg"
,
ivImg
,
mySimpleTarget
);
final
String
videoUlr
=
beanViewInfo
.
getVideoUrl
();
if
(!
TextUtils
.
isEmpty
(
videoUlr
))
{
rootView
.
setBackgroundColor
(
Color
.
BLACK
);
seekBar
.
setVisibility
(
View
.
VISIBLE
);
videoView
.
setVideoURI
(
Uri
.
parse
(
videoUlr
));
videoView
.
start
();
videoView
.
setOnPreparedListener
(
new
IMediaPlayer
.
OnPreparedListener
()
{
@Override
public
void
onPrepared
(
IMediaPlayer
iMediaPlayer
)
{
loading
.
setVisibility
(
View
.
GONE
);
isPrepared
=
true
;
int
maxProgress
=
(
int
)
iMediaPlayer
.
getDuration
();
if
(
maxProgress
>
0
)
{
seekBar
.
setMax
(
maxProgress
);
}
else
{
seekBar
.
setVisibility
(
View
.
GONE
);
}
}
});
videoView
.
setOnCompletionListener
(
new
IMediaPlayer
.
OnCompletionListener
()
{
@Override
public
void
onCompletion
(
IMediaPlayer
iMediaPlayer
)
{
isCompletion
=
true
;
videoView
.
seekTo
(
0
);
stopTiming
();
ivPlay
.
setVisibility
(
View
.
VISIBLE
);
}
});
videoView
.
setOnInfoListener
(
new
IMediaPlayer
.
OnInfoListener
()
{
@Override
public
boolean
onInfo
(
IMediaPlayer
iMediaPlayer
,
int
what
,
int
extra
)
{
if
(
what
==
IMediaPlayer
.
MEDIA_INFO_BUFFERING_START
&&
!
isCompletion
&&
isVisiable
)
{
Loading
.
INSTANCE
.
show
(
getContext
(),
"正在加载"
);
}
else
if
(
what
==
IMediaPlayer
.
MEDIA_INFO_BUFFERING_END
)
{
Loading
.
INSTANCE
.
close
();
}
return
true
;
}
});
ivPlay
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(!
isPrepared
)
{
loading
.
setVisibility
(
View
.
VISIBLE
);
}
ivImg
.
setVisibility
(
View
.
GONE
);
ivPlay
.
setVisibility
(
View
.
GONE
);
startTiming
();
videoView
.
start
();
isCompletion
=
false
;
}
});
videoContainer
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
videoView
.
isPlaying
())
{
ivPlay
.
setVisibility
(
View
.
VISIBLE
);
stopTiming
();
videoView
.
pause
();
}
}
});
seekBar
.
setOnSeekBarChangeListener
(
new
SeekBar
.
OnSeekBarChangeListener
()
{
@Override
public
void
onProgressChanged
(
SeekBar
seekBar
,
int
progress
,
boolean
fromUser
)
{
}
@Override
public
void
onStartTrackingTouch
(
SeekBar
seekBar
)
{
isTouch
=
true
;
}
@Override
public
void
onStopTrackingTouch
(
SeekBar
seekBar
)
{
isTouch
=
false
;
if
(
seekBar
!=
null
)
{
videoView
.
seekTo
(
seekBar
.
getProgress
());
videoView
.
start
();
ivPlay
.
setVisibility
(
View
.
GONE
);
isCompletion
=
false
;
}
}
});
}
}
...
...
@@ -253,6 +381,7 @@ public class BasePhotoFragment extends Fragment {
@Override
public
void
onPhotoTap
(
View
view
,
float
x
,
float
y
)
{
if
(
imageView
.
checkMinScale
())
{
transformOutAnim
();
((
GPreviewActivity
)
getActivity
()).
transformOut
();
}
}
...
...
@@ -319,4 +448,58 @@ public class BasePhotoFragment extends Fragment {
public
IThumbViewInfo
getBeanViewInfo
()
{
return
beanViewInfo
;
}
private
void
startTiming
()
{
disposable
=
Observable
.
interval
(
3
,
TimeUnit
.
MILLISECONDS
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
Schedulers
.
computation
())
.
subscribe
(
new
Consumer
<
Long
>()
{
@Override
public
void
accept
(
Long
aLong
)
throws
Exception
{
// val pos = (video?.mMediaPlayer as IjkMediaPlayer?)?.currentPosition ?: 0
// if (pos > 0) {
//// if (vm?.isVideo == true) {
//// binding.ivCover.visibility = View.GONE
//// }
// if (!isTouch) {
// binding.seekbar.progress = pos.toInt()// video.bufferPercentage
// }
// if (video?.isPlaying == true) {
// when (vm?.isVideo) {
// true -> {
// binding.ivPlay.visibility = View.GONE
// }
// false -> {
// binding.voicePlay.start()
// }
// }
// }
// }
if
(
videoView
!=
null
&&
!
isTouch
)
{
int
currentPosition
=
videoView
.
getCurrentPosition
();
seekBar
.
setProgress
(
currentPosition
);
}
}
});
}
private
void
stopTiming
()
{
if
(
disposable
!=
null
)
{
disposable
.
dispose
();
disposable
=
null
;
}
}
public
void
transformOutAnim
()
{
ObjectAnimator
animator1
=
ObjectAnimator
.
ofFloat
(
ivBack
,
"alpha"
,
1.0f
,
0.0f
);
animator1
.
setDuration
(
200
);
animator1
.
start
();
ObjectAnimator
animator2
=
ObjectAnimator
.
ofFloat
(
btnLL
,
"alpha"
,
1.0f
,
0.0f
);
animator2
.
setDuration
(
200
);
animator2
.
start
();
}
}
m-consultant/src/main/java/com/yidianling/consultant/preview/GPreviewActivity.java
View file @
fdcdb8bf
...
...
@@ -2,6 +2,7 @@ package com.yidianling.consultant.preview;
import
android.graphics.Color
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.fragment.app.Fragment
;
...
...
@@ -49,7 +50,6 @@ public class GPreviewActivity extends AppCompatActivity {
viewPager
.
setAdapter
(
adapter
);
viewPager
.
setCurrentItem
(
currentIndex
);
// viewPager.setOffscreenPageLimit(3);
viewPager
.
setOffscreenPageLimit
(
0
);
}
private
void
initData
()
{
...
...
@@ -126,15 +126,19 @@ public class GPreviewActivity extends AppCompatActivity {
isTransformOut
=
true
;
int
currentItem
=
viewPager
.
getCurrentItem
();
if
(
currentItem
<
imgUrls
.
size
())
{
BasePhotoFragment
fragment
=
fragments
.
get
(
currentItem
);
fragment
.
changeBg
(
Color
.
TRANSPARENT
);
fragment
.
transformOut
(
new
SmoothImageView
.
onTransformListener
()
{
@Override
public
void
onTransformCompleted
(
SmoothImageView
.
Status
status
)
{
getViewPager
().
setEnabled
(
true
);
exit
();
}
});
if
(
TextUtils
.
isEmpty
(
imgUrls
.
get
(
currentItem
).
getVideoUrl
())){
BasePhotoFragment
fragment
=
fragments
.
get
(
currentItem
);
fragment
.
changeBg
(
Color
.
TRANSPARENT
);
fragment
.
transformOut
(
new
SmoothImageView
.
onTransformListener
()
{
@Override
public
void
onTransformCompleted
(
SmoothImageView
.
Status
status
)
{
getViewPager
().
setEnabled
(
true
);
exit
();
}
});
}
else
{
exit
();
}
}
else
{
exit
();
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/preview/GridPreviewActivity.java
View file @
fdcdb8bf
...
...
@@ -70,7 +70,7 @@ public class GridPreviewActivity extends BaseActivity {
mThumbViewInfoList
.
add
(
new
UserViewInfo
(
urls
.
get
(
i
)));
}
mThumbViewInfoList
.
add
(
4
,
new
UserViewInfo
(
"https://pic.ydlcdn.com/
Qkkb6HmQiM.mp
4"
,
null
));
mThumbViewInfoList
.
add
(
4
,
new
UserViewInfo
(
"https://pic.ydlcdn.com/
GGyHyDwKJ8.MP
4"
,
null
));
adapter
=
new
MyListAdapter
();
gridView
.
setAdapter
(
adapter
);
gridView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/preview/SmoothImageView.java
View file @
fdcdb8bf
...
...
@@ -54,6 +54,7 @@ public class SmoothImageView extends PhotoView {
private
float
MAX_TRANS_SCALE
=
0.2f
;
private
boolean
isMaskPoint
=
false
;
private
View
btnLL
;
private
View
backIv
;
@Override
protected
void
onDetachedFromWindow
()
{
...
...
@@ -62,6 +63,7 @@ public class SmoothImageView extends PhotoView {
bitmapHeight
=
0
;
thumbRect
=
null
;
btnLL
=
null
;
backIv
=
null
;
ISFUll
=
false
;
if
(
animator
!=
null
)
{
animator
.
cancel
();
...
...
@@ -190,6 +192,9 @@ public class SmoothImageView extends PhotoView {
if
(
btnLL
!=
null
&&
btnLL
.
getVisibility
()
==
View
.
VISIBLE
)
{
btnLL
.
setVisibility
(
INVISIBLE
);
}
if
(
backIv
!=
null
&&
backIv
.
getVisibility
()
==
View
.
VISIBLE
)
{
backIv
.
setVisibility
(
INVISIBLE
);
}
if
(
alphaChangeListener
!=
null
)
{
alphaChangeListener
.
onAlphaChange
(
alpha
);
}
...
...
@@ -207,6 +212,10 @@ public class SmoothImageView extends PhotoView {
if
(
btnLL
!=
null
&&
btnLL
.
getVisibility
()
!=
View
.
VISIBLE
)
{
btnLL
.
setVisibility
(
VISIBLE
);
}
if
(
backIv
!=
null
&&
backIv
.
getVisibility
()
!=
View
.
VISIBLE
)
{
backIv
.
setVisibility
(
VISIBLE
);
}
}
else
{
changeTransform
();
setTag
(
R
.
id
.
consultant_item_image_key
,
true
);
...
...
@@ -484,6 +493,10 @@ public class SmoothImageView extends PhotoView {
this
.
btnLL
=
view
;
}
public
void
setBackIv
(
View
view
){
this
.
backIv
=
view
;
}
private
void
initTransform
()
{
if
(
getDrawable
()
==
null
)
{
return
;
...
...
m-consultant/src/main/java/com/yidianling/consultant/preview/TestImageLoader.java
View file @
fdcdb8bf
...
...
@@ -31,6 +31,11 @@ public class TestImageLoader implements IZoomMediaLoader {
simpleTarget
.
onResourceReady
();
imageView
.
setImageBitmap
(
resource
);
}
@Override
public
void
onLoadFailed
(
@Nullable
@org
.
jetbrains
.
annotations
.
Nullable
Drawable
errorDrawable
)
{
simpleTarget
.
onLoadFailed
(
errorDrawable
);
}
});
}
...
...
m-consultant/src/main/res/drawable-xxxhdpi/ic_video_play.png
0 → 100644
View file @
fdcdb8bf
3.61 KB
m-consultant/src/main/res/drawable/consultant_back.png
0 → 100644
View file @
fdcdb8bf
2.22 KB
m-consultant/src/main/res/drawable/consultant_bg_loading.xml
0 → 100644
View file @
fdcdb8bf
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/platform_dp_8"
/>
<solid
android:color=
"#40000000"
/>
</shape>
\ No newline at end of file
m-consultant/src/main/res/drawable/consultant_seekbar_style.xml
0 → 100644
View file @
fdcdb8bf
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
>
<selector>
<item
android:state_pressed=
"true"
>
<shape>
<corners
android:radius=
"4dp"
/>
<solid
android:color=
"#59FFFFFF"
/>
<stroke
android:width=
"1dp"
android:color=
"@color/transparent"
/>
</shape>
</item>
<item>
<shape>
<corners
android:radius=
"4dp"
/>
<solid
android:color=
"#59FFFFFF"
/>
<stroke
android:width=
"5dp"
android:color=
"@color/transparent"
/>
</shape>
</item>
</selector>
</item>
<item
android:id=
"@android:id/secondaryProgress"
>
<clip>
<shape>
<corners
android:radius=
"4dp"
/>
<solid
android:color=
"@color/white"
/>
</shape>
</clip>
</item>
<item
android:id=
"@android:id/progress"
>
<selector>
<item
android:state_pressed=
"true"
>
<clip>
<shape>
<corners
android:radius=
"4dp"
/>
<solid
android:color=
"@color/white"
/>
<stroke
android:width=
"1dp"
android:color=
"@color/transparent"
/>
</shape>
</clip>
</item>
<item>
<clip>
<shape>
<corners
android:radius=
"4dp"
/>
<solid
android:color=
"@color/white"
/>
<stroke
android:width=
"5dp"
android:color=
"@color/transparent"
/>
</shape>
</clip>
</item>
</selector>
</item>
</layer-list>
\ No newline at end of file
m-consultant/src/main/res/drawable/consultant_seekbar_thumb.xml
0 → 100644
View file @
fdcdb8bf
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@color/white"
/>
<size
android:width=
"6dp"
android:height=
"8dp"
/>
<corners
android:radius=
"2dp"
/>
</shape>
</item>
<item
android:state_pressed=
"false"
>
<shape
android:shape=
"oval"
>
<solid
android:color=
"@color/white"
/>
<size
android:width=
"8dp"
android:height=
"8dp"
/>
<stroke
android:width=
"2dp"
android:color=
"@color/transparent"
/>
</shape>
</item>
</selector>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_image_preview_photo.xml
View file @
fdcdb8bf
...
...
@@ -9,4 +9,5 @@
android:id=
"@+id/viewPager"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</FrameLayout>
m-consultant/src/main/res/layout/fragment_image_photo_layout.xml
View file @
fdcdb8bf
...
...
@@ -24,11 +24,44 @@
android:id=
"@+id/videoView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_centerInParent=
"true"
/>
android:focusableInTouchMode=
"true"
android:layout_centerInParent=
"true"
/>
<ImageView
android:id=
"@+id/ivImage"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<ImageView
android:id=
"@+id/ivPlay"
android:layout_width=
"76dp"
android:layout_height=
"76dp"
android:layout_centerInParent=
"true"
android:src=
"@drawable/ic_video_play"
android:visibility=
"gone"
/>
</RelativeLayout>
<SeekBar
android:id=
"@+id/seekbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_marginBottom=
"120dp"
android:maxHeight=
"10dp"
android:paddingStart=
"0dp"
android:paddingTop=
"8dp"
android:paddingEnd=
"0dp"
android:paddingBottom=
"8dp"
android:visibility=
"gone"
android:progressDrawable=
"@drawable/consultant_seekbar_style"
android:splitTrack=
"false"
android:thumb=
"@drawable/consultant_seekbar_thumb"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<LinearLayout
android:id=
"@+id/btnLL"
...
...
@@ -55,13 +88,32 @@
</LinearLayout>
<
ProgressBar
<
LinearLayout
android:id=
"@+id/loading"
style=
"@android:style/Widget.DeviceDefault.Light.ProgressBar"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_width=
"103dp"
android:layout_height=
"103dp"
android:layout_centerInParent=
"true"
android:visibility=
"visible"
/>
android:background=
"@drawable/consultant_bg_loading"
android:gravity=
"center"
android:orientation=
"vertical"
>
<ProgressBar
style=
"?android:attr/progressBarStyleSmall"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_10"
android:text=
"正在加载"
android:textColor=
"@color/white"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/btnVideo"
...
...
@@ -70,4 +122,18 @@
android:layout_centerInParent=
"true"
android:alpha=
"0"
android:visibility=
"gone"
/>
<ImageView
android:id=
"@+id/ivBack"
android:layout_width=
"36dp"
android:layout_height=
"36dp"
android:layout_marginLeft=
"12dp"
android:layout_marginTop=
"24dp"
android:padding=
"4dp"
android:scaleType=
"fitXY"
android:src=
"@drawable/consultant_back"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</RelativeLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment