1:添加元旦主题,添加新的接口

This commit is contained in:
2025-12-30 14:16:03 +08:00
parent 4f48c55cf6
commit ab556d2519
100 changed files with 511 additions and 234 deletions

View File

@@ -103,7 +103,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
// 注册背景更新监听器
BackgroundManager.getInstance().addListener(this);
// 尝试加载网络背景
loadNetworkBackground();
// loadNetworkBackground();
// 注册颜色变化监听器
ColorManager.getInstance().addColorChangeListener(this);
@@ -179,28 +179,37 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
protected void loadNetworkBackground() {
// 只有当已经有背景URL时才加载
String backgroundUrl = BackgroundManager.getInstance().getBackgroundUrl();
if (backgroundUrl != null && !backgroundUrl.isEmpty()) {
// 检查是否有已加载的drawable
Drawable cachedDrawable = BackgroundManager.getInstance().getBackgroundDrawable();
if (cachedDrawable != null) {
getWindow().getDecorView().setBackground(cachedDrawable);
} else {
// 加载网络背景
BackgroundManager.getInstance().loadBackgroundDrawable(this, new BackgroundManager.BackgroundLoadCallback() {
@Override
public void onLoadSuccess(Drawable drawable) {
getWindow().getDecorView().setBackground(drawable);
}
int backgroundUrl = BackgroundManager.getInstance().getBackgroundUrl();
getWindow().getDecorView().setBackgroundResource(backgroundUrl);
@Override
public void onLoadFailed() {
// 加载失败时使用默认背景
getWindow().getDecorView().setBackgroundResource(R.mipmap.activity_bj);
}
});
}
}
// String backgroundUrl = BackgroundManager.getInstance().getBackgroundUrl();
// if (backgroundUrl != null && !backgroundUrl.isEmpty()) {
// // 检查是否有已加载的drawable
// Drawable cachedDrawable = BackgroundManager.getInstance().getBackgroundDrawable();
// if (cachedDrawable != null) {
// getWindow().getDecorView().setBackground(cachedDrawable);
// } else {
// // 加载网络背景
// BackgroundManager.getInstance().loadBackgroundDrawable(this, new BackgroundManager.BackgroundLoadCallback() {
// @Override
// public void onLoadSuccess(Drawable drawable) {
// getWindow().getDecorView().setBackground(drawable);
// }
//
// @Override
// public void onLoadFailed() {
// // 加载失败时使用默认背景
// getWindow().getDecorView().setBackgroundResource(R.mipmap.activity_bj);
// }
//
// @Override
// public void onLoadComplete(int resultId) {
//
// }
// });
// }
// }
}
@Override
@@ -213,7 +222,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
// 提供一个方法供子类调用用于设置背景URL
protected void setNetworkBackgroundUrl(String url) {
BackgroundManager.getInstance().setBackgroundUrl(url);
// BackgroundManager.getInstance().setBackgroundUrl(url);
}
@Override

View File

@@ -136,7 +136,9 @@ public class CommonAppContext extends MultiDexApplication implements Application
@Getter
public UnreadCountEvent unreadCountEvent;
public static int selectRelease = 1;
public static int selectRelease = -1;
public int is_open = 0;//主题的开关
@Override
public void onCreate() {

View File

@@ -0,0 +1,11 @@
package com.xscm.moduleutil.bean
/**
* 项目名称:羽声语音
* 时间2025/12/30 9:44
* 用途:节日主题接口
*/
class FestivalThemeBean {
var is_open : Int = 0 //主题开关
var theme_name : String = "" //主题名称
}

View File

@@ -1,5 +1,8 @@
package com.xscm.moduleutil.bean;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.base.CommonAppContext;
import lombok.Data;
/**
@@ -9,17 +12,115 @@ import lombok.Data;
*/
@Data
public class ThemeBean {
private String theme_color;//主题颜色
private int is_open;
private String theme_name;
private String theme_color="#22BB79";//主题颜色
private String file_url;//
private String auxiliary_color;//
private String btn_text_color;//按钮文字颜色
private String app_bg;//app背景图
private String home_sel;//首页选中
private String home_nor;//首页未选中
private String find_sel;//广场选中
private String find_nor;//广场未选中
private String msg_sel;//消息选中
private String msg_nor;//消息未选中
private String mine_sel;//我的选中
private String mine_nor;//我的未选中
private String btn_text_color="#3ABC6D";//按钮文字颜色
private int app_bg;//app背景图
private int home_sel;//首页选中
private int home_nor;//首页未选中
private int find_sel;//广场选中
private int find_nor;//广场未选中
private int msg_sel;//消息选中
private int msg_nor;//消息未选中
private int mine_sel;//我的选中
private int mine_nor;//我的未选中
public int getIs_open() {
CommonAppContext.getInstance().is_open = is_open;
return is_open;
}
public void setIs_open(int is_open) {
this.is_open = is_open;
CommonAppContext.getInstance().is_open = is_open;
}
public String getTheme_color() {
return "#22BB79";
}
public String getFile_url() {
return file_url;
}
public String getAuxiliary_color() {
return auxiliary_color;
}
public String getBtn_text_color() {
// if (CommonAppContext.getInstance().is_open == 1){
// return "#FF663B";
// }
return "#FFFFFF";
}
public int getApp_bg() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.bg_dark;
}else {
return R.mipmap.activity_bj;
}
}
public int getHome_sel() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_sy_select;
}
return R.mipmap.tab_main_media_selected;
}
public int getHome_nor() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_sy_notselect;
}
return R.mipmap.tab_main_media_unselected;
}
public int getFind_sel() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_dt_select;
}
return R.mipmap.icon_me_trend_select;
}
public int getFind_nor() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_dt_notselect;
}
return R.mipmap.icon_me_trend_unselect;
}
public int getMsg_sel() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_xx_select;
}
return R.mipmap.icon_news_select;
}
public int getMsg_nor() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_xx_notselect;
}
return R.mipmap.icon_news_un_select;
}
public int getMine_sel() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_wd_select;
}
return R.mipmap.icon_my_select;
}
public int getMine_nor() {
if (CommonAppContext.getInstance().is_open == 1){
return R.mipmap.icon_wd_notselect;
}
return R.mipmap.icon_my_un_select;
}
}

