设定页面修改
This commit is contained in:
parent
c2d2687441
commit
1ecad0f89f
@ -34,14 +34,20 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private final static String IS_FLOAT = "is_float";
|
private final static String IS_FLOAT = "is_float";
|
||||||
private final static String IS_HINT = "is_hint";
|
private final static String IS_HINT = "is_hint";
|
||||||
|
|
||||||
|
|
||||||
public boolean isHint() {
|
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) {
|
public void initISHint() {
|
||||||
put(IS_HINT, isHint);
|
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);
|
// IMCenter.getInstance().clearConversations(null, Conversation.ConversationType.PRIVATE);
|
||||||
RongcloudIMManager.logoutIM();
|
RongcloudIMManager.logoutIM();
|
||||||
MessageIMManager.get(context).logout();
|
MessageIMManager.get(context).logout();
|
||||||
|
put(IS_HINT, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
if (EasyFloat.isShow("LiveFloatView")) {
|
if (EasyFloat.isShow("LiveFloatView")) {
|
||||||
EasyFloat.dismiss("LiveFloatView", true);
|
EasyFloat.dismiss("LiveFloatView", true);
|
||||||
}
|
}
|
||||||
IMLoginManager.get(mContext).initISHint("1");
|
IMLoginManager.get(mContext).initISHint();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBackIndex(int backIndex) {
|
public void setBackIndex(int backIndex) {
|
||||||
|
@ -480,7 +480,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!IMLoginManager.get(mContext).isHint()) {
|
if (IMLoginManager.get(mContext).isHint()) {
|
||||||
HintDialog fragment = new HintDialog();
|
HintDialog fragment = new HintDialog();
|
||||||
fragment.show(getSupportFragmentManager(), "HintDialog");
|
fragment.show(getSupportFragmentManager(), "HintDialog");
|
||||||
}
|
}
|
||||||
|
@ -144,12 +144,12 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
|||||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioGiftEffects);
|
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
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
giftEffect = !giftEffect;
|
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);
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
|
||||||
}
|
}
|
||||||
//更新特效开关
|
//更新特效开关
|
||||||
IMLoginManager.get(mContext).setGiftEffect(giftEffect);
|
IMLoginManager.get(mContext).setGiftEffect(mountEffect);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//直播间滚动
|
//直播间滚动
|
||||||
|
@ -42,7 +42,6 @@ public class HintDialog extends AbsDialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
IMLoginManager.get(mContext).initISHint("3");
|
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_set_up), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_set_up), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<corners android:radius="11.5dp" />
|
<corners android:radius="15dp" />
|
||||||
<solid android:color="#EE565A" />
|
<solid android:color="#EE565A" />
|
||||||
</shape>
|
</shape>
|
@ -1,12 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:paddingLeft="15dp"
|
android:paddingLeft="26.33dp"
|
||||||
android:paddingRight="15dp"
|
android:paddingRight="26.33dp">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
@ -14,21 +12,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:src="@mipmap/icon_arrow_right"
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:background="@color/gray2"
|
android:background="@color/gray2" />
|
||||||
/>
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -1,12 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:paddingLeft="15dp"
|
android:paddingLeft="26.33dp"
|
||||||
android:paddingRight="15dp"
|
android:paddingRight="26.33dp">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
@ -14,8 +12,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text"
|
android:id="@+id/text"
|
||||||
@ -24,13 +21,11 @@
|
|||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:textColor="@color/global"
|
android:textColor="@color/global"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:background="@color/gray2"
|
android:background="@color/gray2" />
|
||||||
/>
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -1,19 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginBottom="50dp"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="50dp"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user