我都界面进行调整

This commit is contained in:
ningwenqiang 2024-11-02 12:08:44 +08:00
parent 4f916a4ad4
commit 4a2028db29
9 changed files with 46 additions and 61 deletions

View File

@ -33,6 +33,7 @@ public class NineGridLayout extends FrameLayout {
private LayoutParams[] mLayoutParamsArray; private LayoutParams[] mLayoutParamsArray;
private OnClickListener mOnClickListener; private OnClickListener mOnClickListener;
private List<?> mDataList; private List<?> mDataList;
private Boolean onIsFUll = false;
public NineGridLayout(Context context) { public NineGridLayout(Context context) {
@ -57,8 +58,14 @@ public class NineGridLayout extends FrameLayout {
DisplayMetrics dm = context.getResources().getDisplayMetrics(); DisplayMetrics dm = context.getResources().getDisplayMetrics();
float scale = dm.density; float scale = dm.density;
int width = dm.widthPixels - space; int width = dm.widthPixels - space;
mDividerWidth = dividerWidth; mDividerWidth = dividerWidth;
if (onIsFUll){
}
mWidth1 = (int) (scale * 220 + 0.5f); mWidth1 = (int) (scale * 220 + 0.5f);
mWidth2 = (width - dividerWidth) / 2; mWidth2 = (width - dividerWidth) / 2;
mWidth3 = (width - dividerWidth * 2) / 3; mWidth3 = (width - dividerWidth * 2) / 3;
mOnClickListener = new OnClickListener() { mOnClickListener = new OnClickListener() {

View File

@ -5,6 +5,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<View
android:id="@+id/topLine"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_width="match_parent"
android:layout_height="4dp"
android:background="#F3F4F9" />
<com.yunbao.common.custom.RatioRoundImageView <com.yunbao.common.custom.RatioRoundImageView
android:id="@+id/author" android:id="@+id/author"
android:layout_width="36dp" android:layout_width="36dp"
@ -43,7 +51,7 @@
android:id="@+id/attentionImg" android:id="@+id/attentionImg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="18dp" android:layout_marginEnd="16dp"
android:src="@mipmap/ic_yola_attention" android:src="@mipmap/ic_yola_attention"
app:layout_constraintBottom_toBottomOf="@+id/author" app:layout_constraintBottom_toBottomOf="@+id/author"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -98,7 +98,7 @@ public class MainHomeComAdapter2 extends RefreshAdapter<ActiveBean> {
private TextView msgText; private TextView msgText;
private ImageView likeImg; private ImageView likeImg;
private TextView likeText; private TextView likeText;
private View topLine;
public Vh(View itemView) { public Vh(View itemView) {
super(itemView); super(itemView);
@ -117,6 +117,7 @@ public class MainHomeComAdapter2 extends RefreshAdapter<ActiveBean> {
likeText = itemView.findViewById(R.id.likeText); likeText = itemView.findViewById(R.id.likeText);
videoImage = itemView.findViewById(R.id.videoImage); videoImage = itemView.findViewById(R.id.videoImage);
videoStartImage = itemView.findViewById(R.id.videoStartImage); videoStartImage = itemView.findViewById(R.id.videoStartImage);
topLine= itemView.findViewById(R.id.topLine);
itemView.setOnClickListener(mOnClickListener); itemView.setOnClickListener(mOnClickListener);
mNineGridLayout.setActionListener(new NineGridLayout.ActionListener() { mNineGridLayout.setActionListener(new NineGridLayout.ActionListener() {
@Override @Override

View File

@ -369,9 +369,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
if (u.getDress().getMedal() != null) { if (u.getDress().getMedal() != null) {
Log.e("tag", u.getDress().getMedal()); 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 { } 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())) { if ("C".equals(u.getUsers_type())) {
Constants.isAnchor = true; Constants.isAnchor = true;

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="#F3F4F9"
app:contentAlpha="0.5" app:contentAlpha="0.5"
app:contentToggle="true" app:contentToggle="true"
app:slideMode="left" app:slideMode="left"

View File

@ -13,7 +13,7 @@
android:id="@+id/cover" android:id="@+id/cover"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:scaleType="fitXY" android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="0.809" app:layout_constraintDimensionRatio="0.809"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -7,6 +7,7 @@
android:background="@mipmap/bg_main" android:background="@mipmap/bg_main"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -70,64 +71,13 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- app:layout_scrollFlags="scroll|enterAlways">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="60dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="10dp"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:layout_marginBottom="5dp"-->
<!-- android:layout_toLeftOf="@id/btn_search"-->
<!-- tools:ignore="NotSibling">-->
<!--&lt;!&ndash; <net.lucode.hackware.magicindicator.MagicIndicator&ndash;&gt;-->
<!--&lt;!&ndash; android:id="@+id/indicator"&ndash;&gt;-->
<!--&lt;!&ndash; android:layout_width="wrap_content"&ndash;&gt;-->
<!--&lt;!&ndash; android:layout_height="match_parent" />&ndash;&gt;-->
<!-- <TextView-->
<!-- android:id="@+id/tvPlay"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginLeft="10dp"-->
<!-- android:layout_marginTop="6dp"-->
<!-- android:layout_toRightOf="@+id/indicator"-->
<!-- android:gravity="center"-->
<!-- android:paddingTop="1dp"-->
<!-- android:text="@string/main_type_theater"-->
<!-- android:textColor="@color/black1"-->
<!-- android:textSize="16dp"-->
<!-- android:textStyle="bold" />-->
<!-- </RelativeLayout>-->
<!-- <ImageView-->
<!-- android:id="@+id/btn_send"-->
<!-- android:layout_width="40dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_marginRight="10dp"-->
<!-- android:contentDescription="TODO"-->
<!-- android:onClick="mainClick"-->
<!-- android:padding="9dp"-->
<!-- android:src="@mipmap/icon_main_add" />-->
<!-- </RelativeLayout>-->
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager.widget.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager" android:id="@+id/viewPager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@android:color/transparent" android:background="@color/white"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</LinearLayout> </LinearLayout>

View File

@ -15,12 +15,16 @@
tools:listitem="@layout/item_main_home_com_class" tools:listitem="@layout/item_main_home_com_class"
android:overScrollMode="never" /> android:overScrollMode="never" />
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:background="#F3F4F9" />
<com.yunbao.common.custom.CommonRefreshView <com.yunbao.common.custom.CommonRefreshView
android:id="@+id/refreshView" android:id="@+id/refreshView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:layout_marginRight="10dp" android:layout_marginRight="4dp"
android:layout_marginBottom="55dp" /> android:layout_marginBottom="55dp" />
<FrameLayout <FrameLayout

View File

@ -5,10 +5,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:background="@mipmap/bg_yola_index"
android:paddingBottom="50dp"> android:paddingBottom="50dp">
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -19,6 +19,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
android:background="@mipmap/bg_yola_index"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintDimensionRatio="1.512"
android:layout_height="0dp"/>
<ImageView <ImageView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
@ -163,9 +171,10 @@
<View <View
android:id="@+id/bgView" android:id="@+id/bgView"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="0dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="18dp" android:layout_marginTop="18dp"
app:layout_constraintDimensionRatio="4.397"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:background="@drawable/bg_me_data" android:background="@drawable/bg_me_data"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -200,6 +209,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="6dp" android:padding="6dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:src="@mipmap/ic_yola_gold_coin" android:src="@mipmap/ic_yola_gold_coin"
app:layout_constraintBottom_toBottomOf="@+id/diamondImg" app:layout_constraintBottom_toBottomOf="@+id/diamondImg"
app:layout_constraintEnd_toStartOf="@+id/goldenBeanImg" app:layout_constraintEnd_toStartOf="@+id/goldenBeanImg"
@ -236,6 +247,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/textColor" android:textColor="@color/textColor"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginTop="-2dp"
app:layout_constraintEnd_toEndOf="@+id/diamondImg" app:layout_constraintEnd_toEndOf="@+id/diamondImg"
app:layout_constraintStart_toStartOf="@+id/diamondImg" app:layout_constraintStart_toStartOf="@+id/diamondImg"
app:layout_constraintTop_toBottomOf="@+id/diamondImg" app:layout_constraintTop_toBottomOf="@+id/diamondImg"
@ -247,6 +259,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/textColor" android:textColor="@color/textColor"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginTop="-2dp"
app:layout_constraintEnd_toEndOf="@+id/goldCoinImg" app:layout_constraintEnd_toEndOf="@+id/goldCoinImg"
app:layout_constraintStart_toStartOf="@+id/goldCoinImg" app:layout_constraintStart_toStartOf="@+id/goldCoinImg"
app:layout_constraintTop_toBottomOf="@+id/goldCoinImg" app:layout_constraintTop_toBottomOf="@+id/goldCoinImg"
@ -258,6 +271,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/textColor" android:textColor="@color/textColor"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginTop="-2dp"
app:layout_constraintEnd_toEndOf="@+id/goldenBeanImg" app:layout_constraintEnd_toEndOf="@+id/goldenBeanImg"
app:layout_constraintStart_toStartOf="@+id/goldenBeanImg" app:layout_constraintStart_toStartOf="@+id/goldenBeanImg"
app:layout_constraintTop_toBottomOf="@+id/goldenBeanImg" app:layout_constraintTop_toBottomOf="@+id/goldenBeanImg"
@ -270,6 +284,7 @@
android:text="@string/charge" android:text="@string/charge"
android:textColor="#FFF1AA00" android:textColor="#FFF1AA00"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginTop="-2dp"
app:layout_constraintEnd_toEndOf="@+id/rechargeImg" app:layout_constraintEnd_toEndOf="@+id/rechargeImg"
app:layout_constraintStart_toStartOf="@+id/rechargeImg" app:layout_constraintStart_toStartOf="@+id/rechargeImg"
app:layout_constraintTop_toBottomOf="@+id/rechargeImg" /> app:layout_constraintTop_toBottomOf="@+id/rechargeImg" />