add dimen

This commit is contained in:
lixiaopeng
2020-01-17 13:09:40 +08:00
parent f7690b5a57
commit b138580563
8 changed files with 145 additions and 65 deletions

View File

@@ -102,8 +102,7 @@ class FullMediaActivity : AppCompatActivity(), View.OnClickListener {
video_view.onCompletionListener(object :
MediaCoverVideoPlayer.CompletionListener {
override fun onCompletion() {
Log.d("liyz", "FullMediaActivity ---- onCompletion ");
GSYVideoManager.releaseAllVideos()
Log.d("liyz", "FullMediaActivity ----> onAutoCompletion ")
finish()
}
})

View File

@@ -111,6 +111,11 @@ class MediaCoverVideoPlayer : StandardGSYVideoPlayer {
override fun onAutoCompletion() {
super.onAutoCompletion()
mProgressBar.progress = 0
completionListener.let {
it.onCompletion()
}
Log.d("liyz", "MediaCoverVideoPlayer onAutoCompletion ------->")
}
@@ -138,14 +143,10 @@ class MediaCoverVideoPlayer : StandardGSYVideoPlayer {
}
/**
* 多次回调 TODO
* 多次回调
*/
override fun onCompletion() {
super.onCompletion()
Log.d("liyz", "MediaCoverVideoPlayer onCompletion --------->")
completionListener.let {
it.onCompletion()
}
}
@@ -161,9 +162,6 @@ class MediaCoverVideoPlayer : StandardGSYVideoPlayer {
}
}
mFullPauseBitmap = null
Log.d("liyz", "recycle.")
}
}

View File

