|
|
@@ -13,7 +13,6 @@ import android.webkit.WebView;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
|
import android.widget.RelativeLayout;
|
|
|
-import android.widget.ScrollView;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import com.kfzs.duanduan.fragment.FgtFriendExtractPage;
|
|
|
@@ -24,19 +23,13 @@ import com.sheep.gamegroup.di.modules.AskGetMoneyModule;
|
|
|
import com.sheep.gamegroup.model.entity.AskAward;
|
|
|
import com.sheep.gamegroup.model.entity.AskTop;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
-import com.sheep.gamegroup.model.entity.BulletinEnty;
|
|
|
-import com.sheep.gamegroup.model.entity.DialogConfig;
|
|
|
import com.sheep.gamegroup.model.entity.FriendAndAwardEntity;
|
|
|
-import com.sheep.gamegroup.model.entity.TaskEty;
|
|
|
-import com.sheep.gamegroup.model.entity.TaskReleaseEty;
|
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
-import com.sheep.gamegroup.model.entity.XiaomiGameEntity;
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.gamegroup.presenter.AskGetMoneyContract;
|
|
|
import com.sheep.gamegroup.presenter.AskGetMoneyPresenter;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
-import com.sheep.gamegroup.util.StringUtils;
|
|
|
import com.sheep.gamegroup.util.ViewHolder;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
|
|
|
@@ -46,11 +39,8 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
import com.sunfusheng.marqueeview.MarqueeView;
|
|
|
-import com.umeng.socialize.ShareAction;
|
|
|
import com.umeng.socialize.UMShareListener;
|
|
|
import com.umeng.socialize.bean.SHARE_MEDIA;
|
|
|
-import com.umeng.socialize.media.UMImage;
|
|
|
-import com.umeng.socialize.media.UMWeb;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Locale;
|
|
|
@@ -58,17 +48,10 @@ import java.util.Locale;
|
|
|
import javax.inject.Inject;
|
|
|
|
|
|
import butterknife.BindView;
|
|
|
-import butterknife.OnClick;
|
|
|
import rx.android.schedulers.AndroidSchedulers;
|
|
|
import rx.functions.Action1;
|
|
|
import rx.schedulers.Schedulers;
|
|
|
|
|
|
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.LINK_SHARE;
|
|
|
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.QR_COPY;
|
|
|
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.SHARE_TO_QQ;
|
|
|
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.SHARE_TO_WX;
|
|
|
-import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
|
|
|
-
|
|
|
/**
|
|
|
* Created by Administrator on 2018/3/19.
|
|
|
*/
|
|
|
@@ -311,60 +294,6 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- private void shareToWX() {
|
|
|
- shareToOther(1);
|
|
|
- }
|
|
|
-
|
|
|
- private void shareToQQ() {
|
|
|
- shareToOther(2);
|
|
|
- }
|
|
|
-
|
|
|
- private void shareToOther(int code) {
|
|
|
- if (userEntity == null) {
|
|
|
- G.showToast("数据正在加载中");
|
|
|
- return;
|
|
|
- }
|
|
|
- ShareAction shareAction = new ShareAction(AskGetMoneyAct.this);
|
|
|
- if (code == 1) {
|
|
|
- shareAction.setPlatform(SHARE_MEDIA.WEIXIN);
|
|
|
- CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "wx", mEntity.getShare_desc());
|
|
|
- CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink("wx"), "wx",mEntity.getShare_desc());
|
|
|
- } else {
|
|
|
- shareAction.setPlatform(SHARE_MEDIA.QQ);
|
|
|
- CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "qq", mEntity.getShare_desc());
|
|
|
- CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink("qq"), "qq",mEntity.getShare_desc());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- private void shareToLink() {
|
|
|
- if (userEntity == null) {
|
|
|
- G.showToast("数据正在加载中");
|
|
|
- return;
|
|
|
- }
|
|
|
- LINK_SHARE.onEvent();
|
|
|
- ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("分享链接").setMsg(userEntity.getShareLink())
|
|
|
- .setMsgMore("通过连接加入小绵羊即可成为你的好友").setMsgMoreColor(R.color.txt_black_9e9c9c)
|
|
|
- .setBtnLeftText("复制链接").setBtnLeftOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
- QR_COPY.onEvent();
|
|
|
- StringUtils.CopyText(userEntity.getShareLink());
|
|
|
- G.showToast("复制链接成功");
|
|
|
- }
|
|
|
- }));
|
|
|
- ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("分享链接").setMsg(userEntity.getShareLink("other"))
|
|
|
- .setMsgMore("通过连接加入小绵羊即可成为你的好友").setMsgMoreColor(R.color.txt_black_9e9c9c)
|
|
|
- .setBtnLeftText("复制链接").setBtnLeftOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
- QR_COPY.onEvent();
|
|
|
- StringUtils.CopyText(userEntity.getShareLink("other"));
|
|
|
- G.showToast("复制链接成功");
|
|
|
- }
|
|
|
- }));
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
@Override
|
|
|
public void onStart(SHARE_MEDIA share_media) {
|
|
|
@@ -413,33 +342,6 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
|
|
|
}
|
|
|
|
|
|
|
|
|
- @OnClick({R.id.rl_wx, R.id.rl_qq, R.id.rl_qr, R.id.rl_link})
|
|
|
- public void onViewClicked(View view) {
|
|
|
- try {
|
|
|
- switch (view.getId()) {
|
|
|
- case R.id.rl_wx:
|
|
|
- shareToWX();
|
|
|
- SHARE_TO_WX.onEvent();
|
|
|
- break;
|
|
|
- case R.id.rl_qq:
|
|
|
- shareToQQ();
|
|
|
- SHARE_TO_QQ.onEvent();
|
|
|
- break;
|
|
|
- case R.id.rl_qr:
|
|
|
- if (userEntity == null) {
|
|
|
- G.showToast("数据正在加载中");
|
|
|
- break;
|
|
|
- }
|
|
|
- ViewUtil.showQR(AskGetMoneyAct.this, userEntity.getShareLink("other"));
|
|
|
- break;
|
|
|
- case R.id.rl_link:
|
|
|
- shareToLink();
|
|
|
- break;
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- G.showToast(R.string.loading_data);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
private SparseArray<FgtFriendExtractPage> mTestFragments;
|
|
|
|
|
|
@@ -481,7 +383,7 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
|
|
|
@Override
|
|
|
public void onPageSelected(int i) {
|
|
|
curPage = i + 1;
|
|
|
- friend_extract_page_tv.setText("" + curPage);
|
|
|
+ friend_extract_page_tv.setText(String.format(Locale.CHINA,"%d", curPage));
|
|
|
checkAddPage(curPage, mTestFragments.get(curPage).getList().size());
|
|
|
}
|
|
|
|
|
|
@@ -515,6 +417,8 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
|
|
|
}
|
|
|
//显示分享对话框
|
|
|
public void showShareView(View view) {
|
|
|
-
|
|
|
+ String url = userEntity.getShareLink();
|
|
|
+ String description = mEntity.getShare_desc();
|
|
|
+ ViewUtil.showShareDialog(activity, url, description);
|
|
|
}
|
|
|
}
|