Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
77f5d89f28
@ -32,6 +32,21 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
private final static String IS_CHAT = "isChat";
|
||||
private final static String IS_SLIDE = "isSlide";
|
||||
private final static String IS_FLOAT = "is_float";
|
||||
private final static String IS_HINT = "is_hint";
|
||||
|
||||
|
||||
public boolean isHint() {
|
||||
return 1 == getInt(IS_HINT, 0);
|
||||
}
|
||||
|
||||
public void initISHint() {
|
||||
if (getInt(IS_HINT, 0) < 2) {
|
||||
int number = getInt(IS_HINT, 0) + 1;
|
||||
put(IS_HINT, number);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 存储是否打开悬浮窗权限提示
|
||||
@ -43,7 +58,6 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isFloat() {
|
||||
@ -279,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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ public class RouteUtil {
|
||||
public static final String PATH_MAIN = "/main/MainActivity";
|
||||
public static final String PATH_ENTRY = "/main/EntryActivity";
|
||||
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)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改个人资料
|
||||
*/
|
||||
public static void forwardSettingActivity() {
|
||||
ARouter.getInstance().build(PATH_SETTING)
|
||||
.navigation();
|
||||
}
|
||||
/**
|
||||
* 打开直播页面
|
||||
*/
|
||||
|
@ -168,5 +168,8 @@ public class APPEasyFloat implements Application.ActivityLifecycleCallbacks {
|
||||
FloatingView.get().remove();
|
||||
FloatingView.get().detach(activity);
|
||||
activity.getApplication().unregisterActivityLifecycleCallbacks(this);
|
||||
if (magnetViewListener != null) {
|
||||
magnetViewListener.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,6 @@ public interface MagnetViewListener {
|
||||
void invoke(FloatingMagnetView magnetView);
|
||||
|
||||
void onRemove();
|
||||
|
||||
void dismiss();
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void builderFloat(Activity mContext, String url,Class<?> back) {
|
||||
public void builderFloat(Activity mContext, String url, Class<?> back) {
|
||||
this.mContext = mContext;
|
||||
this.url = url;
|
||||
APPEasyFloat.getInstance().layout(R.layout.view_flaot_live)
|
||||
@ -77,7 +77,13 @@ public class LiveFloatView implements Function1<FloatCallbacks.Builder, Unit> {
|
||||
|
||||
@Override
|
||||
public void onRemove() {
|
||||
// mPlayer.stopPlay();
|
||||
//
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
if (mPlayer != null)
|
||||
mPlayer.stopPlay();
|
||||
}
|
||||
})
|
||||
.show(mContext);
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/special_mount_switch"
|
||||
android:layout_width="40.8dp"
|
||||
android:layout_width="37dp"
|
||||
android:layout_height="24.8dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:src="@mipmap/special_icon_off" />
|
||||
|
@ -921,4 +921,14 @@ Limited ride And limited avatar frame</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="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>
|
||||
<string name="individual_set">Personal Settings</string>
|
||||
<string name="reward">Rewards</string>
|
||||
<string name="change_the_password">Change password</string>
|
||||
<string name="blacklist">Blacklist</string>
|
||||
<string name="alerts">Message Settings</string>
|
||||
<string name="studio_gift_effects">Blocking gift effects</string>
|
||||
<string name="studio_ride_effects">Blocking seat effects</string>
|
||||
</resources>
|
||||
|
@ -933,4 +933,14 @@
|
||||
<string name="system_window">APP全應用小窗播放</string>
|
||||
<string name="system_window_hint">在其他應用上及所有界面显示小窗\n需打開懸浮窗權限。</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>
|
||||
|
@ -183,7 +183,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (EasyFloat.isShow("LiveFloatView")) {
|
||||
EasyFloat.dismiss("LiveFloatView", true);
|
||||
}
|
||||
|
||||
IMLoginManager.get(mContext).initISHint();
|
||||
}
|
||||
|
||||
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.views.ChatListViewHolder;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.dialog.HintDialog;
|
||||
import com.yunbao.main.dialog.MainStartDialogFragment;
|
||||
import com.yunbao.main.dialog.ReturnUserDialog;
|
||||
import com.yunbao.main.dialog.SigninDialog;
|
||||
@ -470,12 +471,22 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
//获取指导员账号
|
||||
ConversationIMListManager.get(this).getUserInstructor(this);
|
||||
checkVersion();
|
||||
// new Handler().postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// startActivity(new Intent(MainActivity.this,TestActivity.class));
|
||||
// }
|
||||
// },1000);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestart() {
|
||||
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;
|
||||
|
||||
import static com.yunbao.common.Constants.SETTING_CLEAR_CACHE;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
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.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
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.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@ -21,9 +34,12 @@ import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.GlideCatchUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.SettingAdapter;
|
||||
import com.yunbao.main.bean.SettingBean;
|
||||
@ -37,17 +53,18 @@ import java.util.List;
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import io.rong.imlib.RongIMClient;
|
||||
|
||||
import static com.yunbao.common.Constants.SETTING_CLEAR_CACHE;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/30.
|
||||
*/
|
||||
|
||||
@Route(path = RouteUtil.PATH_SETTING)
|
||||
public class SettingActivity extends AbsActivity implements OnItemClickListener<SettingBean> {
|
||||
|
||||
private RecyclerView mRecyclerView;
|
||||
private Handler mHandler;
|
||||
private SettingAdapter mAdapter;
|
||||
private ImageView studioGiftEffects, studioRideEffects, upSlideSettings, appWindow, systemWindow;
|
||||
private boolean giftEffect, mountEffect, slide, isFloat;
|
||||
private TextView systemHit;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@ -56,10 +73,18 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
setTitle(WordUtil.getString(R.string.setting));
|
||||
setTitle(WordUtil.getString(R.string.set_up));
|
||||
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.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
giftEffect = IMLoginManager.get(mContext).isGiftEffect();
|
||||
mountEffect = IMLoginManager.get(mContext).isMountEffect();
|
||||
MainHttpUtil.getSettingList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
@ -79,6 +104,158 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
}
|
||||
});
|
||||
//跳转自己
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.individual_set), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
RouteUtil.forwardEditProfileActivity();
|
||||
}
|
||||
});
|
||||
|
||||
//黑名单
|
||||
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(giftEffect);
|
||||
}
|
||||
|
||||
});
|
||||
//屏蔽礼物特效
|
||||
ViewClicksAntiShake.clicksAntiShake(studioRideEffects, 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(mountEffect);
|
||||
}
|
||||
});
|
||||
//直播间滚动
|
||||
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);
|
||||
APPEasyFloat.getInstance().dismiss(mContext);
|
||||
}
|
||||
});
|
||||
//系统悬浮窗
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -93,11 +270,11 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
} else if (bean.getId() == Constants.SETTING_UPDATE_ID) {//检查更新
|
||||
checkVersion();
|
||||
} else if (bean.getId() == Constants.SETTING_ISBLACK) {//拉黑列表
|
||||
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(),1);
|
||||
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 1);
|
||||
} else if (bean.getId() == SETTING_CLEAR_CACHE) {//清除缓存
|
||||
clearCache(position);
|
||||
}else if (bean.getId() == 21) {//清除缓存
|
||||
startActivity(new Intent(SettingActivity.this,MsgSettActivity.class));
|
||||
clearCache(position);
|
||||
} else if (bean.getId() == 21) {//清除缓存
|
||||
startActivity(new Intent(SettingActivity.this, MsgSettActivity.class));
|
||||
}
|
||||
} else {
|
||||
if (bean.getId() == 17) {//意见反馈要在url上加版本号和设备号
|
||||
|
54
main/src/main/java/com/yunbao/main/dialog/HintDialog.java
Normal file
54
main/src/main/java/com/yunbao/main/dialog/HintDialog.java
Normal file
@ -0,0 +1,54 @@
|
||||
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);
|
||||
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="15dp" />
|
||||
<solid android:color="#EE565A" />
|
||||
</shape>
|
@ -1,19 +1,351 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F6F7"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/view_title"/>
|
||||
<include layout="@layout/view_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:overScrollMode="never"
|
||||
/>
|
||||
<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:id="@+id/individual_set"
|
||||
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
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:overScrollMode="never" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -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>
|
@ -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>
|
@ -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>
|
||||
|
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