add [首页新增短剧入口]

This commit is contained in:
hch 2024-04-07 10:05:40 +08:00
parent 0d7bdce4f0
commit 756cbb1ce1
6 changed files with 81 additions and 48 deletions

View File

@ -1498,4 +1498,5 @@
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string> <string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string> <string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string> <string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
<string name="main_type_theater">短劇</string>
</resources> </resources>

View File

@ -1497,4 +1497,5 @@
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string> <string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string> <string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string> <string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
<string name="main_type_theater">短劇</string>
</resources> </resources>

View File

@ -1494,5 +1494,6 @@
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string> <string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string> <string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string> <string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
<string name="main_type_theater">短劇</string>
</resources> </resources>

View File

@ -1503,4 +1503,5 @@ Limited ride And limited avatar frame</string>
<string name="dragon_rule5">1.Dragon\'s Wealth is a free golden bean benefit provided to live stream viewers by users who have activated the 【God Guardian】 feature;</string> <string name="dragon_rule5">1.Dragon\'s Wealth is a free golden bean benefit provided to live stream viewers by users who have activated the 【God Guardian】 feature;</string>
<string name="dragon_rule6">2.Users who follow the anchor and participate in the activity will divide the gold beans of the activity after the countdown of five minutes ends;</string> <string name="dragon_rule6">2.Users who follow the anchor and participate in the activity will divide the gold beans of the activity after the countdown of five minutes ends;</string>
<string name="dragon_rule7">3.The final interpretation of this activity belongs to PDLIVE.</string> <string name="dragon_rule7">3.The final interpretation of this activity belongs to PDLIVE.</string>
<string name="main_type_theater" >Theater</string>
</resources> </resources>

View File

@ -4,12 +4,15 @@ import android.content.Context;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.HorizontalScrollView;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView;
import com.umeng.analytics.MobclickAgent; import com.umeng.analytics.MobclickAgent;
import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.event.FloatWarOrderEvent; import com.yunbao.common.event.FloatWarOrderEvent;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.live.dialog.LiveBuyGuardDialog; import com.yunbao.live.dialog.LiveBuyGuardDialog;
import com.yunbao.live.dialog.LiveGuardDialog; import com.yunbao.live.dialog.LiveGuardDialog;
import com.yunbao.main.R; import com.yunbao.main.R;
@ -29,6 +32,8 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
private final String mPageName = "home_page"; private final String mPageName = "home_page";
private ImageView img_trophy; private ImageView img_trophy;
private boolean floatWarOrder; private boolean floatWarOrder;
private TextView tvPlay;
private HorizontalScrollView view_horizontal;
public boolean isFloatWarOrder() { public boolean isFloatWarOrder() {
return floatWarOrder; return floatWarOrder;
@ -58,7 +63,14 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
// return true; // return true;
// } // }
// }); // });
findViewById(R.id.tvPlay).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MobclickAgent.onEvent(mContext, "home_page_short_drama", "首页短剧按钮");
RouteUtil.forwardCommunityActivity();
}
});
view_horizontal = (HorizontalScrollView) findViewById(R.id.view_horizontal);
} }
public void setCurPosition(int position) { public void setCurPosition(int position) {
@ -72,21 +84,25 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
floatWarOrder = false; floatWarOrder = false;
MobclickAgent.onEvent(mContext, "home_page_follow", "首页关注列表按钮"); MobclickAgent.onEvent(mContext, "home_page_follow", "首页关注列表按钮");
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false)); EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
view_horizontal.setScaleX(0);
break; break;
case 1: case 1:
floatWarOrder = false; floatWarOrder = false;
MobclickAgent.onEvent(mContext, "home_page_hot", "首页热门列表按钮"); MobclickAgent.onEvent(mContext, "home_page_hot", "首页热门列表按钮");
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false)); EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
view_horizontal.setScaleX(0);
break; break;
case 2: case 2:
floatWarOrder = false; floatWarOrder = false;
MobclickAgent.onEvent(mContext, "home_page_recommend", "首页推荐列表按钮"); MobclickAgent.onEvent(mContext, "home_page_recommend", "首页推荐列表按钮");
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false)); EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
view_horizontal.setScaleX(view_horizontal.getWidth());
break; break;
case 3: case 3:
floatWarOrder = true; floatWarOrder = true;
MobclickAgent.onEvent(mContext, "home_page_redpk", "首页红包列表按钮"); MobclickAgent.onEvent(mContext, "home_page_redpk", "首页红包列表按钮");
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(true)); EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(true));
view_horizontal.setScaleX(view_horizontal.getWidth());
break; break;
} }
if (mViewHolders == null) { if (mViewHolders == null) {
@ -143,12 +159,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
@Override @Override
protected String[] getTitles() { protected String[] getTitles() {
return new String[]{ return new String[]{mContext.getString(R.string.follow), mContext.getString(R.string.hot), mContext.getString(R.string.recomment), mContext.getString(R.string.main_tabs_red_packet),};
mContext.getString(R.string.follow),
mContext.getString(R.string.hot),
mContext.getString(R.string.recomment),
mContext.getString(R.string.main_tabs_red_packet),
};
} }

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
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:orientation="vertical" android:background="@color/white"
android:background="@color/white"> android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
@ -18,17 +19,52 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="37dp"
android:layout_marginTop="20dp"
app:layout_scrollFlags="scroll|enterAlways"> app:layout_scrollFlags="scroll|enterAlways">
<HorizontalScrollView
android:id="@+id/view_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<net.lucode.hackware.magicindicator.MagicIndicator
android:id="@+id/indicator"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<TextView
android:id="@+id/tvPlay"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="25dp"
android:layout_marginEnd="120dp"
android:gravity="center"
android:paddingTop="1dp"
android:text="@string/main_type_theater"
android:textColor="#B1B1B1"
android:textSize="16dp"
android:textStyle="bold" />
</LinearLayout>
</HorizontalScrollView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true">
<ImageView <ImageView
android:id="@+id/btn_search" android:id="@+id/btn_search"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="45dp"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:contentDescription="TODO" android:contentDescription="TODO"
android:onClick="mainClick" android:onClick="mainClick"
@ -39,31 +75,13 @@
android:id="@+id/img_trophy" android:id="@+id/img_trophy"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:contentDescription="TODO" android:contentDescription="TODO"
android:onClick="mainClick" android:onClick="mainClick"
android:padding="6dp" /> android:padding="6dp" />
<FrameLayout </LinearLayout>
android:layout_width="match_parent"
android:layout_height="37dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@id/btn_search">
<net.lucode.hackware.magicindicator.MagicIndicator
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</RelativeLayout> </RelativeLayout>