View File

@@ -41,6 +41,8 @@ public interface ApiServer {
@POST(Constants.MODIFY_MOBILE)
Call<BaseModel<String>> mobileView(@Field("mobile") String mobile, @Field("new_mobile") String new_mobile, @Field("sms_code") String sms_code,@Field("new_sms_code") String new_sms_code);
@GET(Constants.GET_FESTIVAL_THEME)
Call<BaseModel<FestivalThemeBean>> getFestivalThemeBean();
@GET(Constants.GET_EMOTION)
Call<BaseModel<List<Emotion>>> upEmotion();
@@ -255,7 +257,8 @@ public interface ApiServer {
@POST(Constants.URL_LOGIN)
Call<BaseModel<List<UserBean>>> oauthLogin(@Field("login_token") String login_token);
@GET(Constants.GET_THEME_DATA)
// @GET(Constants.GET_THEME_DATA)
@GET(Constants.GET_FESTIVAL_THEME)
Call<BaseModel<ThemeBean>> getThemeData();
@FormUrlEncoded

View File

@@ -251,6 +251,34 @@ public class RetrofitClient {
});
}
public void getFestivalTheme(BaseObserver<FestivalThemeBean> observer) {
sApiServer.getFestivalThemeBean().enqueue(new Callback<BaseModel<FestivalThemeBean>>() {
@Override
public void onResponse(Call<BaseModel<FestivalThemeBean>> call, Response<BaseModel<FestivalThemeBean>> response) {
if (response.code() == 200) {
BaseModel<FestivalThemeBean> body = response.body();
if (body.getCode() == 1) {
observer.onNext(body.getData());
} else if (body.getCode() == 0) {
observer.onNext(new FestivalThemeBean());
} else if (body.getCode() == 301) {
setCode301(body.getMsg());
}
} else {
ToastUtils.showLong("主题请求错误", response.code());
LogUtils.e("getFestivalTheme", response.message());
}
}
@Override
public void onFailure(Call<BaseModel<FestivalThemeBean>> call, Throwable t) {
LogUtils.e("getFestivalTheme", t.toString());
}
});
}
public void mobileView(String mobile, String new_mobile, String sms_code, String new_sms_code, BaseObserver<String> observer) {
sApiServer.mobileView(mobile, new_mobile, sms_code, new_sms_code).enqueue(new Callback<BaseModel<String>>() {
@Override

View File

@@ -16,7 +16,7 @@ import java.util.List;
*/
public class BackgroundManager {
private static BackgroundManager instance;
private String backgroundUrl;
private int backgroundUrl;
private Drawable backgroundDrawable;
private List<BackgroundUpdateListener> listeners = new ArrayList<>();
@@ -31,12 +31,16 @@ public class BackgroundManager {
return instance;
}
public void setBackgroundUrl(String url) {
public void setBackgroundUrl(int url) {
this.backgroundUrl = url;
loadBackground();
// loadBackground();
}
// public void setBackgroundUrl(String url) {
// this.backgroundUrl = url;
// loadBackground();
// }
public String getBackgroundUrl() {
public int getBackgroundUrl() {
return backgroundUrl;
}
@@ -44,43 +48,42 @@ public class BackgroundManager {
return backgroundDrawable;
}
private void loadBackground() {
if (backgroundUrl == null || backgroundUrl.isEmpty()) {
return;
}
// 这里使用一个临时的 ImageView 来加载图片
// 实际项目中可能需要使用 Application Context
// 为简化,这里直接加载到 drawable
}
// private void loadBackground() {
// if (backgroundUrl == null || backgroundUrl.isEmpty()) {
// return;
// }
// }
public void loadBackgroundDrawable(android.content.Context context, BackgroundLoadCallback callback) {
if (backgroundUrl == null || backgroundUrl.isEmpty()) {
if (backgroundUrl == 0 ) {
callback.onLoadFailed();
return;
}
Glide.with(context)
.asDrawable()
.load(backgroundUrl)
.into(new CustomTarget<Drawable>() {
@Override
public void onResourceReady(Drawable resource, Transition<? super Drawable> transition) {
backgroundDrawable = resource;
callback.onLoadSuccess(resource);
notifyBackgroundUpdated(resource);
}
callback.onLoadComplete(backgroundUrl);
@Override
public void onLoadCleared(Drawable placeholder) {
callback.onLoadFailed();
}
@Override
public void onLoadFailed(Drawable errorDrawable) {
super.onLoadFailed(errorDrawable);
callback.onLoadFailed();
}
});
// Glide.with(context)
// .asDrawable()
// .load(backgroundUrl)
// .into(new CustomTarget<Drawable>() {
// @Override
// public void onResourceReady(Drawable resource, Transition<? super Drawable> transition) {
// backgroundDrawable = resource;
// callback.onLoadSuccess(resource);
// notifyBackgroundUpdated(resource);
// }
//
// @Override
// public void onLoadCleared(Drawable placeholder) {
// callback.onLoadFailed();
// }
//
// @Override
// public void onLoadFailed(Drawable errorDrawable) {
// super.onLoadFailed(errorDrawable);
// callback.onLoadFailed();
// }
// });
}
public void addListener(BackgroundUpdateListener listener) {
@@ -102,6 +105,8 @@ public class BackgroundManager {
public interface BackgroundLoadCallback {
void onLoadSuccess(Drawable drawable);
void onLoadFailed();
void onLoadComplete(int resultId);
}
public interface BackgroundUpdateListener {

View File

@@ -449,6 +449,7 @@ public class Constants {
// public static final String MODIFY_MOBILE = "/api/UserData/modify_mobile";//手机换绑
public static final String MODIFY_MOBILE = "/api/UserData/modify_mobiles";//手机换绑
public static final String BIND_MOBILE = "/api/UserData/bind_mobile";//手机绑定
public static final String GET_FESTIVAL_THEME = "/api/Theme/get_festival_theme";//节日主题接口
public static final String POST_SIGN_START = "/api/Sign/start_sign";//签约开始

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -111,20 +111,34 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
private AppUpdateDialog appUpdateDialog;
private boolean isMediaSelected = false;
private String unselectedMediaUrl = ""; // 从服务器获取
private String selectedMediaUrl = ""; // 从服务器获取
private int unselectedMediaUrl ; // 从服务器获取
private int selectedMediaUrl ; // 从服务器获取
// 添加其他 tab 的图标 URL
private String unselectedTrendUrl = "";
private String selectedTrendUrl = "";
private String unselectedNewsUrl = "";
private String selectedNewsUrl = "";
private String unselectedMeUrl = "";
private String selectedMeUrl = "";
private int unselectedTrendUrl ;
private int selectedTrendUrl ;
private int unselectedNewsUrl ;
private int selectedNewsUrl ;
private int unselectedMeUrl ;
private int selectedMeUrl ;
// 添加文字颜色变量
private int selectedTextColor = 0; // 选中文字颜色 (从服务器获取)
private int unselectedTextColor = 0; // 未选中文字颜色 (从服务器获取)
// private String unselectedMediaUrl = ""; // 从服务器获取
// private String selectedMediaUrl = ""; // 从服务器获取
//
// // 添加其他 tab 的图标 URL
// private String unselectedTrendUrl = "";
// private String selectedTrendUrl = "";
// private String unselectedNewsUrl = "";
// private String selectedNewsUrl = "";
// private String unselectedMeUrl = "";
// private String selectedMeUrl = "";
//
// // 添加文字颜色变量
// private int selectedTextColor = 0; // 选中文字颜色 (从服务器获取)
// private int unselectedTextColor = 0; // 未选中文字颜色 (从服务器获取)
private InviteDialog inviteDialog;
@@ -199,7 +213,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
@Override
protected void initData() {
MvpPre.getThemeData();
// getThemeData(new ThemeBean());
fragments = new Fragment[]{
VoiceFragment.newInstance(), // 声播
CircleFragment.newInstance(), // 语圈
@@ -459,19 +473,22 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
}
private void updateMediaIcon() {
String imageUrl = (index == 0) ? selectedMediaUrl : unselectedMediaUrl;
if (!TextUtils.isEmpty(imageUrl)) {
Glide.with(this)
.load(imageUrl)
.placeholder(com.xscm.moduleutil.R.mipmap.tab_main_media_unselected) // 默认图标
.into(mBinding.imSy);
} else {
// 如果没有网络图标,使用默认的选中/未选中状态
int resId = (index == 0) ?
com.xscm.moduleutil.R.mipmap.tab_main_media_selected :
com.xscm.moduleutil.R.mipmap.tab_main_media_unselected;
mBinding.imTrend.setImageResource(resId);
}
int imageUrl = (index == 0) ? selectedMediaUrl : unselectedMediaUrl;
mBinding.imSy.setImageResource(imageUrl);
// if (!TextUtils.isEmpty(imageUrl)) {
// Glide.with(this)
// .load(imageUrl)
// .placeholder(com.xscm.moduleutil.R.mipmap.tab_main_media_unselected) // 默认图标
// .into(mBinding.imSy);
// } else {
// // 如果没有网络图标,使用默认的选中/未选中状态
// int resId = (index == 0) ?
// com.xscm.moduleutil.R.mipmap.tab_main_media_selected :
// com.xscm.moduleutil.R.mipmap.tab_main_media_unselected;
// mBinding.imTrend.setImageResource(resId);
// }
}
@@ -842,7 +859,6 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
// }
// }
}
@Override
public void getThemeData(ThemeBean themeBean) {
if (themeBean != null) {
@@ -864,23 +880,23 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
// 获取文字颜色
try {
if (themeBean.getBtn_text_color() != null && !themeBean.getBtn_text_color().isEmpty()) {
selectedTextColor = Color.parseColor(themeBean.getBtn_text_color());
selectedTextColor = Color.parseColor("#FF663B");
}
unselectedTextColor = Color.parseColor("#6D6D6D");
unselectedTextColor = Color.parseColor("#898989");
} catch (Exception e) {
// 使用默认颜色
selectedTextColor = ColorManager.getInstance().getPrimaryColorInt();
unselectedTextColor = Color.parseColor("#6D6D6D");
unselectedTextColor = Color.parseColor("#898989");
}
Map<String, String> colorMap = new HashMap<>();
colorMap.put("theme_color", themeBean.getTheme_color());
colorMap.put("btn_text_color", themeBean.getBtn_text_color());
// 更新 UI
updateAllTabUI();
if (themeBean.getApp_bg() != null) {
// if (themeBean.getApp_bg() != null) {
BackgroundManager.getInstance().setBackgroundUrl(themeBean.getApp_bg());
loadNetworkBackground();
}
// }
if (themeBean.getTheme_color() != null) {
ColorManager.getInstance().updateColors(themeBean.getTheme_color(), themeBean.getBtn_text_color());
@@ -1122,54 +1138,54 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
}
private void updateTrendIcon() {
String imageUrl = (index == 1) ? selectedTrendUrl : unselectedTrendUrl;
if (!TextUtils.isEmpty(imageUrl)) {
Glide.with(this)
.load(imageUrl)
.placeholder(com.xscm.moduleutil.R.mipmap.icon_me_trend_unselect)
.into(mBinding.imTrend);
} else {
// 如果没有网络图标,使用默认的选中/未选中状态
int resId = (index == 1) ?
com.xscm.moduleutil.R.mipmap.icon_me_trend_select :
com.xscm.moduleutil.R.mipmap.icon_me_trend_unselect;
mBinding.imTrend.setImageResource(resId);
}
int imageUrl = (index == 1) ? selectedTrendUrl : unselectedTrendUrl;
mBinding.imTrend.setImageResource(imageUrl);
// if (!TextUtils.isEmpty(imageUrl)) {
// Glide.with(this)
// .load(imageUrl)
// .placeholder(com.xscm.moduleutil.R.mipmap.icon_me_trend_unselect)
// .into(mBinding.imTrend);
// } else {
// // 如果没有网络图标,使用默认的选中/未选中状态
// int resId = (index == 1) ?
// com.xscm.moduleutil.R.mipmap.icon_me_trend_select :
// com.xscm.moduleutil.R.mipmap.icon_me_trend_unselect;
// mBinding.imTrend.setImageResource(resId);
// }
}
private void updateNewsIcon() {
String imageUrl = (index == 2) ? selectedNewsUrl : unselectedNewsUrl;
if (!TextUtils.isEmpty(imageUrl)) {
Glide.with(this)
.load(imageUrl)
.placeholder(com.xscm.moduleutil.R.mipmap.icon_news_un_select)
.into(mBinding.ivNews);
} else {
// 如果没有网络图标,使用默认的选中/未选中状态
int resId = (index == 2) ?
com.xscm.moduleutil.R.mipmap.icon_news_select :
com.xscm.moduleutil.R.mipmap.icon_news_un_select;
mBinding.ivNews.setImageResource(resId);
}
int imageUrl = (index == 2) ? selectedNewsUrl : unselectedNewsUrl;
mBinding.ivNews.setImageResource(imageUrl);
// if (!TextUtils.isEmpty(imageUrl)) {
// Glide.with(this)
// .load(imageUrl)
// .placeholder(com.xscm.moduleutil.R.mipmap.icon_news_un_select)
// .into(mBinding.ivNews);
// } else {
// // 如果没有网络图标,使用默认的选中/未选中状态
// int resId = (index == 2) ?
// com.xscm.moduleutil.R.mipmap.icon_news_select :
// com.xscm.moduleutil.R.mipmap.icon_news_un_select;
// mBinding.ivNews.setImageResource(resId);
// }
}
private void updateMeIcon() {
String imageUrl = (index == 3) ? selectedMeUrl : unselectedMeUrl;
if (!TextUtils.isEmpty(imageUrl)) {
Glide.with(this)
.load(imageUrl)
.placeholder(com.xscm.moduleutil.R.mipmap.icon_my_un_select)
.into(mBinding.imMe);
} else {
// 如果没有网络图标,使用默认的选中/未选中状态
int resId = (index == 3) ?
com.xscm.moduleutil.R.mipmap.icon_my_select :
com.xscm.moduleutil.R.mipmap.icon_my_un_select;
mBinding.imMe.setImageResource(resId);
}
int imageUrl = (index == 3) ? selectedMeUrl : unselectedMeUrl;
mBinding.imMe.setImageResource(imageUrl);
// if (!TextUtils.isEmpty(imageUrl)) {
// Glide.with(this)
// .load(imageUrl)
// .placeholder(com.xscm.moduleutil.R.mipmap.icon_my_un_select)
// .into(mBinding.imMe);
// } else {
// // 如果没有网络图标,使用默认的选中/未选中状态
// int resId = (index == 3) ?
// com.xscm.moduleutil.R.mipmap.icon_my_select :
// com.xscm.moduleutil.R.mipmap.icon_my_un_select;
// mBinding.imMe.setImageResource(resId);
// }
}

View File

@@ -105,7 +105,11 @@ public class NewsFragment extends BaseMvpFragment<NewsPresenter, FragmentNewsBin
startActivity(intent);
}
});
if (CommonAppContext.getInstance().is_open == 1) {
mBinding.newsLl.setBackgroundResource(com.xscm.moduleutil.R.mipmap.theme_new_bj);
}else {
mBinding.newsLl.setBackgroundResource(com.xscm.moduleutil.R.mipmap.activity_bj);
}
}
@Override

View File

@@ -16,6 +16,7 @@ import com.xscm.modulemain.activity.plaza.contacts.CircleContacts;
import com.xscm.modulemain.activity.plaza.presenter.CirclePresenter;
import com.xscm.modulemain.databinding.FragmentCircleBinding;
import com.xscm.moduleutil.base.BaseMvpFragment;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.bean.CircleListBean;
import com.xscm.moduleutil.bean.CommentBean;
import com.xscm.moduleutil.bean.ExpandColumnBean;
@@ -27,21 +28,21 @@ import java.util.List;
/**
*语圈
* 语圈
*/
public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCircleBinding> implements CircleContacts.View {
private List<MyBagBean> list;
public static final int RELEASE_CODE = 1010;
public static final int RELEASE_CODE = 1010;
private MyFragmentPagerAdapter adapter;
public static CircleFragment newInstance () {
public static CircleFragment newInstance() {
return new CircleFragment();
}
@Override
protected void initData () {
list=new ArrayList<>();
protected void initData() {
list = new ArrayList<>();
list.add(new MyBagBean("发现", "1"));
list.add(new MyBagBean("扩列", "2"));
adapter = new MyFragmentPagerAdapter(getChildFragmentManager(), list);
@@ -51,36 +52,42 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
}
@Override
protected void initView () {
protected void initView() {
mBinding.ivRelease.setOnClickListener(this::onClick);
if (CommonAppContext.getInstance().is_open == 1) {
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.theme_new_bj);
}else {
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.activity_bj);
}
}
private void onClick(View view) {
if (view.getId()==R.id.iv_release){//发布
startActivityForResult(new Intent(getContext(), ReleaseActivity.class),RELEASE_CODE);
if (view.getId() == R.id.iv_release) {//发布
startActivityForResult(new Intent(getContext(), ReleaseActivity.class), RELEASE_CODE);
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode==RELEASE_CODE){
adapter.refreshCircleCategoryData();
}
if (requestCode == RELEASE_CODE) {
adapter.refreshCircleCategoryData();
}
}
@Override
protected void initListener () {
protected void initListener() {
super.initListener();
}
@Override
protected int getLayoutId () {
protected int getLayoutId() {
return R.layout.fragment_circle;
}
@Override
protected CirclePresenter bindPresenter () {
protected CirclePresenter bindPresenter() {
return new CirclePresenter(this, getContext());
}
@@ -101,12 +108,12 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
}
@Override
public void setLikeZone(int idx,CircleListBean item,int type) {
public void setLikeZone(int idx, CircleListBean item, int type) {
}
@Override
public void getCircleDetail(int idx,CircleListBean item, CircleListBean newItem) {
public void getCircleDetail(int idx, CircleListBean item, CircleListBean newItem) {
}

View File

@@ -205,6 +205,22 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
Intent intent = new Intent(getActivity(), PopularRoomActivity.class);
startActivity(intent);
});
if (CommonAppContext.getInstance().is_open==1){
mBinding.rmHome.setImageResource(com.xscm.moduleutil.R.mipmap.bg_rmfj);
mBinding.rl.setBackgroundResource(com.xscm.moduleutil.R.mipmap.bg_xiaoxi);
mBinding.tvWg.setImageResource(com.xscm.moduleutil.R.mipmap.q_wg);
mBinding.myHome.setImageResource(com.xscm.moduleutil.R.mipmap.bg_wdfj);
mBinding.homePhb.setImageResource(com.xscm.moduleutil.R.mipmap.bg_phb);
mBinding.homeGg.setImageResource(com.xscm.moduleutil.R.mipmap.bg_gfgg);
}else {
mBinding.rmHome.setImageResource(com.xscm.moduleutil.R.mipmap.home_rm);
mBinding.rl.setBackgroundResource(com.xscm.moduleutil.R.mipmap.xiaox_b);
mBinding.tvWg.setImageResource(com.xscm.moduleutil.R.mipmap.wg);
mBinding.myHome.setImageResource(com.xscm.moduleutil.R.mipmap.my_home);
mBinding.homePhb.setImageResource(com.xscm.moduleutil.R.mipmap.home_phb);
mBinding.homeGg.setImageResource(com.xscm.moduleutil.R.mipmap.home_gg);
}
}
public void onEvent1() {

View File

@@ -20,6 +20,7 @@ import com.xscm.modulemain.activity.room.presenter.VoicePresenter;
import com.xscm.modulemain.dialog.SignInDialog;
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
import com.xscm.moduleutil.base.BaseMvpFragment;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.bean.ActivitiesPermission;
import com.xscm.moduleutil.bean.FirstChargeGiftBean;
import com.xscm.moduleutil.bean.TasksSignStatus;
@@ -27,6 +28,7 @@ import com.xscm.moduleutil.dialog.FirstChargeDialog;
import com.xscm.moduleutil.dialog.RechargeDialogFragment;
import com.xscm.modulemain.dialog.YouthModelDialog;
import com.xscm.moduleutil.utils.ARouteConstants;
import com.xscm.moduleutil.utils.BackgroundManager;
import com.xscm.moduleutil.utils.SpUtil;
import java.util.ArrayList;
@@ -85,6 +87,13 @@ public class VoiceFragment extends BaseMvpFragment<VoicePresenter, FragmentVoice
if (!shouldShowYouthModelDialog()) {
showYouthModelDialog();
}
if (CommonAppContext.getInstance().is_open==1) {
mBinding.llBj.setBackgroundResource(BackgroundManager.getInstance().getBackgroundUrl());
mBinding.tvTitle.setBackgroundResource(com.xscm.moduleutil.R.mipmap.logo_shouye);
}else {
mBinding.llBj.setBackgroundResource(com.xscm.moduleutil.R.mipmap.home_bj);
mBinding.tvTitle.setBackgroundResource(com.xscm.moduleutil.R.mipmap.app_name_bg);
}
}

View File

@@ -49,6 +49,7 @@ import com.xscm.modulemain.dialog.UserNetWorthDialog;
import com.xscm.moduleutil.base.WebUrlConstants;
import com.xscm.moduleutil.bean.TasksMessage;
import com.xscm.moduleutil.utils.ARouteConstants;
import com.xscm.moduleutil.utils.BackgroundManager;
import com.xscm.moduleutil.widget.ShineTextView;
import com.xscm.moduleutil.base.BaseMvpFragment;
import com.xscm.moduleutil.base.CommonAppContext;
@@ -166,6 +167,33 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", bannerModel.getUrl()).withString("title", "首页横幅").navigation();
}
});
if (CommonAppContext.getInstance().is_open==1) {
mBinding.imMeFamily.setImageResource(com.xscm.moduleutil.R.mipmap.icon_wdjz);
mBinding.imDan.setImageResource(com.xscm.moduleutil.R.mipmap.icon_dj);
mBinding.imPersonality.setImageResource(com.xscm.moduleutil.R.mipmap.icon_gxzb);
mBinding.imMyBag.setImageResource(com.xscm.moduleutil.R.mipmap.icon_wdbb);
mBinding.imMeInvitation.setImageResource(com.xscm.moduleutil.R.mipmap.icon_yq);
mBinding.imMeHelp.setImageResource(com.xscm.moduleutil.R.mipmap.icon_bzzx);
mBinding.imMeTest.setImageResource(com.xscm.moduleutil.R.mipmap.icon_rw);
mBinding.imSinger.setImageResource(com.xscm.moduleutil.R.mipmap.icon_gsrz);
mBinding.imMePlaylist.setImageResource(com.xscm.moduleutil.R.mipmap.icon_wdgd);
mBinding.imMeSetting.setImageResource(com.xscm.moduleutil.R.mipmap.icon_sz);
}else {
mBinding.imMeFamily.setImageResource(R.mipmap.icon_me_family);
mBinding.imDan.setImageResource(com.xscm.moduleutil.R.mipmap.my_dan);
mBinding.imPersonality.setImageResource(com.xscm.moduleutil.R.mipmap.personality);
mBinding.imMyBag.setImageResource(com.xscm.moduleutil.R.mipmap.me_my_bag);
mBinding.imMeHelp.setImageResource(com.xscm.moduleutil.R.mipmap.me_help);
mBinding.imMeTest.setImageResource(com.xscm.moduleutil.R.mipmap.me_test);
mBinding.imSinger.setImageResource(R.mipmap.but_singer);
mBinding.imMePlaylist.setImageResource(R.mipmap.but_me_playlist);
mBinding.imMeSetting.setImageResource(com.xscm.moduleutil.R.mipmap.me_setting);
mBinding.imMeInvitation.setImageResource(com.xscm.moduleutil.R.mipmap.me_invitation);
}
}

View File

@@ -8,6 +8,7 @@
</data>
<LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

View File

@@ -8,6 +8,7 @@
</data>
<LinearLayout
android:id="@+id/news_ll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

View File

@@ -6,7 +6,6 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/home_bj"
android:overScrollMode="never"
android:paddingBottom="@dimen/dp_30">
@@ -714,6 +713,7 @@
android:visibility="visible">
<ImageView
android:id="@+id/im_me_family"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/icon_me_family"
@@ -739,6 +739,7 @@
android:orientation="vertical">
<ImageView
android:id="@+id/im_dan"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/my_dan" />
@@ -764,6 +765,7 @@
android:visibility="visible">
<ImageView
android:id="@+id/im_personality"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/personality" />
@@ -787,6 +789,7 @@
android:orientation="vertical">
<ImageView
android:id="@+id/im_my_bag"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/me_my_bag" />
@@ -856,6 +859,7 @@
app:layout_flexGrow="1">
<ImageView
android:id="@+id/im_me_invitation"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/me_invitation" />
@@ -881,6 +885,7 @@
app:layout_flexGrow="1">
<ImageView
android:id="@+id/im_me_help"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/me_help" />
@@ -913,6 +918,7 @@
android:layout_marginTop="-3dp">
<ImageView
android:id="@+id/im_me_test"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_centerInParent="true"
@@ -959,6 +965,7 @@
app:layout_flexGrow="1">
<ImageView
android:id="@+id/im_me_opinion"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/me_opinion" />
@@ -986,6 +993,7 @@
app:layout_flexGrow="1">
<ImageView
android:id="@+id/im_singer"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/but_singer" />
@@ -1013,6 +1021,7 @@
app:layout_flexGrow="1">
<ImageView
android:id="@+id/im_me_playlist"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/but_me_playlist" />
@@ -1040,6 +1049,7 @@
app:layout_flexGrow="1">
<ImageView
android:id="@+id/im_me_setting"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/me_setting"

View File

@@ -1,115 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<layout 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">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@mipmap/home_bj">
android:id="@+id/ll_bj"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/home_bj"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_45"
android:orientation="horizontal"
android:gravity="center_vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_45"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/app_name_bg"
android:textSize="@dimen/sp_25"
android:textStyle="normal"
android:layout_marginLeft="@dimen/dp_15"/>
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:background="@mipmap/app_name_bg"
android:textSize="@dimen/sp_25"
android:textStyle="normal" />
<LinearLayout
android:id="@+id/ll_search"
android:layout_width="@dimen/dp_0"
android:layout_height="38dp"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/shape_search_in"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
android:id="@+id/ll_search"
android:layout_width="@dimen/dp_0"
android:layout_height="38dp"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/shape_search_in"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/iv_close"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_marginLeft="@dimen/dp_16"
android:src="@drawable/index_level_search"/>
android:id="@+id/iv_close"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_marginLeft="@dimen/dp_16"
android:src="@drawable/index_level_search" />
<TextView
android:id="@+id/edit_query"
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="请输入ID/房间名称"
android:maxLength="10"
android:paddingLeft="@dimen/dp_12"
android:paddingRight="@dimen/dp_12"
android:textColor="#999999"
android:textSize="@dimen/sp_14"/>
android:id="@+id/edit_query"
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:maxLength="10"
android:paddingLeft="@dimen/dp_12"
android:paddingRight="@dimen/dp_12"
android:text="请输入ID/房间名称"
android:textColor="#999999"
android:textSize="@dimen/sp_14" />
</LinearLayout>
<ImageView
android:id="@+id/iv_room3"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@mipmap/index_level_search_o"
android:layout_toStartOf="@+id/iv_ranking_list"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/dp_11"/>
android:id="@+id/iv_room3"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/dp_11"
android:layout_toStartOf="@+id/iv_ranking_list"
android:src="@mipmap/index_level_search_o" />
<ImageView
android:id="@+id/iv_ranking_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toStartOf="@+id/iv_room"
android:layout_marginEnd="@dimen/dp_11"
android:layout_centerInParent="true"
android:scaleType="fitCenter"
android:src="@mipmap/ic_home_rank"
android:visibility="gone"/>
android:id="@+id/iv_ranking_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginEnd="@dimen/dp_11"
android:layout_toStartOf="@+id/iv_room"
android:scaleType="fitCenter"
android:src="@mipmap/ic_home_rank"
android:visibility="gone" />
<ImageView
android:id="@+id/iv_room"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_26"
android:src="@mipmap/ic_paidui_home"
android:layout_alignParentEnd="true"
android:layout_centerInParent="true"
android:scaleType="fitCenter"
android:layout_marginEnd="@dimen/dp_11"
android:visibility="gone"/>
android:id="@+id/iv_room"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_26"
android:layout_alignParentEnd="true"
android:layout_centerInParent="true"
android:layout_marginEnd="@dimen/dp_11"
android:scaleType="fitCenter"
android:src="@mipmap/ic_paidui_home"
android:visibility="gone" />
</RelativeLayout>
<com.xscm.moduleutil.widget.ScrollViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:background="@color/color_transparent"/>
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:background="@color/color_transparent" />
</LinearLayout>
</RelativeLayout>

View File

@@ -32,9 +32,14 @@ import com.xscm.moduleutil.base.AppStateManager;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.modulemain.dialog.PolicyDialog;
import com.xscm.moduleutil.base.WebUrlConstants;
import com.xscm.moduleutil.bean.FestivalThemeBean;
import com.xscm.moduleutil.http.BaseObserver;
import com.xscm.moduleutil.http.RetrofitClient;
import com.xscm.moduleutil.utils.ARouteConstants;
import com.xscm.moduleutil.utils.SpUtil;
import io.reactivex.disposables.Disposable;
/**
* APP准备启动
* <p>
@@ -77,6 +82,7 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
setHttpTheme();
if (CommonAppContext.getInstance().isLogout){
startActivity(new Intent(this, PasswordLoginActivity.class));
finish();
@@ -188,6 +194,23 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
return null;
}
private void setHttpTheme() {
RetrofitClient.getInstance().getFestivalTheme(new BaseObserver<FestivalThemeBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(FestivalThemeBean festivalThemeBean) {
if (festivalThemeBean != null) {
CommonAppContext.getInstance().is_open = festivalThemeBean.is_open();
}
}
});
}
private void setEnter() {
if (!isCheck) {
if (videoView != null) {