This commit is contained in:
lixiaopeng
2020-01-07 18:30:45 +08:00
parent 8c6cca4dec
commit aeb30c13d9
4 changed files with 289 additions and 135 deletions

View File

@@ -2,8 +2,10 @@ package com.mogo.tanlu.fragment;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.os.Bundle; import android.os.Bundle;
import android.text.Html;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@@ -39,6 +41,7 @@ import com.mogo.utils.TipToast;
import com.mogo.utils.logger.Logger; import com.mogo.utils.logger.Logger;
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder; import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.mogo.tanlu.video.VideoInitKt.initVideo; import static com.mogo.tanlu.video.VideoInitKt.initVideo;
@@ -61,21 +64,28 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
//map //map
private IMogoMarker mPoiMarker; private IMogoMarker mPoiMarker;
// private int position = -1;
private IMogoMarkerManager mMarkerManager; private IMogoMarkerManager mMarkerManager;
private IMogoMapService mMogoMapService; private IMogoMapService mMogoMapService;
//media //media
private GSYVideoOptionBuilder gsyVideoOptionBuilder = new GSYVideoOptionBuilder(); private GSYVideoOptionBuilder gsyVideoOptionBuilder = new GSYVideoOptionBuilder();
private String videoUrl = "http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8"; private String mVideoUrl = "http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8";
private String imageUrl = "https://oimagec4.ydstatic.com/image?id=-5397300958976572132&product=adpublish&w=520&h=347"; private String mImageUrl = "https://oimagec4.ydstatic.com/image?id=-5397300958976572132&product=adpublish&w=520&h=347";
SimpleCoverVideoPlayer simpleCoverVideoPlayer; SimpleCoverVideoPlayer simpleCoverVideoPlayer;
AutoZoomInImageView autoZoomInImageView; AutoZoomInImageView autoZoomInImageView;
private IMogoImageloader mogoImageloader; private IMogoImageloader mogoImageloader;
private TextView mPreviousTv; private TextView mPreviousTv;
private TextView mNextTv; private TextView mNextTv;
private RelativeLayout mRootLayout;
private RelativeLayout mEmptyLayout;
private TextView mEmptyTv;
private TextView mAddressTv;
private TextView mDistanceTv;
private TextView mTimeTv;
private List<MarkerExploreWay> markerExploreWayList = new ArrayList<>();
private int currentPosition = -1; //卡片媒体当前位置
private List<MarkerExploreWay> markerExploreWayList;
@Override @Override
protected int getLayoutId() { protected int getLayoutId() {
@@ -89,21 +99,29 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
autoZoomInImageView = findViewById(R.id.tanlu_photo_imageView); autoZoomInImageView = findViewById(R.id.tanlu_photo_imageView);
mPreviousTv = findViewById(R.id.tv_previous_res); mPreviousTv = findViewById(R.id.tv_previous_res);
mNextTv = findViewById(R.id.tv_next_res); mNextTv = findViewById(R.id.tv_next_res);
mRootLayout = findViewById(R.id.layout_data_show);
mEmptyLayout = findViewById(R.id.layout_empty_data_show);
mEmptyTv = findViewById(R.id.tv_main_empty);
mAddressTv = findViewById(R.id.tv_information_media_content);
mDistanceTv = findViewById(R.id.tv_distance_video);
mTimeTv = findViewById(R.id.tv_information_media_time);
mPreviousTv.setOnClickListener(this); mPreviousTv.setOnClickListener(this);
mNextTv.setOnClickListener(this); mNextTv.setOnClickListener(this);
mEmptyTv.setOnClickListener(this);
simpleCoverVideoPlayer.setVisibility(View.VISIBLE); simpleCoverVideoPlayer.setVisibility(View.VISIBLE);
autoZoomInImageView.setVisibility(View.GONE); autoZoomInImageView.setVisibility(View.GONE);
//视频配置 //视频配置
gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG) gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG)
.build(simpleCoverVideoPlayer); .build(simpleCoverVideoPlayer);
// simpleCoverVideoPlayer.getStartButton().performClick(); // simpleCoverVideoPlayer.getStartButton().performClick();
simpleCoverVideoPlayer.getStartButton().setOnClickListener(new View.OnClickListener() { simpleCoverVideoPlayer.getStartButton().setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
Logger.d(TAG, "simpleCoverVideoPlayer onClick -------> "); Logger.d(TAG, "simpleCoverVideoPlayer onClick -------> ");
FullMediaActivity.Companion.launch(getActivity(), videoUrl, "image"); FullMediaActivity.Companion.launch(getActivity(), mVideoUrl, "image", "东城区环球贸易中心", 1300000300);
} }
}); });
@@ -111,7 +129,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
mogoImageloader = (IMogoImageloader) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_IMAGE_LOADER).navigation(); mogoImageloader = (IMogoImageloader) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_IMAGE_LOADER).navigation();
//地图marker //地图marker
mMogoMapService = (IMogoMapService) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_MAP).navigation(getActivity()); mMogoMapService = (IMogoMapService) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_MAP).navigation(getActivity());
} }
@Override @Override
@@ -133,17 +150,14 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
//判断是图片还是视频,第一个时,上一个不可点击 //判断是图片还是视频,第一个时,上一个不可点击
simpleCoverVideoPlayer.setVisibility(View.VISIBLE); simpleCoverVideoPlayer.setVisibility(View.VISIBLE);
autoZoomInImageView.setVisibility(View.GONE); autoZoomInImageView.setVisibility(View.GONE);
//视频配置 gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG)
gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG)
.build(simpleCoverVideoPlayer); .build(simpleCoverVideoPlayer);
} else if (id == R.id.tv_next_res) { //下一个 } else if (id == R.id.tv_next_res) { //下一个
//判断是图片还是视频,最后一个时,下一个不可点击 //判断是图片还是视频,最后一个时,下一个不可点击
//图片显示
autoZoomInImageView.setVisibility(View.VISIBLE); autoZoomInImageView.setVisibility(View.VISIBLE);
simpleCoverVideoPlayer.setVisibility(View.GONE); simpleCoverVideoPlayer.setVisibility(View.GONE);
// mogoImageloader.displayImage(imageUrl, autoZoomInImageView); mogoImageloader.downloadImage(getActivity(), mImageUrl, new IMogoImageLoaderListener() {
mogoImageloader.downloadImage(getActivity(), imageUrl, new IMogoImageLoaderListener() {
@Override @Override
public void onStart() { public void onStart() {
Logger.d(TAG, "onStart ------>"); Logger.d(TAG, "onStart ------>");
@@ -162,7 +176,8 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
Logger.e(TAG, "onFailure -----E->" + e); Logger.e(TAG, "onFailure -----E->" + e);
} }
}); });
} else if (id == R.id.tv_main_empty) { //TODO 上报路况,逻辑
Logger.d(TAG, "tv_main_empty click -----> ");
} }
} }
@@ -178,12 +193,10 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
.startZoomInByScaleDeltaAndDuration(0.2f, 1000, 500); .startZoomInByScaleDeltaAndDuration(0.2f, 1000, 500);
} }
}); });
} }
/** /**
* marker点击事件 TODO * marker点击事件
* *
* @param marker * @param marker
* @return * @return
@@ -192,23 +205,78 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
public boolean onMarkerClicked(IMogoMarker marker) { public boolean onMarkerClicked(IMogoMarker marker) {
//点击marker以后确认他的位置然后点击下一个操作 //点击marker以后确认他的位置然后点击下一个操作
MarkerExploreWay exploreWay = (MarkerExploreWay) marker.getObject(); MarkerExploreWay exploreWay = (MarkerExploreWay) marker.getObject();
if (exploreWay != null && exploreWay.getFileType() != null) {
if (exploreWay.getFileType().equals("0")) { //图片
refreshPhotoData(exploreWay);
} else if (exploreWay.getFileType().equals("1")) { //视频
refreshVideoData(exploreWay);
}
} else {
Logger.e(TAG, "onMarkerClicked exploreWay == null ");
}
return true; return true;
} }
/** /**
* 刷新单个数据,更新位置positon TODO * 刷新单个视频数据,更新位置positon
*/ */
// private void refreshSingleData() { private void refreshVideoData(MarkerExploreWay markerExploreWay) {
// markerExploreWayList if (markerExploreWay.getItems() == null) {
// } return;
}
if (markerExploreWay.getItems().size() == 0) {
return;
}
String videoUrl = markerExploreWay.getItems().get(0).getUrl();
//判断是图片还是视频,第一个时,上一个不可点击
simpleCoverVideoPlayer.setVisibility(View.VISIBLE);
autoZoomInImageView.setVisibility(View.GONE);
//视频配置
gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG)
.build(simpleCoverVideoPlayer);
}
/** /**
* * 刷新单个图片数据
* @return
*/ */
// private void private void refreshPhotoData(MarkerExploreWay markerExploreWay) {
if (markerExploreWay.getItems() == null) {
return;
}
if (markerExploreWay.getItems().size() == 0) {
return;
}
String thumbnailUrl = markerExploreWay.getItems().get(0).getThumbnail();
Logger.d(TAG, "refreshPhotoData thumbnailUrl ------>" + thumbnailUrl);
autoZoomInImageView.setVisibility(View.VISIBLE);
simpleCoverVideoPlayer.setVisibility(View.GONE);
mogoImageloader.downloadImage(getActivity(), thumbnailUrl, new IMogoImageLoaderListener() {
@Override
public void onStart() {
Logger.d(TAG, "onStart ------>");
}
@Override
public void onCompleted(Bitmap bitmap) {
Logger.d(TAG, "onCompleted ------>");
autoZoomInImageView.setImageBitmap(bitmap);
//动画
handleImageAnimation();
}
@Override
public void onFailure(Exception e) {
Logger.e(TAG, "onFailure -----E->" + e);
}
});
}
@NonNull @NonNull
@@ -218,23 +286,53 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
}; };
} }
//TODO C位事件,如何获取数据,需要有默认数据 /**
* C位事件,如何获取数据,需要有默认数据 TODO
* 如果只有一个数据,不显示上下切换按钮,没有数据显示空页面
*/
@Override @Override
public void onPerform() { public void onPerform() {
Logger.d(TAG, "tanlu卡片 有效 ---->"); Logger.d(TAG, "tanlu卡片 有效 ---->");
mMarkerManager = mMogoMapService.getMarkerManager(getActivity()); mMarkerManager = mMogoMapService.getMarkerManager(getActivity());
List<IMogoMarker> markers = mMarkerManager.getMarkers("CARD_TYPE_ROAD_CODITION"); List<IMogoMarker> markers = mMarkerManager.getMarkers("CARD_TYPE_ROAD_CODITION");
for (int i = 0; i < markers.size(); i++) { if (markers != null && markers.size() > 0) {
markers.get(i).getObject(); mEmptyLayout.setVisibility(View.GONE);
} mRootLayout.setVisibility(View.VISIBLE);
Logger.d(TAG, "onPerform markers.size() =" + markers.size());
for (int i = 0; i < markers.size(); i++) {
markerExploreWayList.add((MarkerExploreWay) markers.get(i).getObject());
}
if (markers.size() == 1) {
mPreviousTv.setVisibility(View.GONE);
mNextTv.setVisibility(View.GONE);
} else {
mPreviousTv.setVisibility(View.VISIBLE);
mNextTv.setVisibility(View.VISIBLE);
}
//展示第一个数据
MarkerExploreWay markerExploreWay = markerExploreWayList.get(0);
if (markerExploreWay != null && markerExploreWay.getFileType() != null) {
if (markerExploreWay.getFileType().equals("0")) { //图片
refreshPhotoData(markerExploreWay);
} else if (markerExploreWay.getFileType().equals("1")) { //视频
refreshVideoData(markerExploreWay);
}
}
} else {
mEmptyLayout.setVisibility(View.VISIBLE);
mRootLayout.setVisibility(View.GONE);
mEmptyTv.setText(Html.fromHtml(getContext().getString(R.string.main_empty_content)));
}
} }
/**
//TODO 离开C位事件 * 离开C位事件
*/
@Override @Override
public void onDisable() { public void onDisable() {
Logger.e(TAG, "tanlu卡片 无效 ----->"); Logger.d(TAG, "tanlu卡片 无效 ----->");
} }
@Override @Override

