新增个播小时榜入口,个播UI细节优化
This commit is contained in:
@@ -3,9 +3,12 @@ package com.yizhuan.erban.avroom.fragment
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.avroom.adapter.OnMicroItemClickListener
|
||||
import com.yizhuan.erban.avroom.adapter.SingleAnchorMicroViewAdapter
|
||||
@@ -114,6 +117,10 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
updateFansTeamInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
gameBinding.tvHourRank.setOnClickListener {
|
||||
DialogWebViewActivity.start(mContext, UriProvider.getSingleRoomHourRankUrl())
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@@ -271,9 +278,15 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
if (AvRoomDataManager.get().isOpenAnotherPKMode && gameBinding.microView.adapter !is SingleRoomPKMicroViewAdapter) {
|
||||
gameBinding.microView.bindAdapter(SingleRoomPKMicroViewAdapter(context))
|
||||
gameBinding.viewPkBoard.isVisible = true
|
||||
gameBinding.microView.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||
topMargin = ScreenUtil.dip2px(140f)
|
||||
}
|
||||
} else if (!AvRoomDataManager.get().isOpenAnotherPKMode && gameBinding.microView.adapter !is SingleAnchorMicroViewAdapter) {
|
||||
gameBinding.microView.bindAdapter(SingleAnchorMicroViewAdapter(context))
|
||||
gameBinding.viewPkBoard.isVisible = false
|
||||
gameBinding.microView.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||
topMargin = ScreenUtil.dip2px(120f)
|
||||
}
|
||||
} else {
|
||||
gameBinding.microView.adapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/ic_single_room_rank.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_single_room_rank.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 577 B |
BIN
app/src/main/res/drawable-xhdpi/icon_single_room_gift_value.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/icon_single_room_gift_value.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 631 B |
@@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#59ffffff" />
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#FFFE4EB4"
|
||||
|
17
app/src/main/res/drawable/bg_single_room_rank_entrance.xml
Normal file
17
app/src/main/res/drawable/bg_single_room_rank_entrance.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#ff322bff"
|
||||
android:startColor="#ff49acff"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="100dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="100dp"
|
||||
android:topRightRadius="0dp" />
|
||||
|
||||
</shape>
|
@@ -1,7 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="11dp"
|
||||
android:bottomRightRadius="11dp"
|
||||
android:topLeftRadius="11dp"
|
||||
android:topRightRadius="4dp" />
|
||||
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#FF8BB2"
|
||||
|
@@ -31,7 +31,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_ktv_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{(ktvModel || roomInfo.type==5) ? View.VISIBLE : View.GONE}">
|
||||
@@ -39,7 +39,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/iv_ktv_contribute_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@drawable/bg_contribute_entrance"
|
||||
android:gravity="center"
|
||||
@@ -233,9 +233,8 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/contribute_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_alignTop="@id/micro_view"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/bg_contribute_entrance"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
|
@@ -33,7 +33,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/contribute_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="75dp"
|
||||
android:background="@drawable/bg_contribute_entrance"
|
||||
android:gravity="center"
|
||||
|
@@ -44,7 +44,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/contribute_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="75dp"
|
||||
android:background="@drawable/bg_contribute_entrance"
|
||||
android:gravity="center"
|
||||
@@ -95,7 +95,7 @@
|
||||
android:paddingEnd="30dp"
|
||||
android:text="加入我的粉丝团吧~"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
android:textSize="12dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="37dp"
|
||||
@@ -109,7 +109,7 @@
|
||||
android:id="@+id/tv_fans_team_opt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/bg_fans_team_entrance"
|
||||
android:drawableEnd="@drawable/fans_team_ic_room_love"
|
||||
android:drawablePadding="5dp"
|
||||
@@ -118,22 +118,41 @@
|
||||
android:paddingEnd="8dp"
|
||||
android:text="该主播暂未开通粉丝团"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
android:textSize="12dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hour_rank"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/bg_single_room_rank_entrance"
|
||||
android:drawableStart="@drawable/ic_single_room_rank"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:text="小时榜"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/fl_fans_team" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_single_room_gift_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/shape_bg_of_mic_charm_single_anchor"
|
||||
android:drawableEnd="@drawable/icon_gift_value"
|
||||
android:drawableStart="@drawable/icon_single_room_gift_value"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone"
|
||||
|
@@ -117,7 +117,7 @@ public class MusicPlayerView extends FrameLayout implements View.OnClickListener
|
||||
ObjectAnimator objectAnimatorFlag = ObjectAnimator.ofFloat(
|
||||
musicFlagLayout,
|
||||
"translationX",
|
||||
UIUtil.dip2px(getContext(), 59 + 20),
|
||||
UIUtil.dip2px(getContext(), 76),
|
||||
0)
|
||||
.setDuration(150);
|
||||
objectAnimatorFlag.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
@@ -137,7 +137,7 @@ public class MusicPlayerView extends FrameLayout implements View.OnClickListener
|
||||
musicFlagLayout,
|
||||
"translationX",
|
||||
0,
|
||||
UIUtil.dip2px(getContext(), 59 + 20))
|
||||
UIUtil.dip2px(getContext(), 76))
|
||||
.setDuration(150);
|
||||
objectAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
objectAnimator.start();
|
||||
|
@@ -6,10 +6,9 @@
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/music_flag_layout"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/bg_room_music_player"
|
||||
tools:visibility="visible">
|
||||
|
||||
@@ -18,7 +17,7 @@
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:src="@drawable/icon_music_flag" />
|
||||
|
||||
@@ -30,7 +29,7 @@
|
||||
android:lines="1"
|
||||
android:text="播放音乐"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
android:textSize="12dp" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
@@ -450,4 +450,11 @@ public class UriProvider {
|
||||
return JAVA_WEB_URL.concat("/yinyou/modules/fans_club/rule.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 个播小时榜
|
||||
*/
|
||||
public static String getSingleRoomHourRankUrl() {
|
||||
return JAVA_WEB_URL.concat("/yinyou/modules/room_rank/hourRank.html");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user