opt ui
This commit is contained in:
@@ -2,8 +2,10 @@ package com.mogo.tanlu.fragment;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -39,6 +41,7 @@ import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.tanlu.video.VideoInitKt.initVideo;
|
||||
@@ -61,21 +64,28 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
//map
|
||||
private IMogoMarker mPoiMarker;
|
||||
// private int position = -1;
|
||||
private IMogoMarkerManager mMarkerManager;
|
||||
private IMogoMapService mMogoMapService;
|
||||
|
||||
//media
|
||||
private GSYVideoOptionBuilder gsyVideoOptionBuilder = new GSYVideoOptionBuilder();
|
||||
private String videoUrl = "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 mVideoUrl = "http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8";
|
||||
private String mImageUrl = "https://oimagec4.ydstatic.com/image?id=-5397300958976572132&product=adpublish&w=520&h=347";
|
||||
SimpleCoverVideoPlayer simpleCoverVideoPlayer;
|
||||
AutoZoomInImageView autoZoomInImageView;
|
||||
private IMogoImageloader mogoImageloader;
|
||||
private TextView mPreviousTv;
|
||||
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
|
||||
protected int getLayoutId() {
|
||||
@@ -89,21 +99,29 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
autoZoomInImageView = findViewById(R.id.tanlu_photo_imageView);
|
||||
mPreviousTv = findViewById(R.id.tv_previous_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);
|
||||
mNextTv.setOnClickListener(this);
|
||||
mEmptyTv.setOnClickListener(this);
|
||||
|
||||
simpleCoverVideoPlayer.setVisibility(View.VISIBLE);
|
||||
autoZoomInImageView.setVisibility(View.GONE);
|
||||
|
||||
//视频配置
|
||||
gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG)
|
||||
gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG)
|
||||
.build(simpleCoverVideoPlayer);
|
||||
// simpleCoverVideoPlayer.getStartButton().performClick();
|
||||
simpleCoverVideoPlayer.getStartButton().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
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();
|
||||
//地图marker
|
||||
mMogoMapService = (IMogoMapService) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_MAP).navigation(getActivity());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,17 +150,14 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
//判断是图片还是视频,第一个时,上一个不可点击
|
||||
simpleCoverVideoPlayer.setVisibility(View.VISIBLE);
|
||||
autoZoomInImageView.setVisibility(View.GONE);
|
||||
//视频配置
|
||||
gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG)
|
||||
gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG)
|
||||
.build(simpleCoverVideoPlayer);
|
||||
|
||||
} else if (id == R.id.tv_next_res) { //下一个
|
||||
//判断是图片还是视频,最后一个时,下一个不可点击
|
||||
//图片显示
|
||||
autoZoomInImageView.setVisibility(View.VISIBLE);
|
||||
simpleCoverVideoPlayer.setVisibility(View.GONE);
|
||||
// mogoImageloader.displayImage(imageUrl, autoZoomInImageView);
|
||||
mogoImageloader.downloadImage(getActivity(), imageUrl, new IMogoImageLoaderListener() {
|
||||
mogoImageloader.downloadImage(getActivity(), mImageUrl, new IMogoImageLoaderListener() {
|
||||
@Override
|
||||
public void onStart() {
|
||||
Logger.d(TAG, "onStart ------>");
|
||||
@@ -162,7 +176,8 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* marker点击事件 TODO
|
||||
* marker点击事件
|
||||
*
|
||||
* @param marker
|
||||
* @return
|
||||
@@ -192,23 +205,78 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
public boolean onMarkerClicked(IMogoMarker marker) {
|
||||
//点击marker以后,确认他的位置?然后点击下一个操作
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新单个数据,更新位置positon TODO
|
||||
* 刷新单个视频数据,更新位置positon
|
||||
*/
|
||||
// private void refreshSingleData() {
|
||||
// markerExploreWayList
|
||||
// }
|
||||
private void refreshVideoData(MarkerExploreWay markerExploreWay) {
|
||||
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
|
||||
@@ -218,23 +286,53 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
};
|
||||
}
|
||||
|
||||
//TODO C位事件,如何获取数据,需要有默认数据
|
||||
/**
|
||||
* C位事件,如何获取数据,需要有默认数据 TODO
|
||||
* 如果只有一个数据,不显示上下切换按钮,没有数据显示空页面
|
||||
*/
|
||||
@Override
|
||||
public void onPerform() {
|
||||
Logger.d(TAG, "tanlu卡片 有效 ---->");
|
||||
mMarkerManager = mMogoMapService.getMarkerManager(getActivity());
|
||||
List<IMogoMarker> markers = mMarkerManager.getMarkers("CARD_TYPE_ROAD_CODITION");
|
||||
for (int i = 0; i < markers.size(); i++) {
|
||||
markers.get(i).getObject();
|
||||
}
|
||||
if (markers != null && markers.size() > 0) {
|
||||
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
|
||||
public void onDisable() {
|
||||
Logger.e(TAG, "tanlu卡片 无效 ----->");
|
||||
Logger.d(TAG, "tanlu卡片 无效 ----->");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
import com.mogo.tanlu.R
|
||||
import com.mogo.tanlu.model.Informations
|
||||
import com.mogo.tanlu.util.HideControl
|
||||
import com.mogo.tanlu.util.formatDate
|
||||
import com.mogo.utils.logger.Logger
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
@@ -20,12 +21,12 @@ import java.util.*
|
||||
|
||||
class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
|
||||
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 PARAM_VIDEO_URL = "param_video_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) {
|
||||
@@ -37,22 +38,24 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
|
||||
// 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)
|
||||
intent.putExtra(PARAM_VIDEO_URL, videoUrl)
|
||||
intent.putExtra(PARAM_THUMB_URL, thumbnail)
|
||||
intent.putExtra(PARAM_ADDRESS, address)
|
||||
intent.putExtra(PARAM_TIME, generateTime)
|
||||
context.startActivity(intent)
|
||||
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 gsyVideoOptionBuilder = GSYVideoOptionBuilder()
|
||||
private var videoUrl: 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)
|
||||
thumbUrl = intent.getStringExtra(PARAM_THUMB_URL)
|
||||
|
||||
Logger.e("liyz", "videoUrl = $videoUrl --->thumbUrl = $thumbUrl")
|
||||
address = intent.getStringExtra(PARAM_ADDRESS)
|
||||
generateTime = intent.getLongExtra(PARAM_TIME, 0)
|
||||
Logger.d("liyz", "FullMediaActivityvideoUrl = $videoUrl --->thumbUrl = $thumbUrl")
|
||||
Logger.d("liyz", "FullMediaActivity address = $address --->generateTime = $generateTime")
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
@@ -86,7 +91,6 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
|
||||
//需要监听完成事件
|
||||
private fun setListener() {
|
||||
iv_media_back.setOnClickListener(this)
|
||||
|
||||
//重置timer
|
||||
video_view.addSingleClickListener(object :
|
||||
MediaCoverVideoPlayer.SingleClickListener {
|
||||
@@ -113,8 +117,8 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
|
||||
|
||||
|
||||
private fun updateInformation() {
|
||||
tv_media_title_content.text = "北京市"
|
||||
tv_media_title_time.text = "2020-1-6"
|
||||
tv_media_title_content.text = address
|
||||
tv_media_title_time.text = formatDate(generateTime)
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +128,6 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
|
||||
iv_media_back -> {
|
||||
handleBack()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,7 +139,6 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
|
||||
}
|
||||
|
||||
private fun handleBack() {
|
||||
Logger.d("liyz", "handleBack ------> finish ")
|
||||
finish()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,112 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="330dp"
|
||||
android:background="@drawable/shape_bg_222533_10px">
|
||||
|
||||
<!--顶部view-->
|
||||
<!--正常显示数据-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top_view"
|
||||
android:id="@+id/layout_data_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/tv_information_media_content"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible">
|
||||
<!--顶部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_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:textStyle="bold"
|
||||
android:textSize="18dp" />
|
||||
android:layout_below="@+id/media_layout"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="21dp">
|
||||
|
||||
<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:textStyle="bold"
|
||||
android:textSize="13dp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_previous_res"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:drawableLeft="@drawable/default_image"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="@string/tanlu_previous"
|
||||
android:textColor="@color/color_545362"
|
||||
android:textSize="13dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_information_media_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_below="@+id/tv_information_media_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="2019-10-10"
|
||||
android:textColor="@color/color_999999"
|
||||
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:drawableRight="@drawable/default_image"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/tanlu_next"
|
||||
android:textColor="@color/color_545362"
|
||||
android:textSize="13dp" />
|
||||
</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
|
||||
android:id="@+id/layout_empty_data_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="21dp"
|
||||
android:layout_below="@+id/media_layout">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
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
|
||||
android:id="@+id/tv_previous_res"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:drawableLeft="@drawable/default_image"
|
||||
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" />
|
||||
android:id="@+id/tv_main_empty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_main_empty"
|
||||
android:layout_marginTop="35dp"
|
||||
android:text="@string/main_empty_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user