去掉不必要ui

This commit is contained in:
renhaoting 2025-12-04 18:16:10 +08:00
parent f4b10782f0
commit fb1c6011e0
2 changed files with 13 additions and 47 deletions

View File

@ -56,6 +56,8 @@ class HomeItemFragment : AppViewsEmptyViewModelFragment<ViewBinding>() {
tvVideoFrom.text = mVideoData?.channel_title
tvVideoIntro.text = mVideoData?.description
ivIntroExpand.isVisible = tvVideoIntro.lineCount > 2
popMenu.setMenuList(
mutableListOf(
@ -90,10 +92,7 @@ class HomeItemFragment : AppViewsEmptyViewModelFragment<ViewBinding>() {
override fun ViewBinding.initListeners() {
ivStar.setOnClickListener {
mIsStared = !mIsStared
ivStar.setImageResource(if (mIsStared) R.mipmap.home_star else R.mipmap.home_star_undo)
}
}
@ -180,6 +179,8 @@ class HomeItemFragment : AppViewsEmptyViewModelFragment<ViewBinding>() {
private fun togglePlayingState(isPlaying: Boolean) {
if (mIsPlaying != isPlaying) {
mIsPlaying = isPlaying
binding?.ivMask?.isVisible = !mIsPlaying
if (mIsPlaying) {
hidePlayIconAnim()
} else {

View File

@ -10,6 +10,13 @@
android:layout_height="match_parent"
android:layout_gravity="center"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_mask"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:layout_gravity="center"/>
<View
android:id="@+id/mask_view"
android:layout_width="match_parent"
@ -70,6 +77,7 @@
android:paddingVertical="5dp"
android:layout_gravity="right|bottom"
android:src="@mipmap/arrow_up"
android:visibility="gone"
/>
</FrameLayout>
</LinearLayout>
@ -84,49 +92,6 @@
android:layout_marginTop="20dp"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_marginBottom="100dp"
android:layout_marginRight="20dp"
android:gravity="center_horizontal"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageView
android:id="@+id/iv_star"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/home_star_undo"
/>
<TextView
android:id="@+id/tv_star_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="999"
android:textSize="12sp"
android:textStyle="bold"
android:textColor="@color/white" />
</LinearLayout>
<ImageView
android:id="@+id/iv_share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/home_share"
android:layout_marginTop="20dp"
/>
</LinearLayout>
<com.ama.core.architecture.widget.CustomProgressBar
android:id="@+id/progress_bar_player"
android:layout_width="match_parent"