681终版
This commit is contained in:
parent
daf881f6a7
commit
61b1101c3f
@ -13,6 +13,14 @@
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "822566078854-8c7698l64j66ijng9bq799o5qvbguhdo.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.newpdlive.sy",
|
||||
"certificate_hash": "e059b937bfa49d58f40fddee4c7463e03e2aae47"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "822566078854-9cej31ie42tgjeimdk691gmvkavrooa7.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
|
@ -13,6 +13,14 @@
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "822566078854-8c7698l64j66ijng9bq799o5qvbguhdo.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.newpdlive.sy",
|
||||
"certificate_hash": "e059b937bfa49d58f40fddee4c7463e03e2aae47"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "822566078854-9cej31ie42tgjeimdk691gmvkavrooa7.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
|
@ -372,7 +372,7 @@ public class AppContext extends CommonAppContext {
|
||||
});
|
||||
|
||||
}).setUncaughtCrashHandler((t, e) -> {
|
||||
Log.e("ApplicationError", "子线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
||||
Log.e("ApplicationError", "子线程异常");
|
||||
e.printStackTrace();
|
||||
}).register(this);
|
||||
}
|
||||
|
@ -110,6 +110,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
||||
sub_loss_name.setVisibility(View.VISIBLE);
|
||||
winActivityIcon.setVisibility(View.VISIBLE);
|
||||
lossActivityIcon.setVisibility(View.VISIBLE);
|
||||
boolean isFirstMe=false;
|
||||
if (settleBeans.size() == 2) {
|
||||
sortByWinNum(settleBeans);
|
||||
SudSettleBean sudSettleBean1 = settleBeans.get(0); // 第一名
|
||||
@ -118,8 +119,8 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
||||
LogUtils.e("第一名:" + sudSettleBean1.getNick_name());
|
||||
LogUtils.e("第二名:" + sudSettleBean2.getNick_name());
|
||||
// 检查是否是当前用户
|
||||
boolean isFirstMe = CommonAppConfig.getInstance().getUid().equals(sudSettleBean1.getUid());
|
||||
boolean isDraw = sudSettleBean1.getWin_num() == sudSettleBean2.getWin_num();
|
||||
isFirstMe = CommonAppConfig.getInstance().getUid().equals(sudSettleBean1.getUid());
|
||||
boolean isDraw = sudSettleBean1.getRank() == sudSettleBean2.getRank();
|
||||
boolean isZh = WordUtil.isNewZh();
|
||||
String myUid = CommonAppConfig.getInstance().getUid();
|
||||
LogUtils.e("isFirstMe:" + isFirstMe);
|
||||
@ -137,8 +138,8 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
||||
if (isActivityGame) {
|
||||
Map<String, Integer> map = showActivityGameScore();
|
||||
if (!map.isEmpty()) {
|
||||
isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
||||
isFirstMe = IMLoginManager.get(mContext).getUserInfo().getUid().equals(String.valueOf(map.get("win_uid")));
|
||||
//isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
||||
// isFirstMe = IMLoginManager.get(mContext).getUserInfo().getUid().equals(String.valueOf(map.get("win_uid")));
|
||||
if (lossBean.getUid().equals(map.get("win_uid").toString())) {
|
||||
SudSettleBean tmp = lossBean;
|
||||
lossBean = winBean;
|
||||
@ -182,7 +183,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
||||
if (isActivityGame) {
|
||||
Map<String, Integer> map = showActivityGameScore();
|
||||
if (!map.isEmpty()) {
|
||||
isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
||||
// isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
||||
}
|
||||
} else {
|
||||
sub_win_score.setText(sudSettleBean1.getWin_num() > 0 ? "+" + sudSettleBean1.getWin_num() : String.valueOf(sudSettleBean1.getWin_num()));
|
||||
@ -208,14 +209,40 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
||||
}
|
||||
System.out.println("是否为活动游戏" + isActivityGame + " 成就内容:" + gameSettle.achievement);
|
||||
if (isActivityGame) {
|
||||
//TODO 败者没显示成就
|
||||
if (!StringUtil.isEmpty(gameSettle.achievement)) {
|
||||
if(!isFirstMe){
|
||||
switch (gameSettle.achievementValue) {
|
||||
case 1:
|
||||
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_1);
|
||||
break;
|
||||
case 2:
|
||||
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_2);
|
||||
break;
|
||||
case 3:
|
||||
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_3);
|
||||
break;
|
||||
case 4:
|
||||
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_4);
|
||||
break;
|
||||
case 5:
|
||||
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_5);
|
||||
break;
|
||||
case 6:
|
||||
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_6);
|
||||
break;
|
||||
case 7:
|
||||
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
String activityGameAchievementText = WordUtil.getNewString(R.string.game_dialog_activity_achievements_title);
|
||||
String activityGameAchievementContent = gameSettle.achievement;
|
||||
activityGameAchievement.setVisibility(View.VISIBLE);
|
||||
SpannableString ss = new SpannableString(activityGameAchievementText + activityGameAchievementContent);
|
||||
ss.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBA6A")), activityGameAchievementText.length(), ss.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
activityGameAchievement.setText(ss);
|
||||
}else{
|
||||
activityGameAchievement.setVisibility(View.GONE);
|
||||
}
|
||||
if (sub_loss_score.getVisibility() == View.VISIBLE) {
|
||||
lossActivityIcon.setVisibility(View.VISIBLE);
|
||||
@ -295,14 +322,17 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
||||
}
|
||||
}
|
||||
Collections.sort(list, (bean1, bean2) -> {
|
||||
return Integer.compare(bean2.getWin_num(), bean1.getWin_num()); // 从大到小排序
|
||||
//return Integer.compare(bean2.getWin_num(), bean1.getWin_num()); // 从大到小排序
|
||||
return bean1.getRank()-bean2.getRank(); // 从大到小排序
|
||||
});
|
||||
LogUtils.e("排序后=====>" + settleBeans);
|
||||
}
|
||||
|
||||
private void destroyDialog() {
|
||||
dismiss();
|
||||
countDownTimer.cancel();
|
||||
if(countDownTimer!=null) {
|
||||
countDownTimer.cancel();
|
||||
}
|
||||
countDownTimer = null;
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,6 @@ package com.yunbao.common.manager;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextUtils;
|
||||
@ -16,7 +13,6 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.BallClearanceTableJoinRoomBean;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.SudGameRoomInfoBean;
|
||||
import com.yunbao.common.event.CheckCurrencyModel;
|
||||
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
@ -28,7 +24,6 @@ import com.yunbao.common.sud.QuickStartGameViewModel;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
@ -39,7 +34,6 @@ public class RandomSudGameManager {
|
||||
private static RandomSudGameManager manager;
|
||||
private AbsRandomGameManager gameManager;
|
||||
private CreateSudRoomModel sudRoomModel;
|
||||
private QuickStartGameViewModel gameViewModel;
|
||||
private boolean isRandom = false;
|
||||
|
||||
public static RandomSudGameManager getManager() {
|
||||
@ -81,14 +75,16 @@ public class RandomSudGameManager {
|
||||
}
|
||||
|
||||
private void createRoom(Context mContext) {
|
||||
if(gameManager!=null){
|
||||
gameManager.randomCreateRoom(mContext, new OnItemClickListener<CreateSudRoomModel>() {
|
||||
@Override
|
||||
public void onItemClick(CreateSudRoomModel bean, int position) {
|
||||
start(bean, true, true);
|
||||
}
|
||||
});
|
||||
if(gameManager==null){
|
||||
gameManager = new BilliardsRandomManager();
|
||||
gameManager.setRandom(isRandom);
|
||||
}
|
||||
gameManager.randomCreateRoom(mContext, new OnItemClickListener<CreateSudRoomModel>() {
|
||||
@Override
|
||||
public void onItemClick(CreateSudRoomModel bean, int position) {
|
||||
start(bean, true, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
@ -247,7 +243,6 @@ public class RandomSudGameManager {
|
||||
}
|
||||
|
||||
public void setGameViewModel(QuickStartGameViewModel gameViewModel) {
|
||||
this.gameManager = gameManager;
|
||||
if (gameManager != null) {
|
||||
gameManager.setGameViewModel(gameViewModel);
|
||||
}
|
||||
|
@ -185,6 +185,7 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
||||
|
||||
@Override
|
||||
public void onGameMGCommonGameBilliardsHitState(SudMGPMGState.MGCommonGameBilliardsHitState model) {
|
||||
LogUtils.e("uid:"+model.uid,"state:"+model.state);
|
||||
if (Integer.parseInt(model.uid) == IMLoginManager.get(AppManager.getInstance().getMainActivity()).getUserInfo().getId()) {
|
||||
if (isOneOverForMy == -1) {
|
||||
isOneOverForMy = 1;
|
||||
@ -220,6 +221,7 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
||||
@Override
|
||||
public boolean onGameMGCommonGameSettle(SudMGPMGState.MGCommonGameSettle model) {
|
||||
System.out.println("游戏结束 :" + isOneOverForMy + "|" + comboNumberForMy);
|
||||
model.achievementValue=comboNumberForMy;
|
||||
if (isOneOverForMy == 1 && comboNumberForMy > 1) {
|
||||
model.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_0);
|
||||
} else if (comboNumberForMy > 0) {
|
||||
|
@ -195,6 +195,7 @@ public class SudMGPMGState implements Serializable {
|
||||
public List<SudActivityGameInfoBean> activityGameInfoBean;
|
||||
public List<SudSettleBean> sudSettleBeans;
|
||||
public String achievement;
|
||||
public int achievementValue;
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MGCommonGameSettle{" +
|
||||
|
@ -7,37 +7,40 @@
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<!--這個不是系統消息-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="通知標題標題通知標題標題"
|
||||
android:textColor="#ff161616"
|
||||
android:textSize="17sp" />
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/time_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="19dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="2-24 17:00"
|
||||
android:text="2024-08-22 17:00"
|
||||
android:textColor="#ff8c8c8c"
|
||||
android:textSize="13sp" />
|
||||
</FrameLayout>
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/banner_card"
|
||||
|
@ -4,7 +4,7 @@ ext {
|
||||
buildToolsVersion: "29.0.2",
|
||||
minSdkVersion : 23,
|
||||
targetSdkVersion : 34,
|
||||
versionCode : 694,
|
||||
versionCode : 697,
|
||||
versionName : "6.8.1"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
|
@ -52,6 +52,7 @@ public class GoogleManage {
|
||||
object.put("openId", account.getId());
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.i("Log", "ApiException = " + e);
|
||||
}
|
||||
return object;
|
||||
|
@ -5,34 +5,46 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--这个系统消息-->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/background_fff">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/titleLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="65dp"
|
||||
android:text="通知標題標題通知標題標題"
|
||||
android:textColor="#ff161616"
|
||||
android:textSize="16sp" />
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="通知標題標題通知標題標題"
|
||||
android:textColor="#ff161616"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2-24 17:00"
|
||||
android:textColor="#ff8c8c8c"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="2-24 17:00"
|
||||
android:textColor="#ff8c8c8c"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_img_content"
|
||||
@ -40,7 +52,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_below="@id/text"
|
||||
android:layout_below="@id/titleLayout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
|
Loading…
Reference in New Issue
Block a user