@@ -19,17 +19,17 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout_media"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_132"
android:layout_height="@dimen/tanlu_module_full_top_height"
android:background="@color/color_191C25"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_media_back"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:layout_marginLeft="@dimen/dp_44"
android:layout_marginTop="@dimen/dp_36"
android:layout_width="@dimen/tanlu_module_full_back_width"
android:layout_height="@dimen/tanlu_module_full_back_height"
android:layout_marginLeft="@dimen/tanlu_module_full_margin_left"
android:layout_marginTop="@dimen/tanlu_module_full_margin_top"
android:clickable="true"
android:src="@drawable/public_arrow_back_iv"
app:layout_constraintLeft_toLeftOf="parent"
@@ -39,13 +39,13 @@
android:id="@+id/tv_media_title_content"
android:layout_width="@dimen/dp_660"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/tanlu_module_full_margin_top"
android:ellipsize="end"
android:gravity="center"
android:maxWidth="@dimen/dp_560"
android:maxLines="1"
android:textColor="@color/white"
android:textSize="@dimen/dp_38"
android:textSize="@dimen/tanlu_module_full_title_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@@ -54,11 +54,11 @@
android:id="@+id/tv_media_title_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_42"
android:layout_marginRight="@dimen/dp_100"
android:layout_marginTop="@dimen/tanlu_module_full_margin_top"
android:layout_marginRight="@dimen/tanlu_module_full_margin_right"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/dp_26"
android:textSize="@dimen/tanlu_module_full_title_time"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,8 +1,8 @@
<?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="@dimen/dp_660"
android:layout_height="@dimen/dp_660"
android:layout_width="@dimen/tanlu_module_card_width"
android:layout_height="@dimen/tanlu_module_card_width"
android:background="@drawable/tanlu_gradual_change_bg">
<!--正常显示数据-->
@@ -21,15 +21,15 @@
android:id="@+id/tv_information_media_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_24"
android:layout_marginTop="@dimen/dp_58"
android:layout_marginRight="@dimen/dp_24"
android:layout_marginLeft="@dimen/tanlu_module_card_margin_left"
android:layout_marginTop="@dimen/tanlu_module_card_address_margin_top"
android:layout_marginRight="@dimen/tanlu_module_card_margin_left"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:text="@string/main_empty_location"
android:textColor="@color/white"
android:textSize="@dimen/dp_34"
android:textSize="@dimen/tanlu_module_card_address_size"
android:textStyle="bold" />
<TextView
@@ -37,12 +37,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_information_media_content"
android:layout_marginLeft="@dimen/dp_24"
android:layout_marginTop="@dimen/dp_1"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/tanlu_module_card_margin_left"
android:layout_marginTop="@dimen/tanlu_module_card_distance_margin_top"
android:layout_marginBottom="@dimen/tanlu_module_card_distance_margin_bottom"
android:text="666KM"
android:textColor="@color/color_99FFFFFF"
android:textSize="@dimen/dp_26"
android:textSize="@dimen/tanlu_module_card_distance_size"
android:textStyle="bold" />
<TextView
@@ -52,20 +52,20 @@
android:layout_below="@+id/tv_information_media_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_24"
android:layout_marginRight="@dimen/tanlu_module_card_margin_left"
android:text="2019-10-10"
android:textColor="@color/color_99FFFFFF"
android:textSize="@dimen/dp_26" />
android:textSize="@dimen/tanlu_module_card_distance_size" />
</RelativeLayout>
<!--视频播放器和图片播放器-->
<RelativeLayout
android:id="@+id/media_layout"
android:layout_width="@dimen/dp_596"
android:layout_height="@dimen/dp_355"
android:layout_width="@dimen/tanlu_module_card_video_width"
android:layout_height="@dimen/tanlu_module_card_video_height"
android:layout_below="@+id/layout_top_view"
android:layout_marginLeft="@dimen/dp_24"
android:layout_marginRight="@dimen/dp_24"
android:layout_marginLeft="@dimen/tanlu_module_card_margin_left"
android:layout_marginRight="@dimen/tanlu_module_card_margin_left"
android:background="@drawable/shape_bg_222533_9px">
<com.mogo.module.tanlu.video.SimpleCoverVideoPlayer
@@ -85,14 +85,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/media_layout"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginLeft="@dimen/dp_24"
android:layout_marginRight="@dimen/dp_24">
android:layout_marginTop="@dimen/tanlu_module_card_video_marginbottom"
android:layout_marginLeft="@dimen/tanlu_module_card_margin_left"
android:layout_marginRight="@dimen/tanlu_module_card_margin_left">
<TextView
android:id="@+id/tv_previous_res"
android:layout_width="@dimen/dp_300"
android:layout_height="@dimen/dp_90"
android:layout_width="@dimen/tanlu_module_card_previous_width"
android:layout_height="@dimen/tanlu_module_card_previous_height"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/dp_40"
android:background="@drawable/shape_bg_222533"
@@ -101,12 +101,12 @@
android:drawablePadding="@dimen/dp_40"
android:text="@string/tanlu_previous"
android:textColor="@color/white"
android:textSize="@dimen/dp_28" />
android:textSize="@dimen/tanlu_module_card_next_size" />
<TextView
android:id="@+id/tv_next_res"
android:layout_width="@dimen/dp_300"
android:layout_height="@dimen/dp_90"
android:layout_width="@dimen/tanlu_module_card_previous_width"
android:layout_height="@dimen/tanlu_module_card_previous_height"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
@@ -117,7 +117,7 @@
android:gravity="center_vertical"
android:text="@string/tanlu_next"
android:textColor="@color/white"
android:textSize="@dimen/dp_28" />
android:textSize="@dimen/tanlu_module_card_next_size" />
</RelativeLayout>
</RelativeLayout>
@@ -125,7 +125,7 @@
<!--空数据显示-->
<RelativeLayout
android:id="@+id/layout_empty_data_show"
android:layout_width="@dimen/dp_660"
android:layout_width="@dimen/tanlu_module_card_width"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
@@ -135,7 +135,7 @@
android:id="@+id/iv_main_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_122"
android:layout_marginTop="@dimen/tanlu_module_card_empty_magintop"
android:src="@mipmap/main_view_empty_bg" />
<TextView
@@ -143,10 +143,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_main_empty"
android:layout_marginTop="@dimen/dp_70"
android:layout_marginTop="@dimen/tanlu_module_card_empty_tv_magintop"
android:text="@string/main_empty_content"
android:textColor="@color/white"
android:textSize="@dimen/dp_34" />
android:textSize="@dimen/tanlu_module_card_address_size" />
</RelativeLayout>
</RelativeLayout>

