调整播放时间计算
This commit is contained in:
parent
34a8637c9e
commit
0dc4f5b99b
@ -337,6 +337,12 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<LiveOpenTipsBean> data) {
|
public void onSuccess(List<LiveOpenTipsBean> data) {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
if(data.size() == 0){
|
||||||
|
findViewById(R.id.tips).setVisibility(View.GONE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Log.i("LiveOpenTipsBean",data.toString());
|
||||||
|
findViewById(R.id.tips).setVisibility(View.VISIBLE);
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16));
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16));
|
||||||
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
|
@ -983,6 +983,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
sud_layout_name.post(new Runnable() {
|
sud_layout_name.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
//TODO 这里报了类型错误
|
||||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) sud_layout_name.getLayoutParams();
|
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) sud_layout_name.getLayoutParams();
|
||||||
params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(85);
|
params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(85);
|
||||||
sud_layout_name.setLayoutParams(params1);
|
sud_layout_name.setLayoutParams(params1);
|
||||||
@ -3016,7 +3017,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mRedVal.setVisibility(View.GONE);
|
mRedVal.setVisibility(View.GONE);
|
||||||
mBlueVal.setVisibility(View.GONE);
|
mBlueVal.setVisibility(View.GONE);
|
||||||
mPkRankTopIcon.setVisibility(View.GONE);
|
mPkRankTopIcon.setVisibility(View.GONE);
|
||||||
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_ico);
|
// mAnchorLayout.setBackgroundResource(R.drawable.bg_live_ico);
|
||||||
mGoodNumberIcon.setVisibility(View.GONE);
|
mGoodNumberIcon.setVisibility(View.GONE);
|
||||||
mAnchorSay.setVisibility(View.INVISIBLE);
|
mAnchorSay.setVisibility(View.INVISIBLE);
|
||||||
showAnchorSayAndCallAnchor();
|
showAnchorSayAndCallAnchor();
|
||||||
@ -3527,29 +3528,29 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
if (flipper.getChildCount() > 0) {
|
if (flipper.getChildCount() > 0) {
|
||||||
flipper.removeAllViews();
|
flipper.removeAllViews();
|
||||||
}
|
}
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16));
|
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16));
|
||||||
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
// LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
textParams.leftMargin = DpUtil.dp2px(5);
|
// textParams.leftMargin = DpUtil.dp2px(5);
|
||||||
params.leftMargin = DpUtil.dp2px(5);
|
// params.leftMargin = DpUtil.dp2px(5);
|
||||||
API.get().pdLiveApi(mContext).getHourChartRank(mLiveUid).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(listResponseModel -> {
|
API.get().pdLiveApi(mContext).getHourChartRank(mLiveUid).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(listResponseModel -> {
|
||||||
List<HourRank> info = listResponseModel.getData().getInfo();
|
List<HourRank> info = listResponseModel.getData().getInfo();
|
||||||
if (!info.isEmpty()) {
|
if (!info.isEmpty()) {
|
||||||
View hotView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null);
|
View hotView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list2, null);
|
||||||
View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null);
|
View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list2, null);
|
||||||
ImageView hotPic = hotView.findViewById(R.id.wish_pic);
|
ImageView hotPic = hotView.findViewById(R.id.wish_pic);
|
||||||
ImageView hourPic = hourView.findViewById(R.id.wish_pic);
|
ImageView hourPic = hourView.findViewById(R.id.wish_pic);
|
||||||
mHotText = hotView.findViewById(R.id.wish_index);
|
mHotText = hotView.findViewById(R.id.wish_index);
|
||||||
mHourRank = hourView.findViewById(R.id.wish_index);
|
mHourRank = hourView.findViewById(R.id.wish_index);
|
||||||
mHotText.setText("0");
|
mHotText.setText("0");
|
||||||
mHotText.setLayoutParams(textParams);
|
// mHotText.setLayoutParams(textParams);
|
||||||
mHourRank.setLayoutParams(textParams);
|
// mHourRank.setLayoutParams(textParams);
|
||||||
mHotText.setGravity(Gravity.CENTER);
|
mHotText.setGravity(Gravity.CENTER);
|
||||||
mHourRank.setGravity(Gravity.CENTER);
|
mHourRank.setGravity(Gravity.CENTER);
|
||||||
setHourRankData(info.get(0).getRank());
|
setHourRankData(info.get(0).getRank());
|
||||||
hotPic.setImageResource(R.mipmap.ic_live_hour_rank);
|
hotPic.setImageResource(R.mipmap.ic_live_hour_rank);
|
||||||
hourPic.setImageResource(R.drawable.icon_heat_new);
|
hourPic.setImageResource(R.mipmap.ic_live_hot_rank);
|
||||||
hotPic.setLayoutParams(params);
|
// hotPic.setLayoutParams(params);
|
||||||
hourPic.setLayoutParams(params);
|
// hourPic.setLayoutParams(params);
|
||||||
flipper.addView(hotView);
|
flipper.addView(hotView);
|
||||||
flipper.addView(hourView);
|
flipper.addView(hourView);
|
||||||
flipper.startFlipping();
|
flipper.startFlipping();
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:surface_type="texture_view"
|
app:surface_type="texture_view"
|
||||||
app:use_controller="false" />
|
app:use_controller="false"
|
||||||
|
tools:visibility="visible"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -48,7 +49,7 @@
|
|||||||
android:id="@+id/pk_container"
|
android:id="@+id/pk_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="280dp"
|
android:layout_height="280dp"
|
||||||
android:layout_marginTop="165dp">
|
android:layout_marginTop="@dimen/live_top">
|
||||||
|
|
||||||
<com.yunbao.live.custom.MyFrameLayout4
|
<com.yunbao.live.custom.MyFrameLayout4
|
||||||
android:id="@+id/left_container"
|
android:id="@+id/left_container"
|
||||||
@ -64,13 +65,16 @@
|
|||||||
android:layout_marginBottom="20dp" />
|
android:layout_marginBottom="20dp" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/dr_pk_view"
|
android:id="@+id/dr_pk_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="280dp"
|
android:layout_height="280dp"
|
||||||
android:layout_marginTop="165dp"
|
android:layout_marginTop="@dimen/live_top"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility="gone">
|
android:visibility="gone"
|
||||||
|
tools:visibility="gone">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintWidth_percent="0.33"
|
app:layout_constraintWidth_percent="0.33"
|
||||||
tools:background="@drawable/bg_live_item_an" />
|
android:background="@drawable/bg_live_item_an" />
|
||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
@ -1773,11 +1773,12 @@
|
|||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<!--女神说 -->
|
||||||
<include
|
<include
|
||||||
android:id="@+id/anchor_say_layout"
|
android:id="@+id/anchor_say_layout"
|
||||||
layout="@layout/sim_live_room_anchor_say1"
|
layout="@layout/sim_live_room_anchor_say1"
|
||||||
android:layout_width="96dp"
|
android:layout_width="96dp"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="24dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/topLayout2"
|
android:layout_below="@+id/topLayout2"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
|
@ -309,7 +309,7 @@
|
|||||||
android:id="@+id/goddessSayImg"
|
android:id="@+id/goddessSayImg"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:src="@mipmap/icon_arrow_right_3"
|
android:src="@drawable/live_icon_right_more"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/goddessSayBgView"
|
app:layout_constraintBottom_toBottomOf="@+id/goddessSayBgView"
|
||||||
app:layout_constraintDimensionRatio="1"
|
app:layout_constraintDimensionRatio="1"
|
||||||
|
@ -174,6 +174,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingEnd="20dp"
|
android:paddingEnd="20dp"
|
||||||
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/contentLayout"
|
app:layout_constraintEnd_toEndOf="@+id/contentLayout"
|
||||||
app:layout_constraintStart_toStartOf="@+id/contentLayout"
|
app:layout_constraintStart_toStartOf="@+id/contentLayout"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/live_time"
|
android:id="@+id/live_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="23dp"
|
android:layout_height="23dp"
|
||||||
android:layout_marginTop="88dp"
|
android:layout_marginTop="82dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
android:text="00:00"
|
android:text="00:00"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
android:visibility="invisible"
|
android:visibility="visible"
|
||||||
app:dt_left_drawable="@drawable/bg_push_time_point"
|
app:dt_left_drawable="@drawable/bg_push_time_point"
|
||||||
app:dt_left_height="4dp"
|
app:dt_left_height="4dp"
|
||||||
app:dt_left_width="4dp" />
|
app:dt_left_width="4dp" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||||
<dimen name="live_view">250dp</dimen>
|
<dimen name="live_view">250dp</dimen>
|
||||||
<dimen name="live_top">165dp</dimen>
|
<dimen name="live_top">148dp</dimen>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user