View File

@@ -0,0 +1,17 @@
package com.mogo.tanlu.util
import android.text.format.DateFormat
const val format = "yy/MM/dd kk:mm:ss"
fun formatDate(time: Long): String {
return DateFormat.format(format, time).toString()
}
fun convertVar(param: Any?): Any? {
return if (param is String) {
"\"$param\""
} else {
param
}
}

View File

@@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity
import com.mogo.tanlu.R import com.mogo.tanlu.R
import com.mogo.tanlu.model.Informations import com.mogo.tanlu.model.Informations
import com.mogo.tanlu.util.HideControl import com.mogo.tanlu.util.HideControl
import com.mogo.tanlu.util.formatDate
import com.mogo.utils.logger.Logger import com.mogo.utils.logger.Logger
import com.shuyu.gsyvideoplayer.GSYVideoManager import com.shuyu.gsyvideoplayer.GSYVideoManager
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
@@ -20,12 +21,12 @@ import java.util.*
class FullMediaActivity : AppCompatActivity(), View.OnClickListener { class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
companion object { companion object {
const val PARAM_MEDIA_DATA = "PARAM_MEDIA_DATA"
const val PARAM_MEDIA_POSITION_CALLBACK = "PARAM_MEDIA_POSITION_CALLBACK"
const val TAG = "FullMediaActivity" const val TAG = "FullMediaActivity"
const val PARAM_VIDEO_URL = "param_video_url" const val PARAM_VIDEO_URL = "param_video_url"
const val PARAM_THUMB_URL = "param_thumb_url" const val PARAM_THUMB_URL = "param_thumb_url"
const val PARAM_ADDRESS = "param_address"
const val PARAM_TIME = "generate_time"
// fun launch(context: Activity, strategyInfo: List<Informations>, position: Int) { // fun launch(context: Activity, strategyInfo: List<Informations>, position: Int) {
@@ -37,22 +38,24 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
// context.overridePendingTransition(0, 0) // context.overridePendingTransition(0, 0)
// } // }
fun launch(context: Activity, videoUrl: String, thumbnail: String) { fun launch(context: Activity, videoUrl: String, thumbnail: String, address: String, generateTime: Long) {
val intent = Intent(context, FullMediaActivity::class.java) val intent = Intent(context, FullMediaActivity::class.java)
intent.putExtra(PARAM_VIDEO_URL, videoUrl) intent.putExtra(PARAM_VIDEO_URL, videoUrl)
intent.putExtra(PARAM_THUMB_URL, thumbnail) intent.putExtra(PARAM_THUMB_URL, thumbnail)
intent.putExtra(PARAM_ADDRESS, address)
intent.putExtra(PARAM_TIME, generateTime)
context.startActivity(intent) context.startActivity(intent)
context.overridePendingTransition(0, 0) context.overridePendingTransition(0, 0)
} }
} }
private var strategyInfo: ArrayList<Informations> = arrayListOf()
private var currentImgPosition: Int = 0
private var currentPosition: Int = 50
private var control = HideControl() private var control = HideControl()
private var gsyVideoOptionBuilder = GSYVideoOptionBuilder() private var gsyVideoOptionBuilder = GSYVideoOptionBuilder()
private var videoUrl: String? = null private var videoUrl: String? = null
private var thumbUrl: String? = null private var thumbUrl: String? = null
private var address: String? = null
private var generateTime: Long = 0
@@ -68,8 +71,10 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
videoUrl = intent.getStringExtra(PARAM_VIDEO_URL) videoUrl = intent.getStringExtra(PARAM_VIDEO_URL)
thumbUrl = intent.getStringExtra(PARAM_THUMB_URL) thumbUrl = intent.getStringExtra(PARAM_THUMB_URL)
address = intent.getStringExtra(PARAM_ADDRESS)
Logger.e("liyz", "videoUrl = $videoUrl --->thumbUrl = $thumbUrl") generateTime = intent.getLongExtra(PARAM_TIME, 0)
Logger.d("liyz", "FullMediaActivityvideoUrl = $videoUrl --->thumbUrl = $thumbUrl")
Logger.d("liyz", "FullMediaActivity address = $address --->generateTime = $generateTime")
} }
override fun onResume() { override fun onResume() {
@@ -86,7 +91,6 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
//需要监听完成事件 //需要监听完成事件
private fun setListener() { private fun setListener() {
iv_media_back.setOnClickListener(this) iv_media_back.setOnClickListener(this)
//重置timer //重置timer
video_view.addSingleClickListener(object : video_view.addSingleClickListener(object :
MediaCoverVideoPlayer.SingleClickListener { MediaCoverVideoPlayer.SingleClickListener {
@@ -113,8 +117,8 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
private fun updateInformation() { private fun updateInformation() {
tv_media_title_content.text = "北京市" tv_media_title_content.text = address
tv_media_title_time.text = "2020-1-6" tv_media_title_time.text = formatDate(generateTime)
} }
@@ -124,7 +128,6 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
iv_media_back -> { iv_media_back -> {
handleBack() handleBack()
} }
} }
} }
} }
@@ -136,7 +139,6 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
} }
private fun handleBack() { private fun handleBack() {
Logger.d("liyz", "handleBack ------> finish ")
finish() finish()
} }

View File

@@ -1,112 +1,149 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="330dp" android:layout_width="330dp"
android:layout_height="330dp" android:layout_height="330dp"
android:background="@drawable/shape_bg_222533_10px"> android:background="@drawable/shape_bg_222533_10px">
<!--顶部view--> <!--正常显示数据-->
<RelativeLayout <RelativeLayout
android:id="@+id/layout_top_view" android:id="@+id/layout_data_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent"
<TextView android:visibility="visible">
android:id="@+id/tv_information_media_content" <!--顶部view-->
<RelativeLayout
android:id="@+id/layout_top_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_information_media_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="25dp"
android:layout_marginRight="16dp"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:text="@string/main_empty_location"
android:textColor="@color/color_3"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_distance_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_information_media_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="5dp"
android:text="666KM"
android:textColor="@color/color_666666"
android:textSize="13dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_information_media_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_information_media_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"
android:text="2019-10-10"
android:textColor="@color/color_999999"
android:textSize="13dp" />
</RelativeLayout>
<!--视频播放器和图片播放器-->
<RelativeLayout
android:id="@+id/media_layout"
android:layout_width="298dp"
android:layout_height="177dp"
android:layout_below="@+id/layout_top_view"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@drawable/shape_bg_222533_9px">
<com.mogo.tanlu.video.SimpleCoverVideoPlayer
android:id="@+id/video_player_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<com.mogo.tanlu.view.AutoZoomInImageView
android:id="@+id/tanlu_photo_imageView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<!--底部view-->
<RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="16dp" android:layout_below="@+id/media_layout"
android:layout_marginTop="25dp" android:layout_marginTop="10dp"
android:layout_marginRight="16dp" android:layout_marginBottom="21dp">
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:text="@string/main_empty_location"
android:textColor="@color/color_3"
android:textStyle="bold"
android:textSize="18dp" />
<TextView <TextView
android:id="@+id/tv_distance_video" android:id="@+id/tv_previous_res"
android:layout_width="wrap_content" android:layout_width="142dp"
android:layout_height="wrap_content" android:layout_height="45dp"
android:layout_below="@+id/tv_information_media_content" android:layout_centerVertical="true"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginTop="2dp" android:background="@drawable/shape_bg_222533"
android:layout_marginBottom="5dp" android:drawableLeft="@drawable/default_image"
android:text="666KM" android:gravity="center_vertical|center_horizontal"
android:textColor="@color/color_666666" android:text="@string/tanlu_previous"
android:textStyle="bold" android:textColor="@color/color_545362"
android:textSize="13dp" /> android:textSize="13dp" />
<TextView <TextView
android:id="@+id/tv_information_media_time" android:id="@+id/tv_next_res"
android:layout_width="wrap_content" android:layout_width="142dp"
android:layout_height="wrap_content" android:layout_height="45dp"
android:layout_marginRight="16dp" android:layout_alignParentRight="true"
android:layout_below="@+id/tv_information_media_content" android:layout_centerVertical="true"
android:layout_alignParentRight="true" android:layout_marginRight="16dp"
android:layout_centerVertical="true" android:background="@drawable/shape_bg_222533"
android:text="2019-10-10" android:drawableRight="@drawable/default_image"
android:textColor="@color/color_999999" android:gravity="center_vertical|center_horizontal"
android:textSize="13dp" /> android:paddingRight="10dp"
android:text="@string/tanlu_next"
android:textColor="@color/color_545362"
android:textSize="13dp" />
</RelativeLayout>
</RelativeLayout> </RelativeLayout>
<!--视频播放器和图片播放器-->
<RelativeLayout <!--空数据显示-->
android:id="@+id/media_layout"
android:layout_width="298dp"
android:layout_height="177dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@drawable/shape_bg_222533_9px"
android:layout_below="@+id/layout_top_view">
<com.mogo.tanlu.video.SimpleCoverVideoPlayer
android:id="@+id/video_player_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<com.mogo.tanlu.view.AutoZoomInImageView
android:id="@+id/tanlu_photo_imageView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<!--底部view-->
<RelativeLayout <RelativeLayout
android:id="@+id/layout_empty_data_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginTop="10dp" android:layout_centerHorizontal="true"
android:layout_marginBottom="21dp" android:gravity="center_horizontal"
android:layout_below="@+id/media_layout"> android:visibility="gone">
<ImageView
android:id="@+id/iv_main_empty"
android:layout_width="210dp"
android:layout_height="210dp"
android:layout_marginTop="10dp"
android:src="@mipmap/main_view_empty_bg" />
<TextView <TextView
android:id="@+id/tv_previous_res" android:id="@+id/tv_main_empty"
android:layout_width="142dp" android:layout_width="wrap_content"
android:layout_height="45dp" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_below="@+id/iv_main_empty"
android:layout_marginLeft="16dp" android:layout_marginTop="35dp"
android:background="@drawable/shape_bg_222533" android:text="@string/main_empty_content"
android:gravity="center_vertical|center_horizontal" android:textColor="@color/white"
android:drawableLeft="@drawable/default_image" android:textSize="16dp" />
android:text="@string/tanlu_previous"
android:textColor="@color/color_545362"
android:textSize="13dp" />
<TextView
android:id="@+id/tv_next_res"
android:layout_width="142dp"
android:layout_height="45dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"
android:background="@drawable/shape_bg_222533"
android:gravity="center_vertical|center_horizontal"
android:drawableRight="@drawable/default_image"
android:text="@string/tanlu_next"
android:paddingRight="10dp"
android:textColor="@color/color_545362"
android:textSize="13dp" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>