Commit 9878e012 authored by maxiaoliang's avatar maxiaoliang

1

parent bda7e069
......@@ -1753,4 +1753,15 @@ public class SettingPreference {
editor.commit();
}
public static String getifShowCoups() {
SharedPreferences settings = AppContext.get().getSharedPreferences(USER_SETTING, 0);
return settings.getString("SHOW_COUPS_DIALOG", "0");
}
public static void setShowCoups(String isshow) {
SharedPreferences settings = AppContext.get().getSharedPreferences(USER_SETTING, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putString("SHOW_COUPS_DIALOG", isshow);
editor.commit();
}
}
package com.zxbw.modulemain.fragment
import android.graphics.Color
import android.text.TextUtils
import android.util.Log
import android.view.View
import androidx.viewpager.widget.ViewPager
......@@ -145,9 +146,12 @@ class HomeFragment : BaseFragment(), HomeContract.View, UpdateCallback {
override fun setCouponsList(result: List<CouponsEntity>?) {
if(!result.isNullOrEmpty()){
DialogUtils.showifshowCoup(mActivity, result, View.OnClickListener {
JumpUtils.RechargeJump()
})
if(TextUtils.equals(SettingPreference.getifShowCoups(),"0")){
DialogUtils.showifshowCoup(mActivity, result, View.OnClickListener {
JumpUtils.RechargeJump()
})
}
}
}
......
......@@ -585,5 +585,6 @@ object DialogUtils {
mDialog.setCanceledOnTouchOutside(false)
mDialog.setCancelable(false)
mDialog.show()
SettingPreference.setShowCoups("1")
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
android:id="@+id/id_img_youhuiquan_1"
android:layout_width="190dp"
android:layout_height="50dp"
android:layout_marginStart="74dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="189dp"
android:background="@drawable/icon_youhuiuan_1">
......@@ -62,7 +62,7 @@
android:layout_width="190dp"
android:layout_height="50dp"
android:layout_below="@+id/id_img_youhuiquan_1"
android:layout_marginStart="74dp"
android:layout_centerHorizontal="true"
android:background="@drawable/icon_youhuiquan_2">
<TextView
......@@ -96,8 +96,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="10dp"
android:layout_centerVertical="true"
android:layout_marginEnd="10dp"
android:textColor="#FCF8E2"
android:textSize="19sp"
android:textStyle="bold" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment