设定页面修改

This commit is contained in:
18401019693 2022-10-22 11:23:24 +08:00
parent c2d2687441
commit 1ecad0f89f
9 changed files with 32 additions and 39 deletions

View File

@ -34,14 +34,20 @@ public class IMLoginManager extends BaseCacheManager {
private final static String IS_FLOAT = "is_float";
private final static String IS_HINT = "is_hint";
public boolean isHint() {
return TextUtils.equals("1", getString(IS_HINT)) || TextUtils.isEmpty(getString(IS_HINT));
return 1 == getInt(IS_HINT, 0);
}
public void initISHint(String isHint) {
put(IS_HINT, isHint);
public void initISHint() {
if (getInt(IS_HINT, 0) < 2) {
int number = getInt(IS_HINT, 0) + 1;
put(IS_HINT, number);
}
}
/**
* 存储是否打开悬浮窗权限提示
*
@ -287,6 +293,7 @@ public class IMLoginManager extends BaseCacheManager {
// IMCenter.getInstance().clearConversations(null, Conversation.ConversationType.PRIVATE);
RongcloudIMManager.logoutIM();
MessageIMManager.get(context).logout();
put(IS_HINT, 0);
}

View File

@ -183,7 +183,7 @@ public class LiveAudienceActivity extends LiveActivity {
if (EasyFloat.isShow("LiveFloatView")) {
EasyFloat.dismiss("LiveFloatView", true);
}
IMLoginManager.get(mContext).initISHint("1");
IMLoginManager.get(mContext).initISHint();
}
public void setBackIndex(int backIndex) {

View File

@ -480,7 +480,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
if (!IMLoginManager.get(mContext).isHint()) {
if (IMLoginManager.get(mContext).isHint()) {
HintDialog fragment = new HintDialog();
fragment.show(getSupportFragmentManager(), "HintDialog");
}

View File

@ -144,12 +144,12 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioGiftEffects);
}
//更新特效开关
IMLoginManager.get(mContext).setMountEffect(mountEffect);
IMLoginManager.get(mContext).setMountEffect(giftEffect);
}
});
//屏蔽礼物特效
ViewClicksAntiShake.clicksAntiShake(studioGiftEffects, new ViewClicksAntiShake.ViewClicksCallBack() {
ViewClicksAntiShake.clicksAntiShake(studioRideEffects, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
giftEffect = !giftEffect;
@ -159,7 +159,7 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
}
//更新特效开关
IMLoginManager.get(mContext).setGiftEffect(giftEffect);
IMLoginManager.get(mContext).setGiftEffect(mountEffect);
}
});
//直播间滚动

View File

@ -42,7 +42,6 @@ public class HintDialog extends AbsDialogFragment {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
IMLoginManager.get(mContext).initISHint("3");
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_set_up), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="11.5dp" />
<corners android:radius="15dp" />
<solid android:color="#EE565A" />
</shape>

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/white"
android:paddingLeft="15dp"
android:paddingRight="15dp"
>
android:paddingLeft="26.33dp"
android:paddingRight="26.33dp">
<TextView
android:id="@+id/name"
@ -14,21 +12,18 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/textColor"
android:textSize="16sp"
/>
android:textSize="16sp" />
<ImageView
android:layout_width="16dp"
android:layout_height="18dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@mipmap/icon_arrow_right"
/>
android:src="@mipmap/icon_arrow_right" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:background="@color/gray2"
/>
android:background="@color/gray2" />
</RelativeLayout>

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/white"
android:paddingLeft="15dp"
android:paddingRight="15dp"
>
android:paddingLeft="26.33dp"
android:paddingRight="26.33dp">
<TextView
android:id="@+id/name"
@ -14,8 +12,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/textColor"
android:textSize="16sp"
/>
android:textSize="16sp" />
<TextView
android:id="@+id/text"
@ -24,13 +21,11 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/global"
android:textSize="16sp"
/>
android:textSize="16sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:background="@color/gray2"
/>
android:background="@color/gray2" />
</RelativeLayout>

View File

@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="50dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="50dp"
android:background="@color/white"
android:gravity="center"
android:textColor="@color/textColor"
android:textSize="16sp"
/>
android:textSize="16sp" />
</FrameLayout>