111
This commit is contained in:
parent
62d38d4275
commit
01373a64af
@ -72,6 +72,8 @@ public class CommonAppConfig {
|
||||
public static boolean isGetNewWrap = false;//是否获取到新的包裹礼物
|
||||
public static int alert_time = 1;
|
||||
public static int alert_end_time = 1;
|
||||
//是否是新用户
|
||||
public static boolean isNewUser = true;
|
||||
|
||||
|
||||
private CommonAppConfig() {
|
||||
|
@ -638,6 +638,11 @@
|
||||
<string name="save">Preservation</string>
|
||||
<string name="reg">Register</string>
|
||||
<string name="no_more_mic">No one is currently in the voice link</string>
|
||||
<string name="welcome_pdlive">Welcome to PDLIVE</string>
|
||||
<string name="newcomer">Newcomer Bonus</string>
|
||||
<string name="exp">EXP</string>
|
||||
<string name="new_rewards">Complete newcomer tasks for more rewards</string>
|
||||
<string name="receive_awards">ReceiveAwards</string>
|
||||
|
||||
|
||||
<string name="send">Send out</string>
|
||||
|
@ -621,7 +621,8 @@
|
||||
<string name="no_medal">TA還沒有勛章</string>
|
||||
<string name="car">座駕</string>
|
||||
<string name="no_car">TA還沒有座騎</string>
|
||||
|
||||
<string name="welcome_pdlive">歡迎來到PDLIVE</string>
|
||||
<string name="newcomer">恭喜你獲得了新人獎勵</string>
|
||||
|
||||
<string name="FILE_PROVIDER">com.pdlive.shayu.fileprovider</string>
|
||||
<string name="ren">人</string>
|
||||
@ -744,7 +745,9 @@
|
||||
<string name="send_buy">開通了</string>
|
||||
<string name="send_buy_renewed">續費了</string>
|
||||
<string name="enter_room"> 進入直播間</string>
|
||||
|
||||
<string name="exp">经验</string>
|
||||
<string name="receive_awards">領取獎勵</string>
|
||||
<string name="new_rewards">完成新人任務領取更多獎勵</string>
|
||||
<string name="golden_bean">金豆</string>
|
||||
<string name="encourage_give_text">給這篇動態的作者鼓鼓勵吧!</string>
|
||||
<string name="confirm_give">確認鼓勵</string>
|
||||
|
@ -58,6 +58,7 @@ import com.yunbao.live.bean.LivePKUserListBean;
|
||||
import com.yunbao.live.bean.LiveUserGiftBean;
|
||||
import com.yunbao.live.dialog.BlowkissDialog;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.dialog.NewUserDialog;
|
||||
import com.yunbao.live.event.LinkMicTxAccEvent;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
@ -82,6 +83,7 @@ import com.yunbao.live.views.LivePlayTxViewHolder;
|
||||
import com.yunbao.live.views.LiveRoomPlayViewHolder;
|
||||
import com.yunbao.live.views.LiveRoomViewHolder;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
@ -100,6 +102,7 @@ import io.rong.imlib.model.Conversation;
|
||||
import io.rong.message.TextMessage;
|
||||
import pl.droidsonroids.gif.GifImageView;
|
||||
|
||||
import static com.yunbao.common.CommonAppConfig.isNewUser;
|
||||
import static com.yunbao.common.CommonAppContext.logger;
|
||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||
import static com.yunbao.live.presenter.LiveLinkMicPresenter.mBannerList2;
|
||||
@ -181,6 +184,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
|
||||
liveImDeletUtil = new LiveImDeletUtil();
|
||||
if (getIntent().getIntExtra("isry", 0) == 1) {
|
||||
isRy = true;
|
||||
@ -321,6 +325,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
countDownTimer = new CountDownTimer(CommonAppConfig.getInstance().alert_end_time * 1000, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
|
||||
if (isNewUser == true && timeIndex == 5 ){
|
||||
NewUserDialog fragment1 = new NewUserDialog();
|
||||
fragment1.show(((LiveActivity) mContext).getSupportFragmentManager(), "NewUserDialog");
|
||||
}
|
||||
if (timeIndex == CommonAppConfig.getInstance().alert_time) {
|
||||
if (mLiveRoomViewHolder.isAttention == 0) {
|
||||
BlowkissDialog fragment1 = new BlowkissDialog();
|
||||
|
@ -21,6 +21,8 @@ import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import static com.yunbao.live.activity.LiveAudienceActivity.countDownTimer;
|
||||
@ -89,61 +91,24 @@ public class NewUserDialog extends AbsDialogFragment {
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
ImageView btn_close = (ImageView) mRootView.findViewById(R.id.btn_close);
|
||||
btn_close.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
RelativeLayout btn_rose = (RelativeLayout) mRootView.findViewById(R.id.btn_rose);
|
||||
RelativeLayout btn_roses = (RelativeLayout) mRootView.findViewById(R.id.btn_roses);
|
||||
RelativeLayout btn_lollipop = (RelativeLayout) mRootView.findViewById(R.id.btn_lollipop);
|
||||
|
||||
|
||||
TextView btn_confirm = (TextView) mRootView.findViewById(R.id.btn_confirm);
|
||||
btn_rose.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
gif = 1;
|
||||
gif_id = 210;
|
||||
btn_rose.setBackgroundResource(R.drawable.button_ffb6c4);
|
||||
btn_roses.setBackgroundResource(R.drawable.button_fff8f6f8);
|
||||
btn_lollipop.setBackgroundResource(R.drawable.button_fff8f6f8);
|
||||
}
|
||||
});
|
||||
|
||||
btn_roses.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
gif = 2;
|
||||
gif_id = 224;
|
||||
btn_rose.setBackgroundResource(R.drawable.button_fff8f6f8);
|
||||
btn_roses.setBackgroundResource(R.drawable.button_ffb6c4);
|
||||
btn_lollipop.setBackgroundResource(R.drawable.button_fff8f6f8);
|
||||
}
|
||||
});
|
||||
|
||||
btn_lollipop.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
gif = 0;
|
||||
gif_id = 1093;
|
||||
btn_rose.setBackgroundResource(R.drawable.button_fff8f6f8);
|
||||
btn_roses.setBackgroundResource(R.drawable.button_fff8f6f8);
|
||||
btn_lollipop.setBackgroundResource(R.drawable.button_ffb6c4);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
btn_confirm.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
follow();
|
||||
LiveHttpUtil.sendGift("0", mLiveUid, LiveActivity.mStream, gif_id, "1", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
});
|
||||
countDownTimer.cancel();
|
||||
// follow();
|
||||
// LiveHttpUtil.sendGift("0", mLiveUid, LiveActivity.mStream, gif_id, "1", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// ToastUtil.show(msg);
|
||||
// }
|
||||
// });
|
||||
EventBus.getDefault().post("showBanner");
|
||||
EventBus.getDefault().post("svga_new_user_gif");
|
||||
|
||||
// countDownTimer.cancel();
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
@ -68,6 +68,8 @@ import com.yunbao.live.views.LiveLinkMicPushTxViewHolder;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -112,8 +114,9 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
private ImageView imgEvent;
|
||||
private String eventUrl;
|
||||
private Banner mBanner1;
|
||||
public static Banner mBanner2;
|
||||
public static Banner mBanner2,mBanner3;
|
||||
private List<BannerBean> mBannerList1 = new ArrayList<>();
|
||||
private List<BannerBean> mBannerList3 = new ArrayList<>();
|
||||
|
||||
public static List<BannerBean> mBannerList2 = new ArrayList<>();
|
||||
public static CountDownView date;
|
||||
@ -121,8 +124,16 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
public static String link = "";
|
||||
LinearLayout btn_event2;
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
if ("showBanner".equals(str)) {
|
||||
showBanner3();
|
||||
}
|
||||
}
|
||||
public LiveLinkMicPresenter(Context context, ILiveLinkMicViewHolder linkMicViewHolder, boolean isAnchor, int liveSdk, View root) {
|
||||
mContext = context;
|
||||
EventBus.getDefault().register(this);
|
||||
mRoot = root;
|
||||
mIsAnchor = isAnchor;
|
||||
mLiveSdk = liveSdk;
|
||||
@ -139,6 +150,9 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
btnEvent = root.findViewById(R.id.btn_event);
|
||||
mBanner1 = (Banner) root.findViewById(R.id.banner1);
|
||||
mBanner2 = (Banner) root.findViewById(R.id.banner2);
|
||||
mBanner3 = (Banner) root.findViewById(R.id.banner3);
|
||||
|
||||
|
||||
btn_event2 = root.findViewById(R.id.btn_event2);
|
||||
mBanner1.setOutlineProvider(new ViewOutlineProvider() {
|
||||
@Override
|
||||
@ -152,13 +166,32 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
}
|
||||
});
|
||||
|
||||
mBanner3.setOutlineProvider(new ViewOutlineProvider() {
|
||||
@Override
|
||||
public void getOutline(View view, Outline outline) {
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
}
|
||||
});
|
||||
//周星
|
||||
BannerBean bannerBean = new BannerBean();
|
||||
bannerBean.setImageUrl("https://qny.shayucm.com/img/BTN_WEEKSTAR%20%281%29.png");
|
||||
bannerBean.setLink("zxb");
|
||||
mBannerList1.add(bannerBean);
|
||||
|
||||
BannerBean banner3Bean = new BannerBean();
|
||||
banner3Bean.setImageUrl("https://qny.shayucm.com/live_Mission_box.png");
|
||||
banner3Bean.setLink("lw");
|
||||
mBannerList3.add(banner3Bean);
|
||||
BannerBean banner3Bean1 = new BannerBean();
|
||||
banner3Bean1.setImageUrl("https://qny.shayucm.com/live_Mission_box.png");
|
||||
banner3Bean1.setLink("gz");
|
||||
mBannerList3.add(banner3Bean1);
|
||||
|
||||
BannerBean banner3Bean2 = new BannerBean();
|
||||
banner3Bean2.setImageUrl("https://qny.shayucm.com/live_Mission_box.png");
|
||||
banner3Bean2.setLink("dl");
|
||||
mBannerList3.add(banner3Bean2);
|
||||
|
||||
btn_onecz_event = root.findViewById(R.id.btn_onecz_event);
|
||||
btn_onecz_event.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -746,6 +779,31 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
private void showBanner3() {
|
||||
if (mBannerList3 == null || mBannerList3.size() == 0 || mBanner3 == null) {
|
||||
return;
|
||||
}
|
||||
mBanner1.setAutoPlay(true)
|
||||
.setPages(mBannerList3, new CustomViewHolder())
|
||||
.setDelayTime(3000)
|
||||
.setBannerStyle(BannerConfig.NOT_INDICATOR)
|
||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
if (mBannerList3 != null) {
|
||||
if (p >= 0 && p < mBannerList3.size()) {
|
||||
BannerBean bean = mBannerList3.get(p);
|
||||
if (bean != null) {
|
||||
String link = bean.getLink();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
|
||||
//获取活动
|
||||
private void getEvent() {
|
||||
if (btn_onecz_event != null) {
|
||||
|
@ -56,31 +56,28 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
private TextView tv_trickery_time;
|
||||
private View v_msg_redpoint;
|
||||
private Activity context;
|
||||
private SVGAImageView svga_new_user_gif;
|
||||
private SVGAImageView svga_new_user_gif,svga_new_user_double,svga_new_user_follow;
|
||||
|
||||
public LiveAudienceViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
this.context = (Activity) context;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_live_audience;
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
if ("svga_new_user_gif".equals(str)) {
|
||||
svga_new_user_gif();
|
||||
}else if ("svga_new_user_double".equals(str)) {
|
||||
svga_new_user_double();
|
||||
}else if ("svga_new_user_follow".equals(str)) {
|
||||
svga_new_user_follow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
findViewById(R.id.btn_close).setOnClickListener(this);
|
||||
findViewById(R.id.btn_share).setOnClickListener(this);
|
||||
findViewById(R.id.btn_red_pack).setOnClickListener(this);
|
||||
findViewById(R.id.btn_gift).setOnClickListener(this);
|
||||
findViewById(R.id.btn_zg).setOnClickListener(this);
|
||||
svga_new_user_gif = (SVGAImageView)findViewById(R.id.svga_new_user_gif);
|
||||
private void svga_new_user_gif(){
|
||||
new SVGAParser(mContext).decodeFromAssets("free_gift_tip.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
ToastUtil.show("1212");
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
svga_new_user_gif.setImageDrawable(drawable);
|
||||
svga_new_user_gif.startAnimation();
|
||||
@ -91,6 +88,55 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
Log.e("errqs","errl");
|
||||
}
|
||||
});
|
||||
}
|
||||
private void svga_new_user_double() {
|
||||
new SVGAParser(mContext).decodeFromAssets("double_click_tip.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
svga_new_user_double.setImageDrawable(drawable);
|
||||
svga_new_user_double.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
Log.e("errqs", "errl");
|
||||
}
|
||||
});
|
||||
}
|
||||
private void svga_new_user_follow() {
|
||||
new SVGAParser(mContext).decodeFromAssets("live_follow_tip.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
svga_new_user_follow.setImageDrawable(drawable);
|
||||
svga_new_user_follow.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
Log.e("errqs", "errl");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_live_audience;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
EventBus.getDefault().register(this);
|
||||
findViewById(R.id.btn_close).setOnClickListener(this);
|
||||
findViewById(R.id.btn_share).setOnClickListener(this);
|
||||
findViewById(R.id.btn_red_pack).setOnClickListener(this);
|
||||
findViewById(R.id.btn_gift).setOnClickListener(this);
|
||||
findViewById(R.id.btn_zg).setOnClickListener(this);
|
||||
svga_new_user_gif = (SVGAImageView)findViewById(R.id.svga_new_user_gif);
|
||||
svga_new_user_double = (SVGAImageView)findViewById(R.id.svga_new_user_double);
|
||||
svga_new_user_follow = (SVGAImageView)findViewById(R.id.svga_new_user_follow);
|
||||
|
||||
findViewById(R.id.btn_mic).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -135,7 +181,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
v_msg_redpoint = (View) findViewById(R.id.v_msg_redpoint);
|
||||
//获取系统未读消息
|
||||
MessageIMManager.get(context).getSystemMessages();
|
||||
EventBus.getDefault().register(LiveAudienceViewHolder.this);
|
||||
}
|
||||
|
||||
public static Handler handler = new Handler();
|
||||
|
9
live/src/main/res/drawable/border_fdbe40.xml
Normal file
9
live/src/main/res/drawable/border_fdbe40.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="30dp" />
|
||||
<solid android:color="#fdbe40 " />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -8,244 +8,162 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:layout_height="500dp"
|
||||
android:background="@mipmap/live_new_tip"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="50dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="220dp"
|
||||
android:layout_width="133dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_blowkiss"
|
||||
android:textColor="#ff161616"
|
||||
android:layout_marginTop="50dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/welcome_pdlive"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="#fff7b55a"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_blowkiss_reply"
|
||||
android:textColor="#ffb1b1b1"
|
||||
android:text="@string/newcomer"
|
||||
android:textColor="#ff1a1a1a"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textSize="14sp"/>
|
||||
android:layout_marginBottom="20dp"
|
||||
/>
|
||||
|
||||
<RelativeLayout android:id="@+id/btn_rose"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="13dp"
|
||||
android:background="@drawable/button_fff8f6f8">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/gif_rose"/>
|
||||
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginLeft="22dp"
|
||||
android:layout_marginRight="22dp"
|
||||
android:background="@mipmap/freegift_box">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/live_blowkiss_rose"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:textColor="#ff565252"
|
||||
android:textSize="12sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="一次免費贈送禮物特權!"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout android:id="@+id/aa"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="22dp"
|
||||
android:layout_marginRight="22dp"
|
||||
android:background="@mipmap/jindou_box">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_alignParentRight="true">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/golden_bean"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="20"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#ff565252"
|
||||
android:textColor="#fffff69f"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_diamond"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout android:id="@+id/btn_roses"
|
||||
<RelativeLayout android:id="@+id/aa1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="13dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/button_fff8f6f8">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_rosebouquet"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/live_blowkiss_roses"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:textColor="#ff565252"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="22dp"
|
||||
android:layout_marginRight="22dp"
|
||||
android:background="@mipmap/exp_box">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_alignParentRight="true">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="500"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#ff565252"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/exp"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_diamond"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="20"
|
||||
android:textColor="#fffff69f"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout android:id="@+id/btn_lollipop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_rewards"
|
||||
android:textColor="#ffb3b3b3"
|
||||
android:textSize="10sp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="13dp"
|
||||
android:background="@drawable/button_ffb6c4">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_lollipop"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/live_blowkiss_lollipop"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:textColor="#ff565252"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_alignParentRight="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_blowkiss_time"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#ff565252"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_diamond"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/live_blowkiss_follow"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/receive_awards"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/button_ffffbf2f"/>
|
||||
android:background="@drawable/border_fdbe40"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true">
|
||||
<ImageView
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@mipmap/icon_love"/>
|
||||
|
||||
<ImageView android:id="@+id/btn_close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:src="@mipmap/icon_live_user_5"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
@ -56,6 +56,27 @@
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_event3"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="68dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner3"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="68dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -418,12 +439,32 @@
|
||||
android:id="@+id/svga_new_user_gif"
|
||||
android:layout_width="116dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:autoPlay="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_new_user_double"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@mipmap/black_bg"
|
||||
app:autoPlay="true"/>
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_new_user_follow"
|
||||
android:layout_width="116dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_marginLeft="100dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:autoPlay="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
BIN
live/src/main/res/mipmap-xhdpi/black_bg.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/black_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
live/src/main/res/mipmap-xhdpi/exp_box.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/exp_box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
live/src/main/res/mipmap-xhdpi/freegift_box.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/freegift_box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
live/src/main/res/mipmap-xhdpi/jindou_box.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/jindou_box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@ -665,78 +665,76 @@ public class EntryActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void callback(UserBean bean) {
|
||||
|
||||
if (mFirstLogin) {
|
||||
//绑定广告渠道用户
|
||||
AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
||||
adjustEvent.addCallbackParameter("userid", "bar");
|
||||
Adjust.trackEvent(adjustEvent);
|
||||
|
||||
//完成第三方登录
|
||||
if(mLoginType.equals("twitter")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("ea6lld", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_twitter", null);
|
||||
logger.logEvent("FB_reg_twitter");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else if(mLoginType.equals("facebook")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("5jbk95");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("5jbk95", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_fb", null);
|
||||
logger.logEvent("FB_reg_fb");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else if(mLoginType.equals("google")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("krap47");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("krap47", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_google", null);
|
||||
logger.logEvent("FB_reg_google");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else if(mLoginType.equals("line")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("uaacbn");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
|
||||
CommonHttpUtil.setAdvertisingChannels("uaacbn", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_line", null);
|
||||
logger.logEvent("FB_reg_line");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class));
|
||||
}else{
|
||||
gotoLive("97714");
|
||||
//
|
||||
// if (mFirstLogin) {
|
||||
// //绑定广告渠道用户
|
||||
// AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
||||
// adjustEvent.addCallbackParameter("userid", "bar");
|
||||
// Adjust.trackEvent(adjustEvent);
|
||||
//
|
||||
// //完成第三方登录
|
||||
// if(mLoginType.equals("twitter")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
// CommonHttpUtil.setAdvertisingChannels("ea6lld", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_twitter", null);
|
||||
// logger.logEvent("FB_reg_twitter");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }else if(mLoginType.equals("facebook")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("5jbk95");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
// CommonHttpUtil.setAdvertisingChannels("5jbk95", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_fb", null);
|
||||
// logger.logEvent("FB_reg_fb");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }else if(mLoginType.equals("google")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("krap47");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
// CommonHttpUtil.setAdvertisingChannels("krap47", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_google", null);
|
||||
// logger.logEvent("FB_reg_google");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }else if(mLoginType.equals("line")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("uaacbn");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
//
|
||||
// CommonHttpUtil.setAdvertisingChannels("uaacbn", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_line", null);
|
||||
// logger.logEvent("FB_reg_line");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
// EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class));
|
||||
// }else{
|
||||
// gotoLive("97714");
|
||||
// MainActivity.forward(EntryActivity.this, false);
|
||||
// }
|
||||
// } else {
|
||||
// MainActivity.forward(EntryActivity.this, false);
|
||||
// }
|
||||
// EntryActivity.activity.finish();
|
||||
MainActivity.forward(EntryActivity.this, false);
|
||||
}
|
||||
} else {
|
||||
MainActivity.forward(EntryActivity.this, false);
|
||||
}
|
||||
EntryActivity.activity.finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -245,6 +245,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
|
||||
ConversationIMListManager.get(this);
|
||||
//谷歌支付
|
||||
GoogleBillingUtil.setIsAutoAcknowledgePurchase(true);//设置自动确认购买
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.yunbao.main.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import android.view.Gravity;
|
||||
@ -12,6 +13,8 @@ import android.widget.TextView;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
@ -21,7 +24,12 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.EntryActivity;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.logger;
|
||||
@ -104,7 +112,21 @@ public class OneLoginDialog extends AbsDialogFragment {
|
||||
}
|
||||
}
|
||||
});
|
||||
HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor")
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
.params("token", CommonAppConfig.getInstance().getToken())
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (info[0]!=null) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
CommonAppConfig.isNewUser = true;
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
}else{
|
||||
MainActivity.forward(getContext(), false);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (msg.contains("暱稱重複,請重新輸入")) {
|
||||
ToastUtil.show(R.string.edit_one_5);
|
||||
@ -120,4 +142,34 @@ public class OneLoginDialog extends AbsDialogFragment {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||
|
||||
private void gotoLive(final String live_id) {
|
||||
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
} else {
|
||||
MainActivity.forward(mContext, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user