[Modify]寻爱ui调整
@@ -108,11 +108,13 @@ public class ActivityStack {
|
||||
if (mAvRoomActivity == null) {
|
||||
mAvRoomActivity = new WeakReference<>(activity);
|
||||
} else if (mAvRoomActivity.get() != activity) {
|
||||
if(mAvRoomActivity != null) {
|
||||
mAvRoomActivity.clear();
|
||||
mAvRoomActivity = new WeakReference<>(activity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onActivityResumed(Activity activity) {
|
||||
if (activity == null) {
|
||||
@@ -130,11 +132,13 @@ public class ActivityStack {
|
||||
if (mAvRoomActivity == null) {
|
||||
mAvRoomActivity = new WeakReference<>(activity);
|
||||
} else if (mAvRoomActivity.get() != activity) {
|
||||
if(mAvRoomActivity != null) {
|
||||
mAvRoomActivity.clear();
|
||||
mAvRoomActivity = new WeakReference<>(activity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onActivityDestroyed(Activity activity) {
|
||||
if (activity == null) {
|
||||
@@ -149,10 +153,12 @@ public class ActivityStack {
|
||||
break;
|
||||
}
|
||||
if (activity instanceof AVRoomActivity) {
|
||||
if(mAvRoomActivity != null) {
|
||||
mAvRoomActivity.clear();
|
||||
mAvRoomActivity = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isActivityValid(WeakReference<Activity> activityWeakReference) {
|
||||
return activityWeakReference != null && activityWeakReference.get() != null && !activityWeakReference.get().isFinishing() && !activityWeakReference.get().isDestroyed();
|
||||
|
@@ -8,7 +8,6 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.yizhuan.erban.application.XChatApplication;
|
||||
import com.yizhuan.erban.location.LocationManager;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
|
||||
import com.yizhuan.xchat_android_library.common.util.CoreUtils;
|
||||
@@ -33,12 +32,8 @@ public class AppLifeCycleHelper implements Application.ActivityLifecycleCallback
|
||||
AppLifeCycleHelper.onForeground();
|
||||
|
||||
//应用回到前台了
|
||||
//这里进行暗号的判断
|
||||
//PwdCodeMgr.get().handlePopPwdCodeWindow(activity);
|
||||
if (AuthModel.get().isImLogin()) {
|
||||
//签到弹窗
|
||||
// SignDialogTimeManager.checkSignDialog(activity, true);
|
||||
LocationManager.uploadLocation(activity);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,48 +0,0 @@
|
||||
package com.yizhuan.erban.location;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.yizhuan.erban.guide.GuideActivity;
|
||||
import com.yizhuan.erban.other.activity.SplashActivity;
|
||||
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.UIUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class LocationManager {
|
||||
private static final String LOCATE_TIME = "locate_time";
|
||||
|
||||
public static void uploadLocation(Context context) {
|
||||
|
||||
if (UIUtils.isTopActivity(context, SplashActivity.class.getName())
|
||||
|| UIUtils.isTopActivity(context, GuideActivity.class.getName())) {
|
||||
return;
|
||||
}
|
||||
|
||||
Long lastLocateTime = (Long) SharedPreferenceUtils.get(LOCATE_TIME, 0L);
|
||||
if (lastLocateTime != null) {
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
calendar.set(Calendar.HOUR, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
long currentTime = calendar.getTimeInMillis();
|
||||
|
||||
if (lastLocateTime < currentTime) {
|
||||
EventBus.getDefault().post(new LocationUploadEvent());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void saveUploadTime() {
|
||||
SharedPreferenceUtils.put(LOCATE_TIME, System.currentTimeMillis());
|
||||
}
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
package com.yizhuan.erban.location;
|
||||
|
||||
public class LocationUploadEvent {
|
||||
}
|
BIN
app/src/main/res/drawable-xhdpi/ic_treasure_box_tip.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
9
app/src/main/res/drawable/bg_ffffff_26.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dp_26"/>
|
||||
|
||||
<solid android:color="@color/color_FFFFFF"/>
|
||||
|
||||
</shape>
|
18
app/src/main/res/drawable/bg_treasure_box_20.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#83BBFF"
|
||||
android:startColor="#927DFF"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_0"
|
||||
android:bottomRightRadius="@dimen/dp_0"
|
||||
android:topLeftRadius="@dimen/dp_20"
|
||||
android:topRightRadius="@dimen/dp_20" />
|
||||
|
||||
</shape>
|
@@ -1,96 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_common_touch_while"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
>
|
||||
android:paddingStart="@dimen/dp_0"
|
||||
android:paddingEnd="@dimen/dp_15">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.3"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
>
|
||||
<ImageView
|
||||
android:paddingEnd="@dimen/dp_0">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_position"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_position"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_13"
|
||||
android:textColor="@color/color_666666"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:text="100"
|
||||
android:gravity="center"
|
||||
/>
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
tools:text="100" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.NobleAvatarView
|
||||
android:id="@+id/noble_avatar_view"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_userName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="15sp"
|
||||
tools:text="@string/layout_box_ranking_list_item_01"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_flexShrink="1"
|
||||
/>
|
||||
tools:text="@string/layout_box_ranking_list_item_01" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.7"
|
||||
tools:text="1236843"
|
||||
android:gravity="end"
|
||||
android:textColor="#1093F5"
|
||||
android:textSize="@dimen/dp_15"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:drawableEnd="@drawable/treasure_box_diamond"
|
||||
android:layout_weight="0.7"
|
||||
android:drawablePadding="5dp"
|
||||
/>
|
||||
android:gravity="end"
|
||||
android:textColor="@color/color_F8FF7B"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:text="1236843"
|
||||
app:drawableEndCompat="@drawable/treasure_box_diamond" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:background="@color/color_F4F4F4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="90dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</LinearLayout>
|
72
app/src/main/res/layout/dialog_treasure_box.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:background="@drawable/bg_ffffff_26"
|
||||
android:layout_marginStart="34dp"
|
||||
android:layout_marginEnd="34dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/treasure_warm_prompt"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_treasure_box_tip"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_message_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:text="@string/treasure_diamond_balance_is_insufficient"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_tip" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_charge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/treasure_to_charge"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/color_white"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:paddingStart="46dp"
|
||||
android:paddingEnd="46dp"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:background="@drawable/bg_common_confirm_30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_message_tip"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
@@ -1,21 +1,18 @@
|
||||
<com.yizhuan.erban.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.yizhuan.erban.home.fragment.HomeOtherTabFragment">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:paddingTop="2dp"
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
|
@@ -660,5 +660,6 @@
|
||||
<color name="color_1f5764">#1f5764</color>
|
||||
<color name="color_59fdff">#59fdff</color>
|
||||
<color name="color_ffe8aa">#ffe8aa</color>
|
||||
<color name="color_F8FF7B">#F8FF7B</color>
|
||||
|
||||
</resources>
|
||||
|
@@ -5072,5 +5072,8 @@
|
||||
<string name="fairy_click_examine"><![CDATA[点击查看>>]]></string>
|
||||
<string name="fairy_record">記錄</string>
|
||||
<string name="fairy_no_further_data_is_available">暫無更多數據~</string>
|
||||
<string name="treasure_warm_prompt">溫馨提示</string>
|
||||
<string name="treasure_diamond_balance_is_insufficient">鉆石餘額不足,請先充值吧~</string>
|
||||
<string name="treasure_to_charge">去充值</string>
|
||||
|
||||
</resources>
|
@@ -11,49 +11,42 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="360dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/shape_white_top_14dp"
|
||||
android:background="@drawable/bg_treasure_box_20"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/view_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:background="@drawable/shape_white_top_14dp"
|
||||
app:tl_indicator_color="@color/appColor"
|
||||
app:tl_indicator_color="@color/color_white"
|
||||
app:tl_indicator_corner_radius="2dp"
|
||||
app:tl_indicator_height="@dimen/dp_3"
|
||||
app:tl_indicator_width="@dimen/dp_9"
|
||||
app:tl_indicator_height="@dimen/dp_4"
|
||||
app:tl_indicator_width="@dimen/dp_13"
|
||||
app:tl_tab_space_equal="true"
|
||||
app:tl_textSelectColor="@color/color_333333"
|
||||
app:tl_textUnselectColor="@color/text_tertiary"
|
||||
app:tl_textsize="@dimen/dp_16" />
|
||||
app:tl_textSelectColor="@color/color_white"
|
||||
app:tl_textUnselectColor="@color/white_transparent_50"
|
||||
app:tl_textsize="@dimen/sp_16" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/refresh"
|
||||
android:layout_gravity="end"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
/>
|
||||
android:src="@drawable/ic_refresh" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/color_f5f5f5" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
@@ -31,7 +31,7 @@ import java.util.List;
|
||||
public class BoxRankingActivity extends BaseViewBindingActivity<ActivityRoomBoxRankingBinding>
|
||||
implements CarMagicIndicator.OnItemSelectListener, View.OnClickListener {
|
||||
|
||||
private String[] titles = {ResUtil.getString(R.string.treasure_box_activity_boxrankingactivity_01), ResUtil.getString(R.string.treasure_box_activity_boxrankingactivity_02)};
|
||||
private final String[] titles = {ResUtil.getString(R.string.treasure_box_activity_boxrankingactivity_01), ResUtil.getString(R.string.treasure_box_activity_boxrankingactivity_02)};
|
||||
public static final int TYPE_TODAY = 1;//今日
|
||||
public static final int TYPE_YESTERDAY = 2;//今日
|
||||
|
||||
|
@@ -24,14 +24,13 @@ import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseBindingActivity;
|
||||
import com.yizhuan.erban.databinding.ActivityTreasureBoxBinding;
|
||||
import com.yizhuan.erban.treasure_box.widget.dialog.BoxMoreDialog;
|
||||
import com.yizhuan.erban.treasure_box.widget.dialog.TreasureBoxDialog;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity;
|
||||
import com.yizhuan.erban.utils.UserUtils;
|
||||
import com.yizhuan.treasure_box.bean.PrizeInfo;
|
||||
import com.yizhuan.treasure_box.model.BoxModel;
|
||||
import com.yizhuan.treasure_box.model.IBoxModel;
|
||||
import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.UriProvider;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent;
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
@@ -137,7 +136,6 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
new BoxMoreDialog(context, sendMessageSwitchLevel).openDialog();
|
||||
break;
|
||||
case R.id.tv_rank:
|
||||
// DialogWebViewActivity.start(context, UriProvider.getBoxRank(), false);
|
||||
BoxRankingActivity.start(this);
|
||||
break;
|
||||
case R.id.iv_open:
|
||||
@@ -171,8 +169,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
return true;
|
||||
}
|
||||
if (keyNum < count) {
|
||||
getDialogManager().showOkCancelDialog(ResUtil.getString(R.string.treasure_box_activity_treasureboxactivity_04), ResUtil.getString(R.string.treasure_box_activity_treasureboxactivity_05),
|
||||
() -> DialogWebViewActivity.start(context, UriProvider.getBoxKey()));
|
||||
TreasureBoxDialog.newInstance().show(this);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@@ -1,10 +1,14 @@
|
||||
package com.yizhuan.erban.treasure_box.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.yizhuan.erban.R;
|
||||
@@ -19,15 +23,16 @@ import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
|
||||
public class BoxRankingListAdapter extends BaseQuickAdapter<BoxRankingInfo.RankVosBean, BaseViewHolder> {
|
||||
|
||||
private Context mContext;
|
||||
private final Context mContext;
|
||||
|
||||
public BoxRankingListAdapter(Context context) {
|
||||
super(R.layout.box_ranking_list_item);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
protected void convert(BaseViewHolder baseViewHolder, final BoxRankingInfo.RankVosBean rankVosBeans) {
|
||||
protected void convert(@NonNull BaseViewHolder baseViewHolder, final BoxRankingInfo.RankVosBean rankVosBeans) {
|
||||
if (rankVosBeans == null) return;
|
||||
|
||||
baseViewHolder.setText(R.id.tv_userName, rankVosBeans.getNick()).setText(R.id.tv_amount, rankVosBeans.getAmount() + "");
|
||||
@@ -38,17 +43,17 @@ public class BoxRankingListAdapter extends BaseQuickAdapter<BoxRankingInfo.RankV
|
||||
case 0:
|
||||
tvPosition.setVisibility(View.GONE);
|
||||
ivPosition.setVisibility(View.VISIBLE);
|
||||
ivPosition.setImageDrawable(mContext.getResources().getDrawable(R.drawable.ic_box_ranking_first));
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.ic_box_ranking_first));
|
||||
break;
|
||||
case 1:
|
||||
tvPosition.setVisibility(View.GONE);
|
||||
ivPosition.setVisibility(View.VISIBLE);
|
||||
ivPosition.setImageDrawable(mContext.getResources().getDrawable(R.drawable.ic_box_ranking_second));
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.ic_box_ranking_second));
|
||||
break;
|
||||
case 2:
|
||||
tvPosition.setVisibility(View.GONE);
|
||||
ivPosition.setVisibility(View.VISIBLE);
|
||||
ivPosition.setImageDrawable(mContext.getResources().getDrawable(R.drawable.ic_box_ranking_third));
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.ic_box_ranking_third));
|
||||
break;
|
||||
default:
|
||||
tvPosition.setVisibility(View.VISIBLE);
|
||||
|
@@ -0,0 +1,41 @@
|
||||
package com.yizhuan.erban.treasure_box.widget.dialog
|
||||
|
||||
import com.yizhuan.erban.base.BaseDialog
|
||||
import com.yizhuan.erban.databinding.DialogTreasureBoxBinding
|
||||
import com.yizhuan.erban.ui.pay.ChargeActivity
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.xchat_android_core.Constants
|
||||
import com.yizhuan.xchat_android_core.UriProvider
|
||||
import com.yizhuan.xchat_android_library.common.util.DeviceUtil.getDeviceId
|
||||
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil
|
||||
|
||||
/**
|
||||
* author: wushaocheng
|
||||
* time: 2023/3/23
|
||||
* desc: 寻爱钻石不足提示
|
||||
*/
|
||||
class TreasureBoxDialog : BaseDialog<DialogTreasureBoxBinding>() {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(): TreasureBoxDialog {
|
||||
return TreasureBoxDialog()
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
binding.tvCharge.setOnClickListener {
|
||||
if (AppMetaDataUtil.getChannelID() == Constants.GOOGLE) {
|
||||
ChargeActivity.start(context)
|
||||
} else {
|
||||
CommonWebViewActivity.start(
|
||||
context, UriProvider.getOfficialPay(
|
||||
10,
|
||||
getDeviceId(context)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 990 B After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/module_treasure_box/res/drawable-xhdpi/ic_refresh.webp
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 742 B |
BIN
app/src/module_treasure_box/res/drawable-xhdpi/refresh.webp
Normal file
After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
@@ -96,9 +96,9 @@
|
||||
android:id="@+id/iv_first_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_box_temp"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
@@ -204,11 +204,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="135dp"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginBottom="110dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="110dp"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_bg" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_gift_bg"
|
||||
|