diff --git a/common/src/main/res/mipmap-mdpi/ic_yola_item_select.png b/common/src/main/res/mipmap-mdpi/ic_yola_item_select.png
new file mode 100644
index 000000000..82c2f0b17
Binary files /dev/null and b/common/src/main/res/mipmap-mdpi/ic_yola_item_select.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/ic_yola_item_select.png b/common/src/main/res/mipmap-xxhdpi/ic_yola_item_select.png
new file mode 100644
index 000000000..ab15efb0c
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/ic_yola_item_select.png differ
diff --git a/common/src/main/res/mipmap-xxxhdpi/ic_yola_item_select.png b/common/src/main/res/mipmap-xxxhdpi/ic_yola_item_select.png
new file mode 100644
index 000000000..2546a1fa0
Binary files /dev/null and b/common/src/main/res/mipmap-xxxhdpi/ic_yola_item_select.png differ
diff --git a/common/src/main/res/values/colors.xml b/common/src/main/res/values/colors.xml
index 64d247c68..9104b767d 100644
--- a/common/src/main/res/values/colors.xml
+++ b/common/src/main/res/values/colors.xml
@@ -78,4 +78,9 @@
#F6F7FB
#F4F4F4
+ #111111
+ #8A8A8A
+ #3D3D3D
+
+
diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java
index 254cb9766..cdcf77842 100644
--- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java
@@ -133,6 +133,7 @@ import com.yunbao.main.utils.UserInfoManager;
import com.yunbao.main.views.FloatBannerView;
import com.yunbao.main.views.MainHomeComViewHolder;
import com.yunbao.main.views.MainHomeCommunityViewHolder;
+import com.yunbao.main.views.MainHomeGameViewHolder;
import com.yunbao.main.views.MainHomeLiveViewHolder;
import com.yunbao.main.views.MainHomeViewHolder;
import com.yunbao.main.views.MainMeViewHolder;
@@ -181,6 +182,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
private MainHomeComViewHolder mainHomeComViewHolder;
private MainHomeViewHolder mainHomeViewHolder;
private MainHomeCommunityViewHolder mMainHomeCommunityViewHolder;
+ private MainHomeGameViewHolder mainHomeGameLiveViewHolder;
private MainMessageViewHolder mainMessageViewHolder;
private MainMeViewHolder mMeViewHolder;
private AbsMainViewHolder[] mViewHolders;
@@ -352,7 +354,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
waitingTip = findViewById(R.id.waiting_tip);
mViewPager.setOffscreenPageLimit(4);
mViewList = new ArrayList<>();
- for (int i = 0; i < 4; i++) {
+ for (int i = 0; i < 5; i++) {
FrameLayout frameLayout = new FrameLayout(mContext);
frameLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
mViewList.add(frameLayout);
@@ -389,13 +391,22 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
}
break;
case 2:
+ MobclickAgent.onEvent(mContext, "game", "游戏");
+ if (mMainHomeCommunityViewHolder != null) {
+ mMainHomeCommunityViewHolder.onPauseVideo();
+ }
+ if (anchorRecommendModel != null && anchorRecommendModel.getList().size() > 2) {
+ floatBanner.setVisibility(View.GONE);
+ }
+ break;
+ case 3:
MobclickAgent.onEvent(mContext, "information", "消息");
if (mMainHomeCommunityViewHolder != null) {
mMainHomeCommunityViewHolder.onPauseVideo();
}
floatBanner.setVisibility(View.GONE);
break;
- case 3:
+ case 4:
MobclickAgent.onEvent(mContext, "my", "我的");
if (mMainHomeCommunityViewHolder != null) {
mMainHomeCommunityViewHolder.onPauseVideo();
@@ -439,7 +450,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
}
});
mTabButtonGroup.setViewPager(mViewPager);
- mViewHolders = new AbsMainViewHolder[4];
+ mViewHolders = new AbsMainViewHolder[5];
mDp70 = DpUtil.dp2px(70);
mBottom = findViewById(R.id.bottom);
mUpAnimator = ObjectAnimator.ofFloat(mBottom, "translationY", mDp70, 0);
@@ -561,7 +572,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
if (index == 1) {
isfloatBannernet = true;
initAnchorRecommendBanner();
- } else if (index == 2) {
+ } else if (index == 3) {
floatBanner.setVisibility(View.GONE);
floatRedPacket.setVisibility(View.GONE);
floatWarOrder.setVisibility(View.GONE);
@@ -1296,13 +1307,15 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
/* mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//直播
vh = mMainHomeCommunityViewHolder;*/
} else if (position == 2) {
+ mainHomeGameLiveViewHolder = new MainHomeGameViewHolder(this, parent);
+ vh = mainHomeGameLiveViewHolder;
+ }else if (position == 3) {
mainMessageViewHolder = new MainMessageViewHolder(this, parent);
vh = mainMessageViewHolder;
- } else if (position == 3) {
+ } else if (position == 4) {
mMeViewHolder = new MainMeViewHolder(mContext, parent);
vh = mMeViewHolder;
-
}
if (vh == null) {
return;
@@ -1563,8 +1576,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
public void onInstructorOperationEvent(InstructorOperationEvent event) {
//跳转消息列表
if (mViewPager != null) {
- mViewPager.setCurrentItem(2);
- mTabButtonGroup.setCurPosition(2);
+ mViewPager.setCurrentItem(3);
+ mTabButtonGroup.setCurPosition(3);
mainMessageViewHolder.setHomeZdyPop(NoviceInstructorManager.get(this).getHomeZdyPop());
}
}
diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeComClassAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeComClassAdapter.java
index e32f664b2..88b8b3740 100644
--- a/main/src/main/java/com/yunbao/main/adapter/MainHomeComClassAdapter.java
+++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeComClassAdapter.java
@@ -3,6 +3,7 @@ package com.yunbao.main.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Color;
+import android.graphics.Typeface;
import android.os.Build;
import android.view.LayoutInflater;
import android.view.View;
@@ -10,6 +11,7 @@ import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.bean.NewCommunityType;
@@ -96,11 +98,13 @@ public class MainHomeComClassAdapter extends RecyclerView.Adapter mViewList;
private int mAppLayoutOffestY;
- private List simplePagerTitleViewList;
+ private List simplePagerTitleViewList;
private List textViewList;
public AbsMainHomeParentComViewHolder(Context context, ViewGroup parentView) {
@@ -63,10 +65,14 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder {
for (int i = 0; i < simplePagerTitleViewList.size(); i++) {
if (index == i) {
simplePagerTitleViewList.get(i).setVisibility(View.VISIBLE);
- textViewList.get(i).setTextSize(22);
+ textViewList.get(i).setTextColor(ContextCompat.getColor(mContext,R.color.color_111111));
+ //设置 android:textStyle="bold"
+ textViewList.get(i).setTypeface(null, Typeface.BOLD);
} else {
simplePagerTitleViewList.get(i).setVisibility(View.INVISIBLE);
- textViewList.get(i).setTextSize(16);
+ textViewList.get(i).setTextColor(ContextCompat.getColor(mContext,R.color.color_8a8a8a));
+ //设置为正常字体
+ textViewList.get(i).setTypeface(null, Typeface.NORMAL);
}
}
}
@@ -157,7 +163,7 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder {
CommonPagerTitleView commonPagerTitleView = new CommonPagerTitleView(mContext);
commonPagerTitleView.setContentView(R.layout.simple_pager_title_layout);
// 初始化
- final ImageView titleImg = (ImageView) commonPagerTitleView.findViewById(R.id.index);
+ final View titleImg = commonPagerTitleView.findViewById(R.id.index);
final TextView titleText = (TextView) commonPagerTitleView.findViewById(R.id.title);
titleText.setText(titles[index]);
@@ -168,7 +174,7 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder {
if (index == 3) {
return;
}
- titleText.setTextSize(22);
+ // titleText.setTextSize(22);
}
@Override
@@ -176,7 +182,7 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder {
if (index == 3) {
return;
}
- titleText.setTextSize(16);
+ //titleText.setTextSize(16);
}
@Override
diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeComViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeComViewHolder.java
index 3698a7132..ec2a49cfa 100644
--- a/main/src/main/java/com/yunbao/main/views/MainHomeComViewHolder.java
+++ b/main/src/main/java/com/yunbao/main/views/MainHomeComViewHolder.java
@@ -35,6 +35,7 @@ public class MainHomeComViewHolder extends AbsMainHomeParentComViewHolder {
private MainHomeNewViewHolder mainHomeLiveViewHolder;
private MainHomeRecomComViewHolder mainHomeRecomComViewHolder;
private MainHomeGameViewHolder mainHomeGameLiveViewHolder;
+
private final String mPageName = "home_page";
private TextView tvPlay;
private ImageView btnSend;
@@ -59,7 +60,7 @@ public class MainHomeComViewHolder extends AbsMainHomeParentComViewHolder {
@Override
public void init() {
super.init();
- btnSend = (ImageView) findViewById(R.id.btn_send);
+ btnSend = (ImageView) findViewById(R.id.cameraImg);
btnSend.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/main/src/main/res/layout/item_main_home_com_class.xml b/main/src/main/res/layout/item_main_home_com_class.xml
index c4f677c53..aac6c834b 100644
--- a/main/src/main/res/layout/item_main_home_com_class.xml
+++ b/main/src/main/res/layout/item_main_home_com_class.xml
@@ -1,21 +1,19 @@
-
+ android:layout_height="match_parent">
+ android:paddingStart="6dp"
+ android:paddingEnd="6dp"
+ android:layout_marginStart="6dp"
+ android:layout_marginEnd="6dp"
+ android:textColor="@color/color_3d3d3d"
+ android:textSize="14sp" />
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/main/src/main/res/layout/simple_pager_title_layout.xml b/main/src/main/res/layout/simple_pager_title_layout.xml
index e96098453..24bfecb6d 100644
--- a/main/src/main/res/layout/simple_pager_title_layout.xml
+++ b/main/src/main/res/layout/simple_pager_title_layout.xml
@@ -1,8 +1,9 @@
@@ -13,15 +14,16 @@
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:gravity="center"
- android:text="關注"
+ tools:text="關注"
android:textColor="@color/black1"
- android:textSize="22dp"
+ android:textSize="16dp"
android:textStyle="bold" />
+ android:layout_width="12dp"
+ android:layout_height="6dp"
+ android:src="@mipmap/ic_yola_item_select" />
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 4442a10d0..d4c77ff62 100644
--- a/main/src/main/res/layout/view_main_home_com.xml
+++ b/main/src/main/res/layout/view_main_home_com.xml
@@ -10,63 +10,115 @@
-
+ android:layout_height="match_parent">
-
-
-
-
-
-
-
-
+
-
+ android:id="@+id/searchImg"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="10dp"
+ android:padding="7dp"
+ android:src="@mipmap/ic_yola_search"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 d17fbf862..8a7f0f42b 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
@@ -2,12 +2,17 @@