From 4a2028db292b3a401cf5af02df00dca7c44d1b35 Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Sat, 2 Nov 2024 12:08:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E9=83=BD=E7=95=8C=E9=9D=A2=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/views/NineGridLayout.java | 7 +++ live/src/main/res/layout/item_main_com2.xml | 10 +++- .../main/adapter/MainHomeComAdapter2.java | 3 +- .../yunbao/main/views/MainMeViewHolder.java | 4 +- main/src/main/res/layout/activity_main.xml | 2 +- .../res/layout/item_main_home_lives_pola.xml | 2 +- .../main/res/layout/view_main_home_com.xml | 54 +------------------ .../res/layout/view_main_home_com_hot.xml | 6 ++- main/src/main/res/layout/view_main_me2.xml | 19 ++++++- 9 files changed, 46 insertions(+), 61 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/NineGridLayout.java b/common/src/main/java/com/yunbao/common/views/NineGridLayout.java index 54af3eeff..79d50e655 100644 --- a/common/src/main/java/com/yunbao/common/views/NineGridLayout.java +++ b/common/src/main/java/com/yunbao/common/views/NineGridLayout.java @@ -33,6 +33,7 @@ public class NineGridLayout extends FrameLayout { private LayoutParams[] mLayoutParamsArray; private OnClickListener mOnClickListener; private List mDataList; + private Boolean onIsFUll = false; public NineGridLayout(Context context) { @@ -57,8 +58,14 @@ public class NineGridLayout extends FrameLayout { DisplayMetrics dm = context.getResources().getDisplayMetrics(); float scale = dm.density; int width = dm.widthPixels - space; + mDividerWidth = dividerWidth; + if (onIsFUll){ + + } mWidth1 = (int) (scale * 220 + 0.5f); + + mWidth2 = (width - dividerWidth) / 2; mWidth3 = (width - dividerWidth * 2) / 3; mOnClickListener = new OnClickListener() { diff --git a/live/src/main/res/layout/item_main_com2.xml b/live/src/main/res/layout/item_main_com2.xml index 4b11feb18..4f356c00a 100644 --- a/live/src/main/res/layout/item_main_com2.xml +++ b/live/src/main/res/layout/item_main_com2.xml @@ -5,6 +5,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> + + { private TextView msgText; private ImageView likeImg; private TextView likeText; - + private View topLine; public Vh(View itemView) { super(itemView); @@ -117,6 +117,7 @@ public class MainHomeComAdapter2 extends RefreshAdapter { likeText = itemView.findViewById(R.id.likeText); videoImage = itemView.findViewById(R.id.videoImage); videoStartImage = itemView.findViewById(R.id.videoStartImage); + topLine= itemView.findViewById(R.id.topLine); itemView.setOnClickListener(mOnClickListener); mNineGridLayout.setActionListener(new NineGridLayout.ActionListener() { @Override diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 484018bbd..7d8a1a806 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -369,9 +369,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi if (u.getDress().getMedal() != null) { Log.e("tag", u.getDress().getMedal()); - ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico, R.mipmap.icon_vip_gold); + ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico, R.mipmap.ic_yola_guard); } else { - user_noble_ico.setImageResource(R.mipmap.icon_vip_gold); + user_noble_ico.setImageResource(R.mipmap.ic_yola_guard); } if ("C".equals(u.getUsers_type())) { Constants.isAnchor = true; diff --git a/main/src/main/res/layout/activity_main.xml b/main/src/main/res/layout/activity_main.xml index 812b3991a..b99e1bf12 100644 --- a/main/src/main/res/layout/activity_main.xml +++ b/main/src/main/res/layout/activity_main.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/white" + android:background="#F3F4F9" app:contentAlpha="0.5" app:contentToggle="true" app:slideMode="left" diff --git a/main/src/main/res/layout/item_main_home_lives_pola.xml b/main/src/main/res/layout/item_main_home_lives_pola.xml index cad9a9df7..d9a883917 100644 --- a/main/src/main/res/layout/item_main_home_lives_pola.xml +++ b/main/src/main/res/layout/item_main_home_lives_pola.xml @@ -13,7 +13,7 @@ android:id="@+id/cover" android:layout_width="0dp" android:layout_height="0dp" - android:scaleType="fitXY" + android:scaleType="centerCrop" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintDimensionRatio="0.809" app:layout_constraintEnd_toEndOf="parent" diff --git a/main/src/main/res/layout/view_main_home_com.xml b/main/src/main/res/layout/view_main_home_com.xml index a8ea01968..a4ebe4e39 100644 --- a/main/src/main/res/layout/view_main_home_com.xml +++ b/main/src/main/res/layout/view_main_home_com.xml @@ -7,6 +7,7 @@ android:background="@mipmap/bg_main" android:orientation="vertical"> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/main/src/main/res/layout/view_main_home_com_hot.xml b/main/src/main/res/layout/view_main_home_com_hot.xml index 797fe6ed8..c4fc13261 100644 --- a/main/src/main/res/layout/view_main_home_com_hot.xml +++ b/main/src/main/res/layout/view_main_home_com_hot.xml @@ -15,12 +15,16 @@ tools:listitem="@layout/item_main_home_com_class" android:overScrollMode="never" /> + + + +