View File

@@ -33,11 +33,11 @@
<LinearLayout
android:id="@+id/layout_bottom"
android:layout_width="@dimen/dp_760"
android:layout_height="@dimen/dp_144"
android:layout_width="@dimen/tanlu_module_full_bottom_width"
android:layout_height="@dimen/tanlu_module_full_bottom_height"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginBottom="@dimen/tanlu_module_full_bottom_margin"
android:background="@drawable/shape_bg_99191c25_4px"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -60,21 +60,22 @@
android:id="@+id/fullscreen"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:visibility="gone"
android:scaleType="centerInside" />
</LinearLayout>
<ImageView
android:id="@+id/start"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:layout_width="@dimen/tanlu_module_full_start_width"
android:layout_height="@dimen/tanlu_module_full_start_height"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical" />
<ProgressBar
android:id="@+id/loading"
android:layout_width="@dimen/dp_96"
android:layout_height="@dimen/dp_96"
android:layout_width="@dimen/tanlu_module_full_loading_width"
android:layout_height="@dimen/tanlu_module_full_loading_height"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:indeterminateDrawable="@drawable/loading_bg"

View File

@@ -35,10 +35,10 @@
<LinearLayout
android:id="@+id/layout_bottom"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_72"
android:layout_height="@dimen/tanlu_module_bottom_height"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_5"
android:layout_marginBottom="@dimen/tanlu_module_bottom_margin"
android:background="@color/color_99191C25"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -67,16 +67,16 @@
<ImageView
android:id="@+id/start"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:layout_width="@dimen/tanlu_module_start_width"
android:layout_height="@dimen/tanlu_module_start_width"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical" />
<ProgressBar
android:id="@+id/loading"
android:layout_width="@dimen/dp_48"
android:layout_height="@dimen/dp_48"
android:layout_width="@dimen/tanlu_module_loading_width"
android:layout_height="@dimen/tanlu_module_loading_height"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:indeterminateDrawable="@drawable/loading_bg"

View File

@@ -1,4 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--bottom top -->
<dimen name="tanlu_module_start_width">60px</dimen>
<dimen name="tanlu_module_start_height">60px</dimen>
<dimen name="tanlu_module_loading_width">48px</dimen>
<dimen name="tanlu_module_loading_height">48px</dimen>
<dimen name="tanlu_module_bottom_height">72px</dimen>
<dimen name="tanlu_module_bottom_margin">5px</dimen>
<dimen name="tanlu_module_full_start_width">120px</dimen>
<dimen name="tanlu_module_full_start_height">120px</dimen>
<dimen name="tanlu_module_full_loading_width">96px</dimen>
<dimen name="tanlu_module_full_loading_height">96px</dimen>
<dimen name="tanlu_module_full_bottom_height">144px</dimen>
<dimen name="tanlu_module_full_bottom_width">760px</dimen>
<dimen name="tanlu_module_full_bottom_margin">10px</dimen>
<dimen name="tanlu_module_full_top_height">135px</dimen>
<dimen name="tanlu_module_full_back_width">60px</dimen>
<dimen name="tanlu_module_full_back_height">60px</dimen>
<dimen name="tanlu_module_full_margin_left">30px</dimen>
<dimen name="tanlu_module_full_margin_right">92px</dimen>
<dimen name="tanlu_module_full_margin_top">40px</dimen>
<dimen name="tanlu_module_card_width">660px</dimen>
<dimen name="tanlu_module_card_margin_left">24px</dimen>
<dimen name="tanlu_module_card_address_margin_top">58px</dimen>
<dimen name="tanlu_module_card_distance_margin_bottom">8px</dimen>
<dimen name="tanlu_module_card_distance_margin_top">2px</dimen>
<dimen name="tanlu_module_card_video_width">613px</dimen>
<dimen name="tanlu_module_card_video_height">355px</dimen>
<dimen name="tanlu_module_card_video_marginbottom">20px</dimen>
<dimen name="tanlu_module_card_previous_width">300px</dimen>
<dimen name="tanlu_module_card_previous_height">90px</dimen>
<dimen name="tanlu_module_card_empty_magintop">122px</dimen>
<dimen name="tanlu_module_card_empty_tv_magintop">70px</dimen>
<!--字体-->
<dimen name="tanlu_module_full_title_content">38px</dimen>
<dimen name="tanlu_module_full_title_time">26px</dimen>
<dimen name="tanlu_module_card_address_size">34px</dimen>
<dimen name="tanlu_module_card_distance_size">26px</dimen>
<dimen name="tanlu_module_card_next_size">28px</dimen>
</resources>

