diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 550687531..934b9c697 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -11,6 +11,7 @@ import android.os.Message; import android.os.SystemClock; import android.text.TextUtils; import android.util.Log; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -1076,6 +1077,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis protected void initHourRankList() { ViewFlipper flipper = (ViewFlipper) findViewById(R.id.hour_rank_list); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(44), DpUtil.dp2px(16)); + LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + textParams.leftMargin=DpUtil.dp2px(5); API.get().pdLiveApi(mContext).getHourChartRank(mLiveUid) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) @@ -1088,6 +1091,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis ImageView hourPic = hourView.findViewById(R.id.wish_pic); mHotText = hotView.findViewById(R.id.wish_index); mHourRank = hourView.findViewById(R.id.wish_index); + mHotText.setLayoutParams(textParams); + mHourRank.setLayoutParams(textParams); + mHotText.setGravity(Gravity.CENTER); + mHourRank.setGravity(Gravity.CENTER); setHourRankData(info.get(0).getRank()); hotPic.setImageResource(R.drawable.live_tags_hot); diff --git a/live/src/main/res/drawable/bg_fast_meg.xml b/live/src/main/res/drawable/bg_fast_meg.xml index 4b8c2a6db..b3dbc1af6 100644 --- a/live/src/main/res/drawable/bg_fast_meg.xml +++ b/live/src/main/res/drawable/bg_fast_meg.xml @@ -2,7 +2,7 @@ - + diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index d4e398523..237e89d32 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -257,7 +257,6 @@ layout="@layout/view_wish_list" android:layout_width="14dp" android:layout_height="14dp" - android:layout_weight="0.0" android:src="@mipmap/live_icon_wishlist" android:visibility="gone" /> @@ -266,8 +265,7 @@ android:layout_width="wrap_content" android:layout_height="20dp" android:layout_marginStart="0dp" - android:layout_marginEnd="6dp" - android:layout_weight="2" + android:layout_marginEnd="4dp" android:flipInterval="5000" android:inAnimation="@anim/anim_marquee_in" android:outAnimation="@anim/anim_marquee_out" /> @@ -275,7 +273,6 @@