设置页面修改
This commit is contained in:
parent
e0a398a9fd
commit
5f27031620
@ -32,6 +32,15 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private final static String IS_CHAT = "isChat";
|
private final static String IS_CHAT = "isChat";
|
||||||
private final static String IS_SLIDE = "isSlide";
|
private final static String IS_SLIDE = "isSlide";
|
||||||
private final static String IS_FLOAT = "is_float";
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initISHint(String isHint) {
|
||||||
|
put(IS_HINT, isHint);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储是否打开悬浮窗权限提示
|
* 存储是否打开悬浮窗权限提示
|
||||||
@ -43,7 +52,6 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isFloat() {
|
public boolean isFloat() {
|
||||||
|
@ -28,6 +28,7 @@ public class RouteUtil {
|
|||||||
public static final String PATH_MAIN = "/main/MainActivity";
|
public static final String PATH_MAIN = "/main/MainActivity";
|
||||||
public static final String PATH_ENTRY = "/main/EntryActivity";
|
public static final String PATH_ENTRY = "/main/EntryActivity";
|
||||||
public static final String PATH_LIVE_AUDIENCE = "/live/LiveAudienceActivity";
|
public static final String PATH_LIVE_AUDIENCE = "/live/LiveAudienceActivity";
|
||||||
|
public static final String PATH_SETTING = "/main/SettingActivity";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动页
|
* 启动页
|
||||||
@ -113,7 +114,13 @@ public class RouteUtil {
|
|||||||
ARouter.getInstance().build(PATH_EDITPROFILE)
|
ARouter.getInstance().build(PATH_EDITPROFILE)
|
||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 修改个人资料
|
||||||
|
*/
|
||||||
|
public static void forwardSettingActivity() {
|
||||||
|
ARouter.getInstance().build(PATH_SETTING)
|
||||||
|
.navigation();
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 打开直播页面
|
* 打开直播页面
|
||||||
*/
|
*/
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/special_mount_switch"
|
android:id="@+id/special_mount_switch"
|
||||||
android:layout_width="40.8dp"
|
android:layout_width="37dp"
|
||||||
android:layout_height="24.8dp"
|
android:layout_height="24.8dp"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:src="@mipmap/special_icon_off" />
|
android:src="@mipmap/special_icon_off" />
|
||||||
|
@ -921,4 +921,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="system_window">ALL Minimize Play</string>
|
<string name="system_window">ALL Minimize Play</string>
|
||||||
<string name="system_window_hint">Show on other apps and pages \n Need to open the display</string>
|
<string name="system_window_hint">Show on other apps and pages \n Need to open the display</string>
|
||||||
<string name="to_open_the">Go to open</string>
|
<string name="to_open_the">Go to open</string>
|
||||||
|
<string name="do_you_like">Don\'t like the small window play?\n You can turn it off in [Personal Center] - [Settings]</string>
|
||||||
|
<string name="to_set_up">Go to Settings</string>
|
||||||
|
<string name="know_the">Got it</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -933,4 +933,14 @@
|
|||||||
<string name="system_window">APP全應用小窗播放</string>
|
<string name="system_window">APP全應用小窗播放</string>
|
||||||
<string name="system_window_hint">在其他應用上及所有界面显示小窗\n需打開懸浮窗權限。</string>
|
<string name="system_window_hint">在其他應用上及所有界面显示小窗\n需打開懸浮窗權限。</string>
|
||||||
<string name="to_open_the">前往打開</string>
|
<string name="to_open_the">前往打開</string>
|
||||||
|
<string name="do_you_like">不喜歡小窗播放吗?\n 可以在「個人中心」-「設定」中關閉</string>
|
||||||
|
<string name="to_set_up">去設置</string>
|
||||||
|
<string name="know_the">知道了</string>
|
||||||
|
<string name="individual_set">個人設定</string>
|
||||||
|
<string name="reward">獎勵</string>
|
||||||
|
<string name="change_the_password">修改密碼</string>
|
||||||
|
<string name="blacklist">黑名单</string>
|
||||||
|
<string name="alerts">消息通知</string>
|
||||||
|
<string name="studio_gift_effects">屏蔽直播間禮物特效</string>
|
||||||
|
<string name="studio_ride_effects">屏蔽直播間座駕特效</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBackIndex(int backIndex) {
|
public void setBackIndex(int backIndex) {
|
||||||
|
@ -93,6 +93,7 @@ import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
|||||||
import com.yunbao.live.utils.LiveStorge;
|
import com.yunbao.live.utils.LiveStorge;
|
||||||
import com.yunbao.live.views.ChatListViewHolder;
|
import com.yunbao.live.views.ChatListViewHolder;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
|
import com.yunbao.main.dialog.HintDialog;
|
||||||
import com.yunbao.main.dialog.MainStartDialogFragment;
|
import com.yunbao.main.dialog.MainStartDialogFragment;
|
||||||
import com.yunbao.main.dialog.ReturnUserDialog;
|
import com.yunbao.main.dialog.ReturnUserDialog;
|
||||||
import com.yunbao.main.dialog.SigninDialog;
|
import com.yunbao.main.dialog.SigninDialog;
|
||||||
@ -470,12 +471,22 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
//获取指导员账号
|
//获取指导员账号
|
||||||
ConversationIMListManager.get(this).getUserInstructor(this);
|
ConversationIMListManager.get(this).getUserInstructor(this);
|
||||||
checkVersion();
|
checkVersion();
|
||||||
// new Handler().postDelayed(new Runnable() {
|
|
||||||
// @Override
|
}
|
||||||
// public void run() {
|
|
||||||
// startActivity(new Intent(MainActivity.this,TestActivity.class));
|
@Override
|
||||||
// }
|
protected void onRestart() {
|
||||||
// },1000);
|
super.onRestart();
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (!IMLoginManager.get(mContext).isHint()) {
|
||||||
|
HintDialog fragment = new HintDialog();
|
||||||
|
fragment.show(getSupportFragmentManager(), "HintDialog");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,18 +1,31 @@
|
|||||||
package com.yunbao.main.activity;
|
package com.yunbao.main.activity;
|
||||||
|
|
||||||
|
import static com.yunbao.common.Constants.SETTING_CLEAR_CACHE;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.SpannableStringBuilder;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.lzf.easyfloat.interfaces.OnPermissionResult;
|
||||||
|
import com.lzf.easyfloat.permission.PermissionUtils;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
import com.yunbao.common.activity.WebViewActivity;
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
import com.yunbao.common.bean.ConfigBean;
|
import com.yunbao.common.bean.ConfigBean;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
@ -21,9 +34,11 @@ import com.yunbao.common.interfaces.OnItemClickListener;
|
|||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.GlideCatchUtil;
|
import com.yunbao.common.utils.GlideCatchUtil;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.VersionUtil;
|
import com.yunbao.common.utils.VersionUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.adapter.SettingAdapter;
|
import com.yunbao.main.adapter.SettingAdapter;
|
||||||
import com.yunbao.main.bean.SettingBean;
|
import com.yunbao.main.bean.SettingBean;
|
||||||
@ -37,17 +52,18 @@ import java.util.List;
|
|||||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
|
|
||||||
import static com.yunbao.common.Constants.SETTING_CLEAR_CACHE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/9/30.
|
* Created by cxf on 2018/9/30.
|
||||||
*/
|
*/
|
||||||
|
@Route(path = RouteUtil.PATH_SETTING)
|
||||||
public class SettingActivity extends AbsActivity implements OnItemClickListener<SettingBean> {
|
public class SettingActivity extends AbsActivity implements OnItemClickListener<SettingBean> {
|
||||||
|
|
||||||
private RecyclerView mRecyclerView;
|
private RecyclerView mRecyclerView;
|
||||||
private Handler mHandler;
|
private Handler mHandler;
|
||||||
private SettingAdapter mAdapter;
|
private SettingAdapter mAdapter;
|
||||||
|
private ImageView studioGiftEffects, studioRideEffects, upSlideSettings, appWindow, systemWindow;
|
||||||
|
private boolean giftEffect, mountEffect, slide, isFloat;
|
||||||
|
private TextView systemHit;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@ -56,10 +72,18 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
setTitle(WordUtil.getString(R.string.setting));
|
setTitle(WordUtil.getString(R.string.set_up));
|
||||||
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||||
|
studioGiftEffects = findViewById(R.id.studio_gift_effects);
|
||||||
|
studioRideEffects = findViewById(R.id.studio_ride_effects);
|
||||||
|
upSlideSettings = findViewById(R.id.up_slide_settings);
|
||||||
|
appWindow = findViewById(R.id.app_window);
|
||||||
|
systemHit = findViewById(R.id.system_hit);
|
||||||
|
systemWindow = findViewById(R.id.system_window);
|
||||||
mRecyclerView.setHasFixedSize(true);
|
mRecyclerView.setHasFixedSize(true);
|
||||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||||
|
giftEffect = IMLoginManager.get(mContext).isGiftEffect();
|
||||||
|
mountEffect = IMLoginManager.get(mContext).isMountEffect();
|
||||||
MainHttpUtil.getSettingList(new HttpCallback() {
|
MainHttpUtil.getSettingList(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
@ -79,6 +103,149 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
|||||||
mRecyclerView.setAdapter(mAdapter);
|
mRecyclerView.setAdapter(mAdapter);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//黑名单
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.blacklist), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//修改密码
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.change_the_password), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
forwardModifyPwd();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//消息通知
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.alerts), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
startActivity(new Intent(SettingActivity.this, MsgSettActivity.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//屏蔽坐骑特效
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(studioGiftEffects, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
mountEffect = !mountEffect;
|
||||||
|
if (mountEffect) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioGiftEffects);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioGiftEffects);
|
||||||
|
}
|
||||||
|
//更新特效开关
|
||||||
|
IMLoginManager.get(mContext).setMountEffect(mountEffect);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
//屏蔽礼物特效
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(studioGiftEffects, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
giftEffect = !giftEffect;
|
||||||
|
if (giftEffect) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioRideEffects);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
|
||||||
|
}
|
||||||
|
//更新特效开关
|
||||||
|
IMLoginManager.get(mContext).setGiftEffect(giftEffect);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//直播间滚动
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(upSlideSettings, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
slide = !slide;
|
||||||
|
if (slide) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, upSlideSettings);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, upSlideSettings);
|
||||||
|
}
|
||||||
|
//滑动设置
|
||||||
|
IMLoginManager.get(mContext).initSlide(slide);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//APP内小窗
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(appWindow, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
isFloat = !isFloat;
|
||||||
|
if (!isFloat) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, appWindow);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, appWindow);
|
||||||
|
}
|
||||||
|
//更新特效开关
|
||||||
|
IMLoginManager.get(mContext).initFloat(isFloat);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//系统悬浮窗
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(systemWindow, () -> {
|
||||||
|
PermissionUtils.requestPermission(mContext, new OnPermissionResult() {
|
||||||
|
@Override
|
||||||
|
public void permissionResult(boolean isFloat) {
|
||||||
|
if (!isFloat) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, systemWindow);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, systemWindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
//系统悬浮窗
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(systemHit, () -> {
|
||||||
|
PermissionUtils.requestPermission(mContext, new OnPermissionResult() {
|
||||||
|
@Override
|
||||||
|
public void permissionResult(boolean isFloat) {
|
||||||
|
if (!isFloat) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, systemWindow);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, systemWindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder(getString(com.yunbao.common.R.string.system_window_hint));
|
||||||
|
String goTo = getString(com.yunbao.common.R.string.to_open_the);
|
||||||
|
int star = builder.length();
|
||||||
|
int end = star + goTo.length();
|
||||||
|
builder.append(goTo);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#ffaf08")),
|
||||||
|
star, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
|
||||||
|
systemHit.setText(builder);
|
||||||
|
boolean floatPermission = PermissionUtils.checkPermission(mContext);
|
||||||
|
if (!floatPermission) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, systemWindow);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, systemWindow);
|
||||||
|
}
|
||||||
|
isFloat = IMLoginManager.get(mContext).isFloat();
|
||||||
|
if (!isFloat) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, appWindow);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, appWindow);
|
||||||
|
}
|
||||||
|
slide = IMLoginManager.get(mContext).isSlide();
|
||||||
|
if (slide) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, upSlideSettings);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, upSlideSettings);
|
||||||
|
}
|
||||||
|
if (giftEffect) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioGiftEffects);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioGiftEffects);
|
||||||
|
}
|
||||||
|
if (mountEffect) {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, studioRideEffects);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
55
main/src/main/java/com/yunbao/main/dialog/HintDialog.java
Normal file
55
main/src/main/java/com/yunbao/main/dialog/HintDialog.java
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
package com.yunbao.main.dialog;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
import com.yunbao.main.R;
|
||||||
|
|
||||||
|
public class HintDialog extends AbsDialogFragment {
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.view_hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getDialogStyle() {
|
||||||
|
return R.style.dialog;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canCancel() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setWindowAttributes(Window window) {
|
||||||
|
window.setWindowAnimations(com.yunbao.live.R.style.bottomToTopAnim);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = DpUtil.dp2px(277);
|
||||||
|
params.height = DpUtil.dp2px(134);
|
||||||
|
params.gravity = Gravity.CENTER;
|
||||||
|
window.setAttributes(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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() {
|
||||||
|
RouteUtil.forwardSettingActivity();
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.know_the), () -> dismiss());
|
||||||
|
}
|
||||||
|
}
|
5
main/src/main/res/drawable/bc_reward.xml
Normal file
5
main/src/main/res/drawable/bc_reward.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="11.5dp" />
|
||||||
|
<solid android:color="#EE565A" />
|
||||||
|
</shape>
|
@ -2,18 +2,349 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:background="#F5F6F7"
|
||||||
>
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include layout="@layout/view_title" />
|
<include layout="@layout/view_title" />
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="15.33dp"
|
||||||
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:text="@string/individual_set"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:background="@drawable/bc_reward"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingTop="5.67dp"
|
||||||
|
android:paddingEnd="13.33dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:text="@string/reward"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="17dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/change_the_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:text="@string/change_the_password"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="17dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/blacklist"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:text="@string/blacklist"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="17dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/alerts"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingBottom="25dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:text="@string/alerts"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="17dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="13.67dp"
|
||||||
|
android:paddingBottom="11dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:text="@string/studio_gift_effects"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/studio_gift_effects"
|
||||||
|
android:layout_width="46.67dp"
|
||||||
|
android:layout_height="23.33dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/special_icon_off" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="13.67dp"
|
||||||
|
android:paddingBottom="11dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:text="@string/studio_ride_effects"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/studio_ride_effects"
|
||||||
|
android:layout_width="46.67dp"
|
||||||
|
android:layout_height="23.33dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/special_icon_off" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="13.67dp"
|
||||||
|
android:paddingBottom="11dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:text="@string/up_slide_settings"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/up_slide_settings"
|
||||||
|
android:layout_width="46.67dp"
|
||||||
|
android:layout_height="23.33dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/special_icon_off" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="13.67dp"
|
||||||
|
android:paddingBottom="11dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/app_window"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="@string/app_window_hint"
|
||||||
|
android:textColor="#C7C8C9"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/app_window"
|
||||||
|
android:layout_width="46.67dp"
|
||||||
|
android:layout_height="23.33dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/special_icon_off" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingTop="13.67dp"
|
||||||
|
android:paddingBottom="24dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/system_window"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/system_hit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="@string/system_window_hint"
|
||||||
|
android:textColor="#C7C8C9"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/system_window"
|
||||||
|
android:layout_width="46.67dp"
|
||||||
|
android:layout_height="23.33dp"
|
||||||
|
android:layout_marginEnd="26.33dp"
|
||||||
|
android:src="@mipmap/special_icon_off" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerView"
|
android:id="@+id/recyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="10dp"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never" />
|
||||||
/>
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
54
main/src/main/res/layout/view_hint.xml
Normal file
54
main/src/main/res/layout/view_hint.xml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView 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="277dp"
|
||||||
|
android:layout_height="133.67dp"
|
||||||
|
app:cardBackgroundColor="@color/white"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="0dp"
|
||||||
|
app:cardPreventCornerOverlap="true"
|
||||||
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16.33dp"
|
||||||
|
android:layout_marginTop="24.67dp"
|
||||||
|
android:text="@string/do_you_like"
|
||||||
|
android:textColor="#161616"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_marginEnd="33.67dp"
|
||||||
|
android:layout_marginBottom="23.67dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/to_set_up"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/to_set_up"
|
||||||
|
android:textColor="#B1B1B1"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/know_the"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="23.33dp"
|
||||||
|
android:text="@string/know_the"
|
||||||
|
android:textColor="#FFAF08"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
BIN
main/src/main/res/mipmap-xxxhdpi/special_icon_off.png
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/special_icon_off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
BIN
main/src/main/res/mipmap-xxxhdpi/special_icon_on.png
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/special_icon_on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
Loading…
Reference in New Issue
Block a user