View File

@@ -1,9 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="tanlu_module_start_width">px</dimen>
<!--bottom top -->
<dimen name="tanlu_module_start_width">60px</dimen>
<dimen name="tanlu_module_start_height">60px</dimen>
<dimen name="tanlu_module_loading_width">48px</dimen>
<dimen name="tanlu_module_loading_height">48px</dimen>
<dimen name="tanlu_module_bottom_height">72px</dimen>
<dimen name="tanlu_module_bottom_margin">5px</dimen>
<dimen name="tanlu_module_666px">666px</dimen>
<dimen name="tanlu_module_full_start_width">120px</dimen>
<dimen name="tanlu_module_full_start_height">120px</dimen>
<dimen name="tanlu_module_full_loading_width">96px</dimen>
<dimen name="tanlu_module_full_loading_height">96px</dimen>
<dimen name="tanlu_module_full_bottom_height">144px</dimen>
<dimen name="tanlu_module_full_bottom_width">760px</dimen>
<dimen name="tanlu_module_full_bottom_margin">10px</dimen>
<dimen name="tanlu_module_full_top_height">135px</dimen>
<dimen name="tanlu_module_full_back_width">60px</dimen>
<dimen name="tanlu_module_full_back_height">60px</dimen>
<dimen name="tanlu_module_full_margin_left">30px</dimen>
<dimen name="tanlu_module_full_margin_right">92px</dimen>
<dimen name="tanlu_module_full_margin_top">40px</dimen>
<dimen name="tanlu_module_card_width">660px</dimen>
<dimen name="tanlu_module_card_margin_left">24px</dimen>
<dimen name="tanlu_module_card_address_margin_top">58px</dimen>
<dimen name="tanlu_module_card_distance_margin_bottom">8px</dimen>
<dimen name="tanlu_module_card_distance_margin_top">2px</dimen>
<dimen name="tanlu_module_card_video_width">613px</dimen>
<dimen name="tanlu_module_card_video_height">355px</dimen>
<dimen name="tanlu_module_card_video_marginbottom">20px</dimen>
<dimen name="tanlu_module_card_previous_width">300px</dimen>
<dimen name="tanlu_module_card_previous_height">90px</dimen>
<dimen name="tanlu_module_card_empty_magintop">122px</dimen>
<dimen name="tanlu_module_card_empty_tv_magintop">70px</dimen>
<!--字体-->
<dimen name="tanlu_module_full_title_content">38px</dimen>
<dimen name="tanlu_module_full_title_time">26px</dimen>
<dimen name="tanlu_module_card_address_size">34px</dimen>
<dimen name="tanlu_module_card_distance_size">26px</dimen>
<dimen name="tanlu_module_card_next_size">28px</dimen>
</resources>
</resources>