1、新版 广场界面
2、新版 娱乐界面
This commit is contained in:
parent
25a926e507
commit
ed595ec1f4
@ -137,10 +137,12 @@ import com.yunbao.main.manager.imrongcloud.ConversationIMListManager;
|
||||
import com.yunbao.main.utils.GenerateTestUserSig;
|
||||
import com.yunbao.main.views.FloatBannerView;
|
||||
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;
|
||||
import com.yunbao.main.views.MainMessageViewHolder;
|
||||
import com.yunbao.main.views.NewMainMessageViewHolder;
|
||||
import com.yunbao.video.utils.VideoStorge;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@ -178,8 +180,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
private List<FrameLayout> mViewList;
|
||||
private MainHomeLiveViewHolder mHomeLiveViewHolder;
|
||||
private MainHomeViewHolder mainHomeViewHolder;
|
||||
private MainHomeCommunityViewHolder mMainHomeCommunityViewHolder;
|
||||
private MainMessageViewHolder mainMessageViewHolder;
|
||||
// private MainHomeCommunityViewHolder mMainHomeCommunityViewHolder;
|
||||
// private MainMessageViewHolder mainMessageViewHolder;
|
||||
private NewMainMessageViewHolder newMainMessageViewHolder;
|
||||
private MainHomeGameViewHolder mMainHomeGameViewHolder;
|
||||
private MainMeViewHolder mMeViewHolder;
|
||||
private AbsMainViewHolder[] mViewHolders;
|
||||
private View mBottom;
|
||||
@ -360,27 +364,24 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
case 0:
|
||||
//点击埋点
|
||||
MobclickAgent.onEvent(mContext, "home_page", "首页");
|
||||
if (mMainHomeCommunityViewHolder != null) {
|
||||
mMainHomeCommunityViewHolder.onPauseVideo();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
MobclickAgent.onEvent(mContext, "community", "社区");
|
||||
if (mMainHomeCommunityViewHolder != null) {
|
||||
/* if (mMainHomeCommunityViewHolder != null) {
|
||||
mMainHomeCommunityViewHolder.onResumePlay();
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
case 2:
|
||||
MobclickAgent.onEvent(mContext, "information", "消息");
|
||||
if (mMainHomeCommunityViewHolder != null) {
|
||||
/* if (mMainHomeCommunityViewHolder != null) {
|
||||
mMainHomeCommunityViewHolder.onPauseVideo();
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
case 3:
|
||||
MobclickAgent.onEvent(mContext, "my", "我的");
|
||||
if (mMainHomeCommunityViewHolder != null) {
|
||||
/* if (mMainHomeCommunityViewHolder != null) {
|
||||
mMainHomeCommunityViewHolder.onPauseVideo();
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME, false);
|
||||
@ -565,7 +566,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
floatWarOrder.setVisibility(View.GONE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||
isfloatBannernet = false;
|
||||
if (mainMessageViewHolder != null) mainMessageViewHolder.onResume();
|
||||
// if (mainMessageViewHolder != null) mainMessageViewHolder.onResume();
|
||||
} else {
|
||||
floatBanner.setVisibility(View.GONE);
|
||||
floatRedPacket.setVisibility(View.GONE);
|
||||
@ -1236,7 +1237,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
if (updataListBean.getIndex() == 0) {
|
||||
EventBus.getDefault().post("Updata");
|
||||
} else if (updataListBean.getIndex() == 1) {
|
||||
mMainHomeCommunityViewHolder.loadNewUrl();
|
||||
// mMainHomeCommunityViewHolder.loadNewUrl();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1255,7 +1256,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (isTabClose && isWebClose) {
|
||||
mMainHomeCommunityViewHolder.closeFinger();
|
||||
// mMainHomeCommunityViewHolder.closeFinger();
|
||||
} else {
|
||||
long curTime = System.currentTimeMillis();
|
||||
if (curTime - mLastClickBackTime > 2000) {
|
||||
@ -1304,13 +1305,18 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
vh = mainHomeViewHolder;
|
||||
|
||||
} else if (position == 1) {
|
||||
mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//社区
|
||||
vh = mMainHomeCommunityViewHolder;
|
||||
/* mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//社区
|
||||
vh = mMainHomeCommunityViewHolder;*/
|
||||
mMainHomeGameViewHolder = new MainHomeGameViewHolder(this, parent);//游戏
|
||||
vh = mMainHomeGameViewHolder;
|
||||
|
||||
|
||||
} else if (position == 2) {
|
||||
mainMessageViewHolder = new MainMessageViewHolder(this, parent);
|
||||
vh = mainMessageViewHolder;
|
||||
/* mainMessageViewHolder = new MainMessageViewHolder(this, parent);
|
||||
vh = mainMessageViewHolder;*/
|
||||
|
||||
newMainMessageViewHolder = new NewMainMessageViewHolder(this,parent);
|
||||
vh = newMainMessageViewHolder;
|
||||
|
||||
} else if (position == 3) {
|
||||
mMeViewHolder = new MainMeViewHolder(mContext, parent);
|
||||
@ -1359,7 +1365,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
}
|
||||
|
||||
private void processResult(int resultCode, Intent intent) {
|
||||
if (mMainHomeCommunityViewHolder.mValueCallback == null) {
|
||||
/*if (mMainHomeCommunityViewHolder.mValueCallback == null) {
|
||||
return;
|
||||
}
|
||||
if (resultCode == RESULT_OK && intent != null) {
|
||||
@ -1368,7 +1374,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
} else {
|
||||
mMainHomeCommunityViewHolder.mValueCallback.onReceiveValue(null);
|
||||
}
|
||||
mMainHomeCommunityViewHolder.mValueCallback = null;
|
||||
mMainHomeCommunityViewHolder.mValueCallback = null;*/
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@ -1387,9 +1393,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
if (dataString != null) {
|
||||
results = new Uri[]{Uri.parse(dataString)};
|
||||
}
|
||||
mMainHomeCommunityViewHolder.setValueCallback2(results);
|
||||
// mMainHomeCommunityViewHolder.setValueCallback2(results);
|
||||
} else {
|
||||
mMainHomeCommunityViewHolder.setValueCallback2(null);
|
||||
// mMainHomeCommunityViewHolder.setValueCallback2(null);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1571,9 +1577,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
public void onInstructorOperationEvent(InstructorOperationEvent event) {
|
||||
//跳转消息列表
|
||||
if (mViewPager != null) {
|
||||
mViewPager.setCurrentItem(2);
|
||||
mTabButtonGroup.setCurPosition(2);
|
||||
mainMessageViewHolder.setHomeZdyPop(NoviceInstructorManager.get(this).getHomeZdyPop());
|
||||
// TODO 跳消息
|
||||
// mViewPager.setCurrentItem(2);
|
||||
// mTabButtonGroup.setCurPosition(2);
|
||||
// mainMessageViewHolder.setHomeZdyPop(NoviceInstructorManager.get(this).getHomeZdyPop());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,10 @@ public class MainHomeCommunityFragment extends BaseFragment {
|
||||
super();
|
||||
this.nowMainActivity=nowMainActivity;
|
||||
}
|
||||
public MainHomeCommunityFragment(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container) {
|
||||
|
@ -0,0 +1,40 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
import com.yunbao.main.fragment.MainHomeCommunityFragment;
|
||||
|
||||
public class NewMainMessageViewHolder extends AbsMainViewHolder {
|
||||
private MainActivity mContext;
|
||||
private MainHomeCommunityFragment mMainHomeCommunityFragment;
|
||||
|
||||
|
||||
public NewMainMessageViewHolder(MainActivity context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
this.mContext = context;
|
||||
FragmentTransaction fragmentTransaction = mContext.getSupportFragmentManager().beginTransaction();
|
||||
if (mMainHomeCommunityFragment == null){
|
||||
mMainHomeCommunityFragment = new MainHomeCommunityFragment(mContext);
|
||||
}
|
||||
fragmentTransaction.add(R.id.fragment_container,mMainHomeCommunityFragment);
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_new_main_meeage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
|
||||
}
|
||||
|
||||
}
|
6
main/src/main/res/drawable/create_room_shape.xml
Normal file
6
main/src/main/res/drawable/create_room_shape.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="16dp"/>
|
||||
<solid android:color="#FF3482"/>
|
||||
|
||||
</shape>
|
176
main/src/main/res/layout/new_gram_room.xml
Normal file
176
main/src/main/res/layout/new_gram_room.xml
Normal file
@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backgroup_iv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="240dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/bg1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="17dp"
|
||||
android:layout_marginTop="52dp"
|
||||
android:text="@string/interactive_game_room_list"
|
||||
android:textColor="#000"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/interactive_game_add"
|
||||
android:layout_width="74dp"
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/create_room_shape"
|
||||
android:gravity="center"
|
||||
android:text="創建房間"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="17dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/textView5" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_history"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:src="@mipmap/jilu"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/search"
|
||||
app:layout_constraintEnd_toStartOf="@+id/search"
|
||||
android:layout_marginEnd="19dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/search" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginEnd="19dp"
|
||||
android:src="@mipmap/search"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/interactive_game_add"
|
||||
app:layout_constraintEnd_toStartOf="@+id/interactive_game_add"
|
||||
app:layout_constraintTop_toTopOf="@+id/interactive_game_add" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/interactive_game_add"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:id="@+id/game_type_recyclerview"
|
||||
android:layout_height="90dp"/>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/select_game_type"
|
||||
app:layout_constraintTop_toBottomOf="@id/game_type_recyclerview"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/interactive_game_room_sill"
|
||||
android:textColor="#000"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/room_sill"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_home_sud_list_btn">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_sill_text"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#000"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_sill_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_home_interactive_game_arrow" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/interactive_game_room_house_owner"
|
||||
android:textColor="#000"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/house_owner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_home_sud_list_btn"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/house_owner_text"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#000"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/house_owner_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@mipmap/icon_home_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
android:layout_marginTop="15dp"
|
||||
android:id="@+id/refreshView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/select_game_type"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
7
main/src/main/res/layout/view_new_main_meeage.xml
Normal file
7
main/src/main/res/layout/view_new_main_meeage.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
BIN
main/src/main/res/mipmap-xxxhdpi/jilu.webp
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/jilu.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
main/src/main/res/mipmap-xxxhdpi/search.webp
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/search.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user