1:修改所有的充值自定义金额
2:修改小时榜滑动出现的图片复用问题
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="RESTORE_ENABLED" value="true" />
|
||||
<option name="RESTORE_ENABLED" value="false" />
|
||||
<option name="RESTORE_FILE" value="" />
|
||||
<option name="RESTORE_FRESH_INSTALL_ONLY" value="true" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="com.xscm.action.LAUNCH_PAGE" />
|
||||
<action android:name="com.xscm.midi.LAUNCH_PAGE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
@@ -28,8 +28,8 @@ isBuildModule=false
|
||||
#org.gradle.deamon=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.1.7
|
||||
APP_VERSION_CODE=169
|
||||
APP_VERSION_NAME=1.2.0
|
||||
APP_VERSION_CODE=172
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
|
||||
@@ -761,7 +761,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
// 发送广播通知所有Activity刷新状态
|
||||
Intent refreshIntent = new Intent("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
||||
sendBroadcast(refreshIntent);
|
||||
Intent intent = new Intent("com.xscm.action.LAUNCH_PAGE");
|
||||
Intent intent = new Intent("com.xscm.midi.LAUNCH_PAGE");
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
getApplicationContext().startActivity(intent);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public class RechargeDialogFragment extends BaseMvpDialogFragment<RechargeDialog
|
||||
if (type!=null){
|
||||
mBinding.r4.setVisibility(View.GONE);
|
||||
}else{
|
||||
mBinding.r4.setVisibility(View.VISIBLE);
|
||||
mBinding.r4.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,11 +137,11 @@ public class RechargeDialogFragment extends BaseMvpDialogFragment<RechargeDialog
|
||||
|
||||
@Override
|
||||
public void setRechargeData(List<RechargeBean> rechargeData) {
|
||||
RechargeBean customItem = new RechargeBean();
|
||||
customItem.setCoins("自定义");
|
||||
customItem.setMoney("");
|
||||
customItem.setItemViewType(1);
|
||||
rechargeData.add(customItem);
|
||||
// RechargeBean customItem = new RechargeBean();
|
||||
// customItem.setCoins("自定义");
|
||||
// customItem.setMoney("");
|
||||
// customItem.setItemViewType(1);
|
||||
// rechargeData.add(customItem);
|
||||
rechargeAdapter = new BalanceRechargeAdapter(rechargeData);
|
||||
rechargeAdapter.setNewData(rechargeData);
|
||||
rechargeAdapter.setListener(new BalanceRechargeAdapter.OnRechargeItemClickListener() {
|
||||
|
||||
@@ -51,11 +51,11 @@ public class EnvironmentPrefs {
|
||||
// }
|
||||
|
||||
// 默认使用生产环境
|
||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.TEST.name());
|
||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
|
||||
try {
|
||||
return EnvironmentEnum.valueOf(envName);
|
||||
} catch (IllegalArgumentException e) {
|
||||
return EnvironmentEnum.TEST; // 出错时默认返回生产环境
|
||||
return EnvironmentEnum.PRODUCTION; // 出错时默认返回生产环境
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ public class DropHourlView extends LinearLayout {
|
||||
private int rightMargin = 0;
|
||||
private float lastX, lastY;
|
||||
private int screenWidth;
|
||||
private int screenHeight; // 添加屏幕高度变量
|
||||
|
||||
public DropHourlView(Context context) {
|
||||
super(context);
|
||||
@@ -42,6 +43,9 @@ public class DropHourlView extends LinearLayout {
|
||||
|
||||
|
||||
void init() {
|
||||
// 初始化屏幕尺寸
|
||||
screenWidth = ScreenUtils.getScreenWidth();
|
||||
screenHeight = ScreenUtils.getScreenHeight();
|
||||
|
||||
post(new Runnable() {
|
||||
@Override
|
||||
@@ -51,6 +55,8 @@ public class DropHourlView extends LinearLayout {
|
||||
int sw = ScreenUtils.getScreenWidth()-200;
|
||||
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||
int y = (int) (0.5f * sh) - getHeight();
|
||||
// 确保Y坐标不会超出屏幕范围
|
||||
y = Math.max(0, Math.min(y, sh - getHeight()));
|
||||
int x = sw - getWidth();
|
||||
setTranslationX(x);
|
||||
setTranslationY(y);
|
||||
@@ -64,19 +70,25 @@ public class DropHourlView extends LinearLayout {
|
||||
float X2;
|
||||
float Y1;
|
||||
float Y2;
|
||||
// 记录视图初始位置
|
||||
private float originalX;
|
||||
private float originalY;
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||
if (starDrap) return true;
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
X1 = event.getX();
|
||||
Y1 = event.getY();
|
||||
X1 = event.getRawX();
|
||||
Y1 = event.getRawY();
|
||||
// 记录视图当前位置
|
||||
originalX = getTranslationX();
|
||||
originalY = getTranslationY();
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
X2 = event.getX();//当手指抬起时,再次获取屏幕位置的X值
|
||||
Y2 = event.getY();//同理
|
||||
X2 = event.getRawX();
|
||||
Y2 = event.getRawY();
|
||||
Action(X1, X2, Y1, Y2);
|
||||
break;
|
||||
|
||||
@@ -111,17 +123,35 @@ public class DropHourlView extends LinearLayout {
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||
setTranslationX(getX() + (event.getX() - X1));
|
||||
setTranslationY(getY() + (event.getY() - Y1));
|
||||
X2 = event.getX();
|
||||
// 使用屏幕绝对坐标计算新位置
|
||||
float newX = originalX + (event.getRawX() - X1);
|
||||
float newY = originalY + (event.getRawY() - Y1);
|
||||
|
||||
// 限制X和Y坐标在屏幕范围内
|
||||
newX = Math.max(0, Math.min(newX, screenWidth - getWidth()));
|
||||
newY = Math.max(0, Math.min(newY, screenHeight - getHeight()));
|
||||
|
||||
setTranslationX(newX);
|
||||
setTranslationY(newY);
|
||||
X2 = event.getRawX();
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
starDrap = false;
|
||||
int sw = ScreenUtils.getScreenWidth();
|
||||
Log.i(TAG, "onTouchEvent: " + sw + "," + X2);
|
||||
boolean isR = getTranslationX() + getWidth() / 2 >= sw / 2;//贴边方向
|
||||
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "translationX", isR ? sw - getWidth()+10 : 0f).setDuration(200);
|
||||
anim.start();
|
||||
|
||||
// 获取当前Y坐标
|
||||
float currentY = getTranslationY();
|
||||
|
||||
// 创建X轴和Y轴的动画
|
||||
ObjectAnimator animX = ObjectAnimator.ofFloat(this, "translationX", isR ? sw - getWidth() : 0f).setDuration(200);
|
||||
// Y轴保持当前位置,但确保在屏幕范围内
|
||||
currentY = Math.max(0, Math.min(currentY, screenHeight - getHeight()));
|
||||
ObjectAnimator animY = ObjectAnimator.ofFloat(this, "translationY", currentY).setDuration(200);
|
||||
|
||||
animX.start();
|
||||
animY.start();
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,221 +1,223 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".dialog.RechargeDialogFragment">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".dialog.RechargeDialogFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_r16_fff">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_r16_fff">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:gravity="center"
|
||||
android:text="充值"
|
||||
android:textColor="@color/color_FF333333"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_num" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/r_4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toTopOf="@+id/v_view"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_comment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_4"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="¥"
|
||||
android:textColor="@color/color_FF000000"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_custom_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toRightOf="@+id/t_4"
|
||||
android:background="@null"
|
||||
android:hint="请输入充值金额(300-50000元)"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColorHint="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="将获得0金币"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/color_FF999999"
|
||||
app:layout_constraintTop_toBottomOf="@id/r_4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="@string/payment_method"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintTop_toBottomOf="@id/v_view" />
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/rl_weixin_pay"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_16"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/t_2">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_wx"-->
|
||||
<!-- android:layout_width="@dimen/dp_20"-->
|
||||
<!-- android:layout_height="@dimen/dp_20"-->
|
||||
<!-- android:src="@mipmap/wx_zf" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_1"-->
|
||||
<!-- android:layout_toRightOf="@+id/im_wx"-->
|
||||
<!-- android:text="@string/wechat_payment"-->
|
||||
<!-- android:textColor="@color/color_FF333333"-->
|
||||
<!-- android:textSize="@dimen/sp_14" />-->
|
||||
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_weixin"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_alignParentRight="true"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_2"-->
|
||||
<!-- android:src="@drawable/level_pay" />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/rl_three_pay"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_16"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/rl_weixin_pay">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_zfb"-->
|
||||
<!-- android:layout_width="@dimen/dp_20"-->
|
||||
<!-- android:layout_height="@dimen/dp_20"-->
|
||||
<!-- android:src="@mipmap/sign_icon_zfb" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_1"-->
|
||||
<!-- android:layout_toRightOf="@+id/im_zfb"-->
|
||||
<!-- android:text="@string/alipay_payment"-->
|
||||
<!-- android:textColor="@color/color_FF333333"-->
|
||||
<!-- android:textSize="@dimen/sp_14" />-->
|
||||
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_three_pay"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_alignParentRight="true"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_2"-->
|
||||
<!-- android:src="@drawable/level_pay" />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/t_2" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_payment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_38"
|
||||
android:layout_marginRight="@dimen/dp_38"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="确认支付"
|
||||
android:textColor="@color/color_FF333333"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_three_pay"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:gravity="center"
|
||||
android:text="充值"
|
||||
android:textColor="@color/color_FF333333"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_num"/>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/r_4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toTopOf="@+id/v_view"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_comment"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_4"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="¥"
|
||||
android:textColor="@color/color_FF000000"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_custom_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toRightOf="@+id/t_4"
|
||||
android:background="@null"
|
||||
android:hint="请输入充值金额(300-50000元)"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColorHint="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="将获得0金币"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/color_FF999999"
|
||||
app:layout_constraintTop_toBottomOf="@id/r_4"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="@string/payment_method"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintTop_toBottomOf="@id/v_view"/>
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/rl_weixin_pay"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_16"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/t_2">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_wx"-->
|
||||
<!-- android:layout_width="@dimen/dp_20"-->
|
||||
<!-- android:layout_height="@dimen/dp_20"-->
|
||||
<!-- android:src="@mipmap/wx_zf" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_1"-->
|
||||
<!-- android:layout_toRightOf="@+id/im_wx"-->
|
||||
<!-- android:text="@string/wechat_payment"-->
|
||||
<!-- android:textColor="@color/color_FF333333"-->
|
||||
<!-- android:textSize="@dimen/sp_14" />-->
|
||||
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_weixin"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_alignParentRight="true"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_2"-->
|
||||
<!-- android:src="@drawable/level_pay" />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/rl_three_pay"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_16"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/rl_weixin_pay">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_zfb"-->
|
||||
<!-- android:layout_width="@dimen/dp_20"-->
|
||||
<!-- android:layout_height="@dimen/dp_20"-->
|
||||
<!-- android:src="@mipmap/sign_icon_zfb" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_1"-->
|
||||
<!-- android:layout_toRightOf="@+id/im_zfb"-->
|
||||
<!-- android:text="@string/alipay_payment"-->
|
||||
<!-- android:textColor="@color/color_FF333333"-->
|
||||
<!-- android:textSize="@dimen/sp_14" />-->
|
||||
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_three_pay"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_alignParentRight="true"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_2"-->
|
||||
<!-- android:src="@drawable/level_pay" />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/t_2"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_payment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_38"
|
||||
android:layout_marginRight="@dimen/dp_38"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="确认支付"
|
||||
android:textColor="@color/color_FF333333"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_three_pay"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90">
|
||||
android:layout_height="@dimen/dp_90"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_h_t"
|
||||
@@ -22,7 +23,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:ellipsize="start"
|
||||
android:maxLines="1"
|
||||
android:text="礼品"
|
||||
tools:text="礼品"
|
||||
android:textColor="#FFDE77"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
|
||||
@@ -3726,6 +3726,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
|
||||
|
||||
|
||||
LogUtils.e("RoomActivity", "onResume")
|
||||
CommonAppContext.getInstance().isShow = true
|
||||
CommonAppContext.getInstance().isPlaying = true
|
||||
@@ -3784,9 +3788,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (isMinimized) {
|
||||
isMinimized = false
|
||||
clearMinimizeState()
|
||||
|
||||
|
||||
// 恢复房间状态
|
||||
resumeRoomState()
|
||||
setupEffectView()
|
||||
MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)
|
||||
// resetFragment()
|
||||
}
|
||||
|
||||
|
||||
@@ -27,14 +27,18 @@ public class RoomHourlyAdapter extends BaseQuickAdapter<RoomHourBean.RoomListBea
|
||||
@Override
|
||||
protected void convert(BaseViewHolder baseViewHolder, RoomHourBean.RoomListBean roomListBean) {
|
||||
// 获取当前项的索引
|
||||
int position = baseViewHolder.getAdapterPosition();
|
||||
int position = baseViewHolder.getLayoutPosition();
|
||||
if (position == 0){
|
||||
baseViewHolder.setText(R.id.tv_num, "");
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_num, com.xscm.moduleutil.R.mipmap.top1);
|
||||
}else if (position == 1){
|
||||
baseViewHolder.setText(R.id.tv_num, "");
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_num, com.xscm.moduleutil.R.mipmap.top2);
|
||||
}else if (position == 2){
|
||||
baseViewHolder.setText(R.id.tv_num, "");
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_num, com.xscm.moduleutil.R.mipmap.top3);
|
||||
}else {
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_num, com.xscm.moduleutil.R.mipmap.hourly_num);
|
||||
baseViewHolder.setText(R.id.tv_num, position+1+"");
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ public class RoomUserContacts {
|
||||
void topRelationCard(String s);
|
||||
void deleteRelationCard(String s);
|
||||
void clearUserCharm();
|
||||
|
||||
void applyPit();
|
||||
}
|
||||
|
||||
public interface ViewGx extends IView<Activity> {
|
||||
@@ -54,5 +56,7 @@ public class RoomUserContacts {
|
||||
void deleteRelationCard(String id);
|
||||
|
||||
void clearUserCharm(String roomId,String userId);
|
||||
|
||||
void applyPit(String roomId,String pitNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
int id = view.getId();
|
||||
if (id == R.id.room_m_cz) {
|
||||
if (mBinding.roomMCz.getText().equals("上麦")) {
|
||||
} else {
|
||||
MvpPre.applyPit(room_id, "");
|
||||
}else if (mBinding.roomMCz.getText().equals("抱麦")){
|
||||
MvpPre.hostUserPit(room_id, pit_number, user_id, "1");
|
||||
}
|
||||
else {
|
||||
if(user_id.equals(SpUtil.getUserId()+"")){
|
||||
MvpPre.downPit(room_id, pit_number);
|
||||
}else {
|
||||
@@ -495,12 +499,22 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
mBinding.imQml.setVisibility(VISIBLE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
mBinding.roomMCz.setText("抱麦");
|
||||
}
|
||||
if (isSelf){
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
mBinding.roomMCz.setText("上麦");
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -523,6 +537,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
// mBinding.roomMCz.setVisibility(GONE);
|
||||
// }
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
mBinding.roomMCz.setText("抱麦");
|
||||
}
|
||||
}
|
||||
if (isSelf){
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
@@ -530,6 +549,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
mBinding.roomMCz.setText("上麦");
|
||||
}
|
||||
}
|
||||
mBinding.imQml.setVisibility(VISIBLE);
|
||||
break;
|
||||
@@ -551,6 +575,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
// mBinding.roomMCz.setVisibility(GONE);
|
||||
// }
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
mBinding.roomMCz.setText("抱麦");
|
||||
}
|
||||
}
|
||||
if (isSelf){
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
@@ -558,6 +587,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
mBinding.roomMCz.setText("上麦");
|
||||
}
|
||||
}
|
||||
mBinding.imQml.setVisibility(VISIBLE);
|
||||
break;
|
||||
@@ -583,6 +617,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
mBinding.roomMCz.setText("上麦");
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -740,5 +779,10 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
ToastUtils.show("清除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyPit() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -228,4 +228,9 @@ public class RelationshipFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
public void clearUserCharm() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyPit() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -298,4 +298,22 @@ public class RoomUserPresenter extends BasePresenter<RoomUserContacts.View> impl
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyPit(String roomId, String pitNumber) {
|
||||
RetrofitClient.getInstance().applyPit(roomId, pitNumber, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().applyPit();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,36 @@
|
||||
android:clipToPadding="false"
|
||||
android:keepScreenOn="true">
|
||||
|
||||
<com.xscm.moduleutil.widget.DropHourlView
|
||||
android:id="@+id/cl_xsb"
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:gravity="right"
|
||||
android:background="@mipmap/room_xsb"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:elevation="4dp"
|
||||
android:visibility="invisible">
|
||||
<!-- android:background="@mipmap/room_xsb"-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_xlh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:gravity="center|right"
|
||||
android:padding="@dimen/dp_8"
|
||||
android:text="小时榜"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="13sp"/>
|
||||
|
||||
|
||||
</com.xscm.moduleutil.widget.DropHourlView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="0dp"
|
||||
@@ -521,34 +551,7 @@
|
||||
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.DropHourlView
|
||||
android:id="@+id/cl_xsb"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:gravity="right"
|
||||
android:background="@mipmap/room_xsb"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:elevation="4dp"
|
||||
android:visibility="invisible">
|
||||
<!-- android:background="@mipmap/room_xsb"-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_xlh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:gravity="center|right"
|
||||
android:paddingEnd="@dimen/dp_5"
|
||||
android:text="小时榜"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="11sp"/>
|
||||
|
||||
|
||||
</com.xscm.moduleutil.widget.DropHourlView>
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="所属工会:"
|
||||
android:text="所属公会:"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -138,11 +138,11 @@ public class RechargeActivity extends BaseMvpActivity<RechargePresenter, Activit
|
||||
@Override
|
||||
public void setRechargeData(List<RechargeBean> rechargeData) {
|
||||
// 在数据源最后添加一个自定义项
|
||||
RechargeBean customItem = new RechargeBean();
|
||||
customItem.setCoins("自定义");
|
||||
customItem.setMoney("");
|
||||
customItem.setItemViewType(1);
|
||||
rechargeData.add(customItem);
|
||||
// RechargeBean customItem = new RechargeBean();
|
||||
// customItem.setCoins("自定义");
|
||||
// customItem.setMoney("");
|
||||
// customItem.setItemViewType(1);
|
||||
// rechargeData.add(customItem);
|
||||
rechargeAdapter = new BalanceRechargeAdapter(rechargeData);
|
||||
rechargeAdapter.setNewData(rechargeData);
|
||||
|
||||
@@ -160,7 +160,7 @@ public class RechargeActivity extends BaseMvpActivity<RechargePresenter, Activit
|
||||
@Override
|
||||
public void onInputBoxVisibilityChanged(boolean isVisible) {
|
||||
// 根据 isVisible 的值来显示或隐藏输入框
|
||||
mBinding.r4.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||
mBinding.r4.setVisibility(isVisible ? View.GONE : View.GONE);
|
||||
if (isVisible){
|
||||
money="0";
|
||||
}
|
||||
|
||||
@@ -95,7 +95,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16">
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_4"
|
||||
|
||||
Reference in New Issue
Block a user