add [首页新增短剧入口]
This commit is contained in:
parent
0d7bdce4f0
commit
756cbb1ce1
@ -1498,4 +1498,5 @@
|
||||
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
|
||||
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
|
||||
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="main_type_theater">短劇</string>
|
||||
</resources>
|
||||
|
@ -1497,4 +1497,5 @@
|
||||
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
|
||||
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
|
||||
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="main_type_theater">短劇</string>
|
||||
</resources>
|
||||
|
@ -1494,5 +1494,6 @@
|
||||
<string name="dragon_rule5">1.神龍送財是開通【神之守護】的用戶給予直播間觀眾的免費金豆福利;</string>
|
||||
<string name="dragon_rule6">2.用戶關注主播並參與活動,將在倒計時五分鐘結束後瓜分活動金豆;</string>
|
||||
<string name="dragon_rule7">3.此活動的最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="main_type_theater">短劇</string>
|
||||
|
||||
</resources>
|
||||
|
@ -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_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="main_type_theater" >Theater</string>
|
||||
</resources>
|
||||
|
@ -4,12 +4,15 @@ import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.event.FloatWarOrderEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.live.dialog.LiveBuyGuardDialog;
|
||||
import com.yunbao.live.dialog.LiveGuardDialog;
|
||||
import com.yunbao.main.R;
|
||||
@ -29,6 +32,8 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
private final String mPageName = "home_page";
|
||||
private ImageView img_trophy;
|
||||
private boolean floatWarOrder;
|
||||
private TextView tvPlay;
|
||||
private HorizontalScrollView view_horizontal;
|
||||
|
||||
public boolean isFloatWarOrder() {
|
||||
return floatWarOrder;
|
||||
@ -58,7 +63,14 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
// 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) {
|
||||
@ -72,21 +84,25 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
floatWarOrder = false;
|
||||
MobclickAgent.onEvent(mContext, "home_page_follow", "首页关注列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
|
||||
view_horizontal.setScaleX(0);
|
||||
break;
|
||||
case 1:
|
||||
floatWarOrder = false;
|
||||
MobclickAgent.onEvent(mContext, "home_page_hot", "首页热门列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
|
||||
view_horizontal.setScaleX(0);
|
||||
break;
|
||||
case 2:
|
||||
floatWarOrder = false;
|
||||
MobclickAgent.onEvent(mContext, "home_page_recommend", "首页推荐列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
|
||||
view_horizontal.setScaleX(view_horizontal.getWidth());
|
||||
break;
|
||||
case 3:
|
||||
floatWarOrder = true;
|
||||
MobclickAgent.onEvent(mContext, "home_page_redpk", "首页红包列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(true));
|
||||
view_horizontal.setScaleX(view_horizontal.getWidth());
|
||||
break;
|
||||
}
|
||||
if (mViewHolders == null) {
|
||||
@ -143,12 +159,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
@Override
|
||||
protected String[] getTitles() {
|
||||
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),
|
||||
};
|
||||
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),};
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="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
|
||||
android:id="@+id/appBarLayout"
|
||||
@ -18,52 +19,69 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_search"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="45dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_main_search" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_trophy"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="6dp" />
|
||||
|
||||
<FrameLayout
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/view_horizontal"
|
||||
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">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:scrollbars="none">
|
||||
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/indicator"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="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" />
|
||||
|
||||
</FrameLayout>
|
||||
<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
|
||||
android:id="@+id/btn_search"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_main_search" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_trophy"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:contentDescription="TODO"
|
||||
android:onClick="mainClick"
|
||||
android:padding="6dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user