Commit fed258b5 authored by mengcuiguang's avatar mengcuiguang

1.1.3发版

parent fb4ea988
......@@ -11,8 +11,8 @@ android {
applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 13
versionName "1.1.2"
versionCode 14
versionName "1.1.3"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -268,4 +268,6 @@ public interface Constant {
String EVENT_TYPE_TWO = "2";
String EVENT_TYPE_THREE = "3";
String EVENT_TYPE_FOUR = "4";
String FRIENDS_SHOWPAGEFLAG = "FRIENDS_SHOWPAGEFLAG";
}
\ No newline at end of file
package com.mints.highgold.ui.activitys;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.view.ViewGroup;
......@@ -47,15 +48,16 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
@Bind(R.id.tv_friendsnew_share)
TextView tvFriendsnewShare;
public static final String share_title = "【1元提现】帮我点一下,各得71元,我都提现100多了。";
public static final String share_text = "每天十分钟,赚到14000,当天即可提现。";
public static final String share_title = "【赚钱啦】邀请好友得100元高额奖励!快点来赚钱吧!";
public static final String share_text = "每邀请一个徒弟完成任务,就可赚到100元,徒弟越多奖励越多。";
private Drawable drawable;
private String shareUrl;
private InsertScreenAdManager insertScreenAd;
private int showPageFlag = 0;//0-默认邀请好友, 1-新邀请好友
@Override
protected int getContentViewLayoutID() {
return R.layout.activity_friends_new;
......@@ -64,16 +66,18 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
@Override
protected void initViewsAndEvents() {
tvActivityTitle.setText("邀好友,赚金币");
tvFriendsnewShare.setText(new SpanUtils().append("分享到微信群,成功率提升")
.append("300%").setForegroundColor(getResources().getColor(R.color.red))
.create());
drawable = ContextCompat.getDrawable(getContext(), R.mipmap.ic_launcher);
shareUrl = BuildConfig.MainIp + "login.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share";
if (showPageFlag == 0) {
getFriendsUrl();
} else {
String url = BuildConfig.MainIp + "share/rewardRule.html";
blFriendsnewWebview.loadUrl(url);
}
insertScreenAd = new InsertScreenAdManager(FriendsNewActivity.this);
if (UserManager.getInstance().getAdShowFlag()) {
......@@ -86,6 +90,14 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
return false;
}
@Override
protected void getBundleExtras(Bundle extras) {
super.getBundleExtras(extras);
showPageFlag = extras.getInt(Constant.FRIENDS_SHOWPAGEFLAG, 0);
}
@Override
protected void onDestroy() {
super.onDestroy();
......@@ -100,6 +112,7 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
}
if (insertScreenAd != null) {
insertScreenAd.setNextShowInteractionAd();
insertScreenAd.ondestory();
}
}
......@@ -118,9 +131,13 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
finish();
break;
case R.id.share_weixin:
Wechat.ShareParams wechat_sp = new Wechat.ShareParams();
wechat_sp.setShareType(Platform.SHARE_IMAGE);
wechat_sp.setImageData(ImageUtil.drawableToBitmap(ContextCompat.getDrawable(getContext(), R.mipmap.bg_friendsnew_wechat)));
wechat_sp.setShareType(Platform.SHARE_WEBPAGE);
wechat_sp.setTitle(share_title);
wechat_sp.setText(share_text);
wechat_sp.setImageData(ImageUtil.drawableToBitmap(drawable));
wechat_sp.setUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_wechat");
Platform wechat = ShareSDK.getPlatform(Wechat.NAME);
if (wechat.isClientValid()) {
wechat.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调
......@@ -132,8 +149,11 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
break;
case R.id.share_friends:
WechatMoments.ShareParams wechat_f_sp = new WechatMoments.ShareParams();
wechat_f_sp.setShareType(Platform.SHARE_IMAGE);
wechat_f_sp.setImageData(ImageUtil.drawableToBitmap(ContextCompat.getDrawable(getContext(), R.mipmap.bg_friendsnew_friends)));
wechat_f_sp.setShareType(Platform.SHARE_WEBPAGE);
wechat_f_sp.setTitle(share_title);
wechat_f_sp.setText(share_text);
wechat_f_sp.setUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_friends");
wechat_f_sp.setImageData(ImageUtil.drawableToBitmap(drawable));
Platform wechat_f = ShareSDK.getPlatform(WechatMoments.NAME);
if (wechat_f.isClientValid()) {
wechat_f.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调
......@@ -149,10 +169,10 @@ public class FriendsNewActivity extends BaseActivity implements PlatformActionLi
// sp.setImageUrl("https://mints-gs.oss-cn-beijing.aliyuncs.com/pkg/mints_share/%E5%88%86%E4%BA%AB%E9%A1%B5%E5%A4%87%E4%BB%BD-QQ.png");
// sp.setShareType(Platform.SHARE_IMAGE);
sp.setTitle(share_title);
sp.setTitleUrl(shareUrl); // 标题的超链接
sp.setTitleUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_qq"); // 标题的超链接
sp.setText(share_text);
sp.setSite(getString(R.string.app_name));
sp.setSiteUrl(shareUrl);
sp.setSiteUrl(BuildConfig.MainIp + "share/shareFriend.html?ruid=" + UserManager.getInstance().getUserID() + "&channel=android_share_qq");
Platform qq = ShareSDK.getPlatform(QQ.NAME);
if (qq.isClientValid()) {
qq.setPlatformActionListener(FriendsNewActivity.this); // 设置分享事件回调
......
......@@ -302,7 +302,9 @@ public class MyFragment extends BaseFragment
// readyGo(YilanVedioActivity.class);
break;
case Constant.HOT_ACTIVITY_YQHY:
readyGo(FriendsNewActivity.class);
Bundle bundle = new Bundle();
bundle.putInt(Constant.FRIENDS_SHOWPAGEFLAG, 1);
readyGo(FriendsNewActivity.class, bundle);
break;
default:
showToast("该热门活动暂未开放");
......@@ -328,7 +330,7 @@ public class MyFragment extends BaseFragment
String code = data.getIdcode();
if (!TextUtils.isEmpty(code)) {
tvMyInvitecode.setText("邀请码:" + code);
tvMyInvitecode.setText("ID:" + code);
}
userConfig = data;
......@@ -476,6 +478,9 @@ public class MyFragment extends BaseFragment
if (TextUtils.equals(id, "rotationrcNews")) {
// 新闻资讯 兼容h5 iframe
readyGo(NewsWebviewActivity.class, bundle);
} else if (TextUtils.equals(id, "rotationcrFriend")) {
bundle.putInt(Constant.FRIENDS_SHOWPAGEFLAG, 1);
readyGo(FriendsNewActivity.class, bundle);
} else {
readyGo(WebActivity.class, bundle);
}
......
......@@ -623,7 +623,9 @@ public class VersusFragment extends BaseFragment
break;
case R.id.ll_versus_friends://邀请好友
case R.id.tv_versus_friends:
readyGo(FriendsNewActivity.class);
bundle = new Bundle();
bundle.putInt(Constant.FRIENDS_SHOWPAGEFLAG, 1);
readyGo(FriendsNewActivity.class,bundle);
break;
case R.id.ll_versus_drinkday://每日喝水达标
case R.id.tv_versus_drinkday:
......@@ -996,26 +998,26 @@ public class VersusFragment extends BaseFragment
viewVersusExchange.setVisibility(View.GONE);
}
//填写邀请码 Complete 0-未完成 1-完成 2-领取
int challengeIdcodeComplete = data.getChallenge_idcode_complete();
if (challengeIdcodeComplete == 0) {
llVersusCode.setVisibility(View.VISIBLE);
viewVersusCode.setVisibility(View.VISIBLE);
tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin());
tvVersusCode.setText("去完成");
tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
} else if (challengeIdcodeComplete == 1) {
llVersusCode.setVisibility(View.VISIBLE);
viewVersusCode.setVisibility(View.VISIBLE);
tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin());
tvVersusCode.setText("立即领取");
tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
} else {
llVersusCode.setVisibility(View.GONE);
viewVersusCode.setVisibility(View.GONE);
}
// //填写邀请码 Complete 0-未完成 1-完成 2-领取
// int challengeIdcodeComplete = data.getChallenge_idcode_complete();
// if (challengeIdcodeComplete == 0) {
// llVersusCode.setVisibility(View.VISIBLE);
// viewVersusCode.setVisibility(View.VISIBLE);
// tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin());
// tvVersusCode.setText("去完成");
// tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
//
// } else if (challengeIdcodeComplete == 1) {
// llVersusCode.setVisibility(View.VISIBLE);
// viewVersusCode.setVisibility(View.VISIBLE);
// tvVersusCodeGold.setText("+" + data.getChallenge_idcode_coin());
// tvVersusCode.setText("立即领取");
// tvVersusCode.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
//
// } else {
// llVersusCode.setVisibility(View.GONE);
// viewVersusCode.setVisibility(View.GONE);
// }
//绑定微信号 Complete 0-未完成 1-完成 2-领取
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment