|
|
|
|
@@ -18,7 +18,6 @@ import android.app.PendingIntent;
|
|
|
|
|
import android.content.ComponentName;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
import android.content.pm.ApplicationInfo;
|
|
|
|
|
import android.content.res.Resources;
|
|
|
|
|
import android.graphics.Bitmap;
|
|
|
|
|
import android.graphics.Color;
|
|
|
|
|
@@ -26,8 +25,6 @@ import android.net.Uri;
|
|
|
|
|
import android.os.Build;
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.os.Handler;
|
|
|
|
|
import android.os.PowerManager;
|
|
|
|
|
import android.provider.Settings;
|
|
|
|
|
import android.text.TextUtils;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
import android.view.KeyEvent;
|
|
|
|
|
@@ -47,7 +44,6 @@ import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
import androidx.annotation.RequiresApi;
|
|
|
|
|
import androidx.core.app.NotificationCompat;
|
|
|
|
|
import androidx.core.app.ServiceCompat;
|
|
|
|
|
import androidx.core.view.WindowCompat;
|
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
|
import androidx.lifecycle.ViewModelProvider;
|
|
|
|
|
@@ -61,7 +57,6 @@ import com.dskj.rbchat.AppSkinConfig;
|
|
|
|
|
import com.dskj.rbchat.CustomConfig;
|
|
|
|
|
import com.dskj.rbchat.IMApplication;
|
|
|
|
|
import com.dskj.rbchat.IMUIKitConfig;
|
|
|
|
|
import com.dskj.rbchat.NotificationMsgService;
|
|
|
|
|
import com.dskj.rbchat.R;
|
|
|
|
|
import com.dskj.rbchat.adapter.CommonAdapter;
|
|
|
|
|
import com.dskj.rbchat.adapter.ViewHolder;
|
|
|
|
|
@@ -72,6 +67,7 @@ import com.dskj.rbchat.dialog.PayCashDialog;
|
|
|
|
|
import com.dskj.rbchat.dialog.PayCashFingerDialog;
|
|
|
|
|
import com.dskj.rbchat.game.JsBridgeActivity;
|
|
|
|
|
import com.dskj.rbchat.main.authorize.AuthorizeActivity;
|
|
|
|
|
import com.dskj.rbchat.main.chat.ChatConversationFragment;
|
|
|
|
|
import com.dskj.rbchat.main.chat.ChatTabFragment;
|
|
|
|
|
import com.dskj.rbchat.main.home.HomeFragment;
|
|
|
|
|
import com.dskj.rbchat.main.mine.ChangeAccoutActionActivity;
|
|
|
|
|
@@ -80,6 +76,7 @@ import com.dskj.rbchat.main.mine.setting.SettingNotifyViewModel;
|
|
|
|
|
import com.dskj.rbchat.model.BindBean;
|
|
|
|
|
import com.dskj.rbchat.model.ConfigBean;
|
|
|
|
|
import com.dskj.rbchat.model.LoginBean;
|
|
|
|
|
import com.dskj.rbchat.model.MessagefcmBean;
|
|
|
|
|
import com.dskj.rbchat.model.UserShareBean;
|
|
|
|
|
import com.dskj.rbchat.model.WalletBean;
|
|
|
|
|
import com.dskj.rbchat.network.Api;
|
|
|
|
|
@@ -102,6 +99,7 @@ import com.dskj.rbchat.voom.VoomFragment;
|
|
|
|
|
import com.dskj.rbchat.wallet.SetPayPasswordActivity;
|
|
|
|
|
import com.dskj.rbchat.welcome.WelcomeActivity;
|
|
|
|
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
|
|
|
|
import com.google.gson.JsonObject;
|
|
|
|
|
import com.huawei.hms.hmsscankit.ScanUtilNew;
|
|
|
|
|
import com.huawei.hms.ml.scan.HmsScan;
|
|
|
|
|
import com.huawei.hms.ml.scan.HmsScanAnalyzerOptions;
|
|
|
|
|
@@ -115,6 +113,7 @@ import com.netease.nimlib.sdk.StatusCode;
|
|
|
|
|
import com.netease.nimlib.sdk.auth.AuthServiceObserver;
|
|
|
|
|
import com.netease.nimlib.sdk.avsignalling.constant.ChannelType;
|
|
|
|
|
import com.netease.nimlib.sdk.avsignalling.model.SignallingPushConfig;
|
|
|
|
|
import com.netease.nimlib.sdk.mixpush.MixPushService;
|
|
|
|
|
import com.netease.nimlib.sdk.msg.MessageBuilder;
|
|
|
|
|
import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum;
|
|
|
|
|
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
|
|
|
|
@@ -140,6 +139,7 @@ import com.netease.yunxin.kit.common.utils.UriUtils;
|
|
|
|
|
import com.netease.yunxin.kit.contactkit.ui.contact.BaseContactFragment;
|
|
|
|
|
import com.netease.yunxin.kit.contactkit.ui.utils.ColorUtils;
|
|
|
|
|
import com.netease.yunxin.kit.conversationkit.ui.common.ConversationConstant;
|
|
|
|
|
import com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean;
|
|
|
|
|
import com.netease.yunxin.kit.conversationkit.ui.page.ConversationBaseFragment;
|
|
|
|
|
import com.netease.yunxin.kit.corekit.event.BaseEvent;
|
|
|
|
|
import com.netease.yunxin.kit.corekit.event.EventCenter;
|
|
|
|
|
@@ -163,12 +163,16 @@ import com.netease.yunxin.nertc.ui.base.AVChatSoundPlayer;
|
|
|
|
|
import com.netease.yunxin.nertc.ui.base.SoundHelper;
|
|
|
|
|
import com.netease.yunxin.nertc.ui.base.UserInfoHelper;
|
|
|
|
|
|
|
|
|
|
import org.json.JSONException;
|
|
|
|
|
import org.json.JSONObject;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Comparator;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
|
|
import cn.jpush.android.api.JPushInterface;
|
|
|
|
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
|
|
|
|
@@ -268,10 +272,9 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
}
|
|
|
|
|
if (SettingRepo.isPushNotify() && messageInfo.getMsgType() != MsgTypeEnum.nrtc_netcall) { //音视频单话就结束后会发送一条信息
|
|
|
|
|
//收到私聊消息通知
|
|
|
|
|
if (messageInfo.getSessionType() == SessionTypeEnum.P2P && FriendProvider.INSTANCE.isNotify(messageInfo.getFromAccount())) {
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
|
|
|
setNotifications(messageInfo);
|
|
|
|
|
}
|
|
|
|
|
if ((messageInfo.getSessionType() == SessionTypeEnum.P2P && FriendProvider.INSTANCE.isNotify(messageInfo.getFromAccount())) ||
|
|
|
|
|
(messageInfo.getSessionType() == SessionTypeEnum.SUPER_TEAM) || (messageInfo.getSessionType() == SessionTypeEnum.Team)) {
|
|
|
|
|
setNotifications(event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@@ -283,32 +286,41 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
|
|
|
|
private void setNotifications(IMMessage messageInfo) {
|
|
|
|
|
|
|
|
|
|
Intent notifyIntent = new Intent();
|
|
|
|
|
ComponentName launchComponent = getApplication()
|
|
|
|
|
.getPackageManager()
|
|
|
|
|
.getLaunchIntentForPackage(getApplication().getPackageName())
|
|
|
|
|
.getComponent();
|
|
|
|
|
notifyIntent.setComponent(launchComponent);
|
|
|
|
|
private void setNotifications(List<IMMessageInfo> event) {
|
|
|
|
|
Intent notifyIntent = new Intent(this, MainActivity.class);
|
|
|
|
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
|
|
|
|
|
// ComponentName launchComponent = null;
|
|
|
|
|
// launchComponent = getApplication()
|
|
|
|
|
// .getPackageManager()
|
|
|
|
|
// .getLaunchIntentForPackage(getApplication().getPackageName())
|
|
|
|
|
// .getComponent();
|
|
|
|
|
// notifyIntent.setComponent(launchComponent);
|
|
|
|
|
// }
|
|
|
|
|
notifyIntent.putExtra("message", event.get(0).getMessage());
|
|
|
|
|
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
|
|
|
|
notifyIntent.setAction(Intent.ACTION_VIEW);
|
|
|
|
|
notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
|
|
|
|
|
|
|
|
|
|
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notifyIntent, PendingIntent.FLAG_IMMUTABLE);
|
|
|
|
|
PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_MUTABLE);
|
|
|
|
|
//获取本地设置消息铃声
|
|
|
|
|
NotificationManager notificationManager = (NotificationManager) IMApplication.getAppContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
|
|
|
|
|
|
|
|
|
String channelID = ChatDataUtils.getMessageBell(IMKitClient.getUserInfo());
|
|
|
|
|
LogUtils.d("channelId==" + channelID);
|
|
|
|
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
|
|
|
|
// IMMessage messageInfo = event.get(0).getMessage();
|
|
|
|
|
IMMessage messageInfo = event.get(0).getMessage();
|
|
|
|
|
String content = "";
|
|
|
|
|
String title = "";
|
|
|
|
|
if (messageInfo.getSessionType() == SessionTypeEnum.P2P) {
|
|
|
|
|
title = messageInfo.getFromNick();
|
|
|
|
|
} else {
|
|
|
|
|
Team team = NIMClient.getService(TeamService.class).queryTeamBlock(messageInfo.getSessionId());
|
|
|
|
|
title = team.getName();
|
|
|
|
|
}
|
|
|
|
|
if (!notifyViewModel.getPushShowNoDetail()) {
|
|
|
|
|
content = messageInfo.getContent();
|
|
|
|
|
} else {
|
|
|
|
|
if (messageInfo.getSessionType() == SessionTypeEnum.Team) {
|
|
|
|
|
if (messageInfo.getSessionType() == SessionTypeEnum.Team || messageInfo.getSessionType() == SessionTypeEnum.SUPER_TEAM) {
|
|
|
|
|
content = getString(R.string.message_notifycontent_team);
|
|
|
|
|
} else if (messageInfo.getSessionType() == SessionTypeEnum.P2P) {
|
|
|
|
|
content = getString(R.string.message_notifycontent_friend);
|
|
|
|
|
@@ -318,13 +330,12 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
}
|
|
|
|
|
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, channelID)
|
|
|
|
|
.setSmallIcon(R.mipmap.ic_launcher)
|
|
|
|
|
.setContentTitle(messageInfo.getFromNick())
|
|
|
|
|
.setContentTitle(title)
|
|
|
|
|
.setContentText(content)
|
|
|
|
|
.setContentIntent(pendingIntent)
|
|
|
|
|
.setAutoCancel(true)
|
|
|
|
|
.setPriority(NotificationCompat.PRIORITY_DEFAULT);
|
|
|
|
|
.setPriority(NotificationCompat.PRIORITY_HIGH);
|
|
|
|
|
notificationManager.notify(0, builder.build());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@@ -350,7 +361,6 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
|
|
|
|
|
private SettingNotifyViewModel notifyViewModel;
|
|
|
|
|
private Subscription mEventSubscription;
|
|
|
|
|
Intent notifyService;
|
|
|
|
|
|
|
|
|
|
@SuppressLint("NewApi")
|
|
|
|
|
@Override
|
|
|
|
|
@@ -370,6 +380,7 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
ALog.d(Constant.PROJECT_TAG, "MainActivity:onCreate");
|
|
|
|
|
notifyViewModel = new ViewModelProvider(this).get(SettingNotifyViewModel.class);
|
|
|
|
|
// IMApplication.isShowPushDetails = notifyViewModel.getPushShowNoDetail();
|
|
|
|
|
if (TextUtils.isEmpty(IMKitClient.account())) {
|
|
|
|
|
Intent intent = new Intent(this, WelcomeActivity.class);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
@@ -389,11 +400,12 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
ChatDataUtils.set(this, ChatKitUIConstant.SERVICES_LOGIN, false);
|
|
|
|
|
ChatKitUIConstant.isSendGiftRedPacket = DataUtils.getIsSendGiftRedPacket();
|
|
|
|
|
initView();
|
|
|
|
|
getServiceId();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ChatObserverRepo.registerReceiveMessageObserve(receiveMessageObserver);
|
|
|
|
|
EventCenter.registerEventNotify(skinNotify);
|
|
|
|
|
// EventCenter.registerEventNotify(skinNotify);
|
|
|
|
|
initNotifications();
|
|
|
|
|
getServiceId();
|
|
|
|
|
setConfig();
|
|
|
|
|
getWallet();
|
|
|
|
|
getConfig();
|
|
|
|
|
@@ -469,6 +481,7 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getNavigationBarHeight(Context context) {
|
|
|
|
|
@@ -477,18 +490,54 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
return resources.getDimensionPixelSize(resourceId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static final String TAG = "MainActivity";
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void onNewIntent(Intent intent) {
|
|
|
|
|
super.onNewIntent(intent);
|
|
|
|
|
setIntent(intent);
|
|
|
|
|
IMMessage message = (IMMessage) intent.getSerializableExtra("message");
|
|
|
|
|
if (message != null) {
|
|
|
|
|
if (message.getSessionType() == SessionTypeEnum.SUPER_TEAM || message.getSessionType() == SessionTypeEnum.Team) {
|
|
|
|
|
Team team = NIMClient.getService(TeamService.class).queryTeamBlock(message.getSessionId());
|
|
|
|
|
XKitRouter.withKey(RouterConstant.PATH_FUN_CHAT_TEAM_PAGE)
|
|
|
|
|
.withParam(RouterConstant.CHAT_KRY, team)
|
|
|
|
|
.withContext(this)
|
|
|
|
|
.navigate();
|
|
|
|
|
} else if (message.getSessionType() == SessionTypeEnum.P2P) {
|
|
|
|
|
XKitRouter.withKey(RouterConstant.PATH_FUN_CHAT_P2P_PAGE)
|
|
|
|
|
.withParam(RouterConstant.CHAT_ID_KRY, message.getSessionId() + "")
|
|
|
|
|
.withContext(this)
|
|
|
|
|
.navigate();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
LogUtils.i("111111111111111110ZZZZZZZZYYYYYYYYY:" + IMApplication.schemeUserId);
|
|
|
|
|
|
|
|
|
|
gotoSheme();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void gotoSheme() {
|
|
|
|
|
LogUtils.i("111111111111111110ZZZZZZZZXXXXXXXXXX:" + IMApplication.schemeUserId);
|
|
|
|
|
|
|
|
|
|
if (!TextUtils.isEmpty(IMApplication.fcmpayload)) {
|
|
|
|
|
// {"sessiontype":"1","sessionid":"61330143"}
|
|
|
|
|
MessagefcmBean messagefcmBean = GsonUtils.getObjFromJSON(IMApplication.fcmpayload, MessagefcmBean.class);
|
|
|
|
|
if (messagefcmBean != null) {
|
|
|
|
|
if (messagefcmBean.getSessiontype() == 1) {
|
|
|
|
|
XKitRouter.withKey(RouterConstant.PATH_FUN_CHAT_P2P_PAGE)
|
|
|
|
|
.withParam(RouterConstant.CHAT_ID_KRY, messagefcmBean.getSessionid())
|
|
|
|
|
.withContext(this)
|
|
|
|
|
.navigate();
|
|
|
|
|
}
|
|
|
|
|
if (messagefcmBean.getSessiontype() == 2) {
|
|
|
|
|
Team team = NIMClient.getService(TeamService.class).queryTeamBlock(messagefcmBean.getSessionid());
|
|
|
|
|
XKitRouter.withKey(RouterConstant.PATH_FUN_CHAT_TEAM_PAGE)
|
|
|
|
|
.withParam(RouterConstant.CHAT_KRY, team)
|
|
|
|
|
.withContext(this)
|
|
|
|
|
.navigate();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
IMApplication.fcmpayload = "";
|
|
|
|
|
}
|
|
|
|
|
if (!TextUtils.isEmpty(IMApplication.schemeUserId)) {
|
|
|
|
|
LogUtils.i("111111111111111110ZZZZZZZZ:" + IMApplication.schemeUserId);
|
|
|
|
|
|
|
|
|
|
@@ -523,6 +572,7 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
startActivity(intent2);
|
|
|
|
|
}, 100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -650,13 +700,16 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
ALog.d(Constant.PROJECT_TAG, "MainActivity:initView");
|
|
|
|
|
loadConfig();
|
|
|
|
|
List<Fragment> fragments = new ArrayList<>();
|
|
|
|
|
// index2Fragment = new HomeFragment();
|
|
|
|
|
shareDateUtils = new ShareDateUtils();
|
|
|
|
|
shareDateUtils.getAllSessionList();
|
|
|
|
|
shareDateUtils.getLocFriends();
|
|
|
|
|
index2Fragment = new HomeFragment();
|
|
|
|
|
chatTabFragment = new ChatTabFragment();
|
|
|
|
|
// voomFragment = new VoomFragment();
|
|
|
|
|
voomFragment = new VoomFragment();
|
|
|
|
|
walletFragment = new MineFragment();
|
|
|
|
|
// fragments.add(index2Fragment);
|
|
|
|
|
fragments.add(index2Fragment);
|
|
|
|
|
fragments.add(chatTabFragment);
|
|
|
|
|
// fragments.add(voomFragment);
|
|
|
|
|
fragments.add(voomFragment);
|
|
|
|
|
fragments.add(walletFragment);
|
|
|
|
|
|
|
|
|
|
fragmentAdapter = new FragmentAdapter(this);
|
|
|
|
|
@@ -665,12 +718,9 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
activityMainBinding.viewPager.setAdapter(fragmentAdapter);
|
|
|
|
|
activityMainBinding.viewPager.setCurrentItem(START_INDEX, false);
|
|
|
|
|
activityMainBinding.viewPager.setOffscreenPageLimit(fragments.size());
|
|
|
|
|
mCurrentTab = activityMainBinding.contactBtnGroup;
|
|
|
|
|
mCurrentTab = activityMainBinding.conversationBtnGroup;
|
|
|
|
|
resetTabSkin(isCommonSkin);
|
|
|
|
|
checkZhiWen();
|
|
|
|
|
shareDateUtils = new ShareDateUtils();
|
|
|
|
|
shareDateUtils.getAllSessionList();
|
|
|
|
|
shareDateUtils.getLocFriends();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void checkZhiWen() {
|
|
|
|
|
@@ -1368,7 +1418,6 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
if (bindBean == null || (!bindBean.getPhoneBind()) || (!bindBean.getPayPasswordSet())) {
|
|
|
|
|
bindInfo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void bindInfo() {
|
|
|
|
|
@@ -1393,12 +1442,11 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
@Override
|
|
|
|
|
protected void onDestroy() {
|
|
|
|
|
ALog.d(Constant.PROJECT_TAG, "MainActivity:onDestroy");
|
|
|
|
|
EventCenter.unregisterEventNotify(skinNotify);
|
|
|
|
|
// EventCenter.unregisterEventNotify(skinNotify);
|
|
|
|
|
ChatObserverRepo.unregisterReceiveMessageObserve(receiveMessageObserver);
|
|
|
|
|
if (mEventSubscription != null) {
|
|
|
|
|
mEventSubscription.unsubscribe();
|
|
|
|
|
}
|
|
|
|
|
// stopService(notifyService);
|
|
|
|
|
super.onDestroy();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1416,7 +1464,7 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
@SuppressLint("UseCompatLoadingForDrawables")
|
|
|
|
|
private void resetTabSkin(boolean isCommonSkin) {
|
|
|
|
|
if (mCurrentTab == activityMainBinding.contactBtnGroup) {
|
|
|
|
|
activityMainBinding.viewPager.setCurrentItem(0, false);
|
|
|
|
|
activityMainBinding.viewPager.setCurrentItem(1, false);
|
|
|
|
|
activityMainBinding.contact.setTextColor(
|
|
|
|
|
getResources().getColor(R.color.color_fe6881));
|
|
|
|
|
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
|
|
|
|
@@ -1430,7 +1478,7 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
null, getResources().getDrawable(R.mipmap.voom_img_t), null, null);
|
|
|
|
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
|
|
|
|
} else if (mCurrentTab == activityMainBinding.myselfBtnGroup) {
|
|
|
|
|
activityMainBinding.viewPager.setCurrentItem(1, false);
|
|
|
|
|
activityMainBinding.viewPager.setCurrentItem(3, false);
|
|
|
|
|
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_fe6881));
|
|
|
|
|
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
|
|
|
|
null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
|
|
|
|
@@ -1444,35 +1492,6 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// if (mCurrentTab == activityMainBinding.contactBtnGroup) {
|
|
|
|
|
// activityMainBinding.viewPager.setCurrentItem(1, false);
|
|
|
|
|
// activityMainBinding.contact.setTextColor(
|
|
|
|
|
// getResources().getColor(R.color.color_fe6881));
|
|
|
|
|
// activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
|
|
|
|
// null, getResources().getDrawable(R.mipmap.chat_img_t), null, null);
|
|
|
|
|
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
|
|
|
|
// } else if (mCurrentTab == activityMainBinding.liveBtnGroup) {
|
|
|
|
|
// activityMainBinding.viewPager.setCurrentItem(2, false);
|
|
|
|
|
// activityMainBinding.live.setTextColor(
|
|
|
|
|
// getResources().getColor(R.color.color_fe6881));
|
|
|
|
|
// activityMainBinding.live.setCompoundDrawablesWithIntrinsicBounds(
|
|
|
|
|
// null, getResources().getDrawable(R.mipmap.voom_img_t), null, null);
|
|
|
|
|
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
|
|
|
|
// } else if (mCurrentTab == activityMainBinding.myselfBtnGroup) {
|
|
|
|
|
// activityMainBinding.viewPager.setCurrentItem(3, false);
|
|
|
|
|
// activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_fe6881));
|
|
|
|
|
// activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
|
|
|
|
// null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
|
|
|
|
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
|
|
|
|
// } else if (mCurrentTab == activityMainBinding.conversationBtnGroup) {
|
|
|
|
|
// activityMainBinding.viewPager.setCurrentItem(0, false);
|
|
|
|
|
// activityMainBinding.conversation.setTextColor(
|
|
|
|
|
// getResources().getColor(R.color.color_fe6881));
|
|
|
|
|
// activityMainBinding.conversation.setCompoundDrawablesWithIntrinsicBounds(
|
|
|
|
|
// null, getResources().getDrawable(R.mipmap.index_img_t), null, null);
|
|
|
|
|
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1866,17 +1885,11 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
|
|
|
|
|
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
|
|
|
|
for (ConfigBean configBean : feedbackResp.data) {
|
|
|
|
|
// if (configBean.getId() == 1) {
|
|
|
|
|
// DataUtils.set(MainActivity.this, "transfer_cash", configBean.getVal().equals("1"));
|
|
|
|
|
// }
|
|
|
|
|
// if (configBean.getId() == 2) {
|
|
|
|
|
// DataUtils.set(MainActivity.this, "transfer_jifen", configBean.getVal().equals("1"));
|
|
|
|
|
// }
|
|
|
|
|
if (configBean.getId() == 3) {
|
|
|
|
|
DataUtils.set(MainActivity.this, "transfer_score", configBean.getVal().equals("1"));
|
|
|
|
|
if (configBean.getId() == 1) {
|
|
|
|
|
DataUtils.set(MainActivity.this, "transfer_cash", configBean.getVal().equals("1"));
|
|
|
|
|
}
|
|
|
|
|
if (configBean.getId() == 4) {
|
|
|
|
|
DataUtils.set(MainActivity.this, "redpkg_score", configBean.getVal().equals("1"));
|
|
|
|
|
if (configBean.getId() == 2) {
|
|
|
|
|
DataUtils.set(MainActivity.this, "transfer_jifen", configBean.getVal().equals("1"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|