春节主题:登录、主页面。
@@ -84,9 +84,10 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
initFestivalTheme(2);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||||
getWindow().getDecorView().setBackgroundResource(R.mipmap.log_bj);
|
// getWindow().getDecorView().setBackgroundResource(R.attr.app_bg_img);
|
||||||
setContentView(getLayoutId());
|
setContentView(getLayoutId());
|
||||||
doDone();
|
doDone();
|
||||||
// 隐藏标题栏
|
// 隐藏标题栏
|
||||||
@@ -116,6 +117,25 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 节日判断+主题切换核心方法
|
||||||
|
private void initFestivalTheme(int currentFestival) {
|
||||||
|
switch (currentFestival) {
|
||||||
|
case 0:
|
||||||
|
setTheme(R.style.AppTheme_CustomAttrs);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
setTheme(R.style.AppTheme_newYear_CustomAttrs);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
setTheme(R.style.AppTheme_Spring_CustomAttrs);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// 默认皮肤
|
||||||
|
setTheme(R.style.AppTheme_CustomAttrs);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 在Activity中
|
// 在Activity中
|
||||||
private static final int REQUEST_OVERLAY_PERMISSION = 1001;
|
private static final int REQUEST_OVERLAY_PERMISSION = 1001;
|
||||||
|
|
||||||
@@ -181,37 +201,8 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
|
|
||||||
protected void loadNetworkBackground() {
|
protected void loadNetworkBackground() {
|
||||||
// 只有当已经有背景URL时才加载
|
// 只有当已经有背景URL时才加载
|
||||||
int backgroundUrl = BackgroundManager.getInstance().getBackgroundUrl();
|
// int backgroundUrl = BackgroundManager.getInstance().getBackgroundUrl();
|
||||||
getWindow().getDecorView().setBackgroundResource(backgroundUrl);
|
// getWindow().getDecorView().setBackgroundResource(backgroundUrl);
|
||||||
|
|
||||||
|
|
||||||
// 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
|
@Override
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class CommonAppContext extends MultiDexApplication implements Application
|
|||||||
@Getter
|
@Getter
|
||||||
public UnreadCountEvent unreadCountEvent;
|
public UnreadCountEvent unreadCountEvent;
|
||||||
|
|
||||||
public static int selectRelease = -1;
|
public static int selectRelease = 1;
|
||||||
|
|
||||||
public int is_open = 0;//主题的开关
|
public int is_open = 0;//主题的开关
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="#F0EEF7" />
|
<solid android:color="#FFF0EEF7" />
|
||||||
<corners android:radius="@dimen/dp_22" />
|
<corners android:radius="@dimen/dp_22" />
|
||||||
</shape>
|
</shape>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_1.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_shouye_s"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_shouye_ns"/>
|
||||||
|
</selector>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_2.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_dongtai_s"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_dongtai_ns"/>
|
||||||
|
</selector>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_3.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_xiaoxi_s"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_xiaoxi_ns"/>
|
||||||
|
</selector>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_4.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_wode_s"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_wode_ns"/>
|
||||||
|
</selector>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_new_1.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_sy_notselect"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_sy_select"/>
|
||||||
|
</selector>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_new_2.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_dt_notselect"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_dt_select"/>
|
||||||
|
</selector>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_new_3.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_xx_notselect"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_xx_select"/>
|
||||||
|
</selector>
|
||||||
5
BaseModule/src/main/res/drawable/main_tab_new_4.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@mipmap/icon_wd_notselect"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@mipmap/icon_wd_select"/>
|
||||||
|
</selector>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/ic_agreement_spring_selected" android:state_checked="true" />
|
||||||
|
<item android:drawable="@drawable/ic_agreement_unselect" android:state_checked="false" />
|
||||||
|
<item android:drawable="@drawable/ic_agreement_unselect" />
|
||||||
|
</selector>
|
||||||
7
BaseModule/src/main/res/drawable/text_color_spring.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="#6D6D6D"
|
||||||
|
android:state_selected="false" />
|
||||||
|
<item android:color="@color/colorPrimary_spring"
|
||||||
|
android:state_selected="true"/>
|
||||||
|
</selector>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
|
|
||||||
<solid android:color="#ff22BB79 " />
|
<solid android:color="?attr/app_color_colorPrimary" />
|
||||||
<corners
|
<corners
|
||||||
android:bottomLeftRadius="22dp"
|
android:bottomLeftRadius="22dp"
|
||||||
android:bottomRightRadius="22dp"
|
android:bottomRightRadius="22dp"
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
android:text="确认"
|
android:text="确认"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:backgroundTint="?attr/app_color_colorPrimary"
|
||||||
android:background="@drawable/cs"/>
|
android:background="@drawable/cs"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 1004 B |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_bg_tab_line.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_dongtai_ns.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_dongtai_s.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_main_bg.png
Normal file
|
After Width: | Height: | Size: 765 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_main_tab_bg.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_shouye_ns.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_shouye_s.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_spring_edit_me.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_wode_ns.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_wode_s.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_xiaoxi_ns.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_xiaoxi_s.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 1014 B |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_bg_tab_line.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_dongtai_ns.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_dongtai_s.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_main_bg.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_main_tab_bg.png
Normal file
|
After Width: | Height: | Size: 145 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_shouye_ns.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_shouye_s.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_spring_edit_me.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_wode_ns.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_wode_s.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_xiaoxi_ns.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_xiaoxi_s.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_bg_tab_line.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_dongtai_ns.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_dongtai_s.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_main_bg.png
Normal file
|
After Width: | Height: | Size: 2.6 MiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_main_tab_bg.png
Normal file
|
After Width: | Height: | Size: 286 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_shouye_ns.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_shouye_s.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_spring_edit_me.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_wode_ns.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_wode_s.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_xiaoxi_ns.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_xiaoxi_s.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
BaseModule/src/main/res/mipmap-xxxhdpi/icon_spring_bg.png
Normal file
|
After Width: | Height: | Size: 650 KiB |
@@ -3,6 +3,22 @@
|
|||||||
|
|
||||||
<attr name="ev_title" format="string" />
|
<attr name="ev_title" format="string" />
|
||||||
|
|
||||||
|
<!-- 自定义图片属性:应用节日背景图 -->
|
||||||
|
<attr name="app_bg_img" format="reference" />
|
||||||
|
<attr name="app_color_colorPrimary" format="reference" />
|
||||||
|
<attr name="app_login_check_select" format="reference"/>
|
||||||
|
<attr name="app_main_bg" format="reference"/>
|
||||||
|
|
||||||
|
<attr name="app_main_tab_1" format="reference"/>
|
||||||
|
<attr name="app_main_tab_2" format="reference"/>
|
||||||
|
<attr name="app_main_tab_3" format="reference"/>
|
||||||
|
<attr name="app_main_tab_4" format="reference"/>
|
||||||
|
|
||||||
|
<attr name="app_main_tab_text_color" format="reference"/>
|
||||||
|
<attr name="app_main_tab_bg" format="reference"/>
|
||||||
|
<attr name="app_user_bg_color" format="color"/>
|
||||||
|
<attr name="app_user_edit_me" format="reference"/>
|
||||||
|
|
||||||
<declare-styleable name="ExplainView">
|
<declare-styleable name="ExplainView">
|
||||||
<attr name="ev_title" />
|
<attr name="ev_title" />
|
||||||
<attr name="ev_hint" format="string" />
|
<attr name="ev_hint" format="string" />
|
||||||
|
|||||||
@@ -305,6 +305,7 @@
|
|||||||
|
|
||||||
<!-- 主题色 -->
|
<!-- 主题色 -->
|
||||||
<color name="colorPrimary">#22BB79</color>
|
<color name="colorPrimary">#22BB79</color>
|
||||||
|
<color name="colorPrimary_spring">#FFFF3700</color>
|
||||||
|
|
||||||
<!-- 辅助色 -->
|
<!-- 辅助色 -->
|
||||||
<color name="colorSecondary1">#F0EEF7</color>
|
<color name="colorSecondary1">#F0EEF7</color>
|
||||||
|
|||||||
@@ -5,20 +5,93 @@
|
|||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="android:colorBackground">@color/background</item>
|
<item name="android:colorBackground">@color/transparent</item>
|
||||||
<item name="android:textColor">@color/color_1F1C1F</item>
|
<item name="android:textColor">@color/color_1F1C1F</item>
|
||||||
<item name="android:textColorHint">@color/color_FF999999</item>
|
<item name="android:textColorHint">@color/color_FF999999</item>
|
||||||
<item name="android:windowBackground">@color/color_F9FAFA</item>
|
|
||||||
<item name="android:windowTranslucentStatus">false</item>
|
<item name="android:windowTranslucentStatus">false</item>
|
||||||
<item name="android:windowLightStatusBar">true</item>
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
|
|
||||||
<item name="android:windowDisablePreview">true</item>
|
<item name="android:windowDisablePreview">true</item>
|
||||||
<!-- 新增:全局禁用跳转动画 -->
|
<!-- 新增:全局禁用跳转动画 -->
|
||||||
<item name="android:windowAnimationStyle">@style/NoAnimationStyle</item>
|
<item name="android:windowAnimationStyle">@style/NoAnimationStyle</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- 你的基础主题(保持不变) -->
|
||||||
|
<style name="AppTheme_Spring" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||||
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
<item name="android:colorBackground">@color/transparent</item>
|
||||||
|
<item name="android:textColor">@color/color_1F1C1F</item>
|
||||||
|
<item name="android:textColorHint">@color/color_FF999999</item>
|
||||||
|
<item name="android:windowBackground">@mipmap/icon_spring_bg</item>
|
||||||
|
<item name="android:windowTranslucentStatus">false</item>
|
||||||
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
|
<item name="android:windowDisablePreview">true</item>
|
||||||
|
<!-- 新增:全局禁用跳转动画 -->
|
||||||
|
<item name="android:windowAnimationStyle">@style/NoAnimationStyle</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- 子主题:默认主题 -->
|
||||||
|
<style name="AppTheme.CustomAttrs" parent="AppTheme">
|
||||||
|
<item name="app_bg_img">@mipmap/log_bj</item>
|
||||||
|
<item name="app_color_colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="app_login_check_select">@drawable/selector_login_agreement</item>
|
||||||
|
<item name="app_main_bg">@mipmap/activity_bj</item>
|
||||||
|
|
||||||
|
|
||||||
|
<item name="app_main_tab_1">@drawable/main_bottom_bar_icon_me</item>
|
||||||
|
<item name="app_main_tab_2">@drawable/main_bottom_bar_icon_media</item>
|
||||||
|
<item name="app_main_tab_3">@drawable/main_bottom_bar_icon_news</item>
|
||||||
|
<item name="app_main_tab_4">@drawable/main_bottom_bar_icon_tend</item>
|
||||||
|
<item name="app_main_tab_text_color">@drawable/text_color_two</item>
|
||||||
|
<item name="app_user_edit_me">@mipmap/me_edit</item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- 子主题:元旦主题 -->
|
||||||
|
<style name="AppTheme_newYear.CustomAttrs" parent="AppTheme_Spring">
|
||||||
|
<item name="app_bg_img">@mipmap/log_bj</item>
|
||||||
|
<item name="app_color_colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="app_login_check_select">@drawable/selector_login_agreement</item>
|
||||||
|
<item name="app_main_bg">@mipmap/bg_dark</item>
|
||||||
|
|
||||||
|
<item name="app_main_tab_1">@drawable/main_tab_new_1</item>
|
||||||
|
<item name="app_main_tab_2">@drawable/main_tab_new_2</item>
|
||||||
|
<item name="app_main_tab_3">@drawable/main_tab_new_3</item>
|
||||||
|
<item name="app_main_tab_4">@drawable/main_tab_new_4</item>
|
||||||
|
|
||||||
|
<item name="app_main_tab_text_color">@drawable/text_color_two</item>
|
||||||
|
|
||||||
|
<item name="app_main_tab_bg">@drawable/home_bbar_xz</item>
|
||||||
|
<item name="app_user_bg_color">#231F2C</item>
|
||||||
|
|
||||||
|
<item name="app_user_edit_me">@mipmap/me_edit</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 子主题:春节主题 -->
|
||||||
|
<style name="AppTheme_Spring.CustomAttrs" parent="AppTheme_Spring">
|
||||||
|
<item name="app_bg_img">@mipmap/icon_spring_bg</item>
|
||||||
|
<item name="app_color_colorPrimary">@color/colorPrimary_spring</item>
|
||||||
|
<item name="app_login_check_select">@drawable/selector_login_spring_agreement</item>
|
||||||
|
<item name="app_main_bg">@mipmap/icon_main_bg</item>
|
||||||
|
|
||||||
|
<item name="app_main_tab_1">@drawable/main_tab_1</item>
|
||||||
|
<item name="app_main_tab_2">@drawable/main_tab_2</item>
|
||||||
|
<item name="app_main_tab_3">@drawable/main_tab_3</item>
|
||||||
|
<item name="app_main_tab_4">@drawable/main_tab_4</item>
|
||||||
|
|
||||||
|
<item name="app_main_tab_text_color">@drawable/text_color_spring</item>
|
||||||
|
|
||||||
|
<item name="app_main_tab_bg">@mipmap/icon_main_tab_bg</item>
|
||||||
|
<item name="app_user_bg_color">#FF600D00</item>
|
||||||
|
|
||||||
|
<item name="app_user_edit_me">@mipmap/icon_spring_edit_me</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 定义具体的无动画属性 -->
|
<!-- 定义具体的无动画属性 -->
|
||||||
<style name="NoAnimationStyle" parent="@android:style/Animation.Activity">
|
<style name="NoAnimationStyle" parent="@android:style/Animation.Activity">
|
||||||
|
|||||||
@@ -315,9 +315,10 @@ open class Application : CommonAppContext() {
|
|||||||
private fun initLogUtils() {
|
private fun initLogUtils() {
|
||||||
LogUtils.getConfig()
|
LogUtils.getConfig()
|
||||||
.setLogSwitch(true) // 全局开关
|
.setLogSwitch(true) // 全局开关
|
||||||
|
.setLogHeadSwitch(false)
|
||||||
.setLog2FileSwitch(true) // 必须设为 true!
|
.setLog2FileSwitch(true) // 必须设为 true!
|
||||||
.setDir(LOGUTILS_SAVE_PATH) // 设置有效路径
|
.setDir(LOGUTILS_SAVE_PATH) // 设置有效路径
|
||||||
.setFileFilter(LogUtils.V); // 允许所有级别
|
.setFileFilter(LogUtils.V) // 允许所有级别
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.content.DialogInterface;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -111,37 +112,6 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
private Fragment[] fragments;
|
private Fragment[] fragments;
|
||||||
private AppUpdateDialog appUpdateDialog;
|
private AppUpdateDialog appUpdateDialog;
|
||||||
|
|
||||||
private boolean isMediaSelected = false;
|
|
||||||
private int unselectedMediaUrl; // 从服务器获取
|
|
||||||
private int selectedMediaUrl; // 从服务器获取
|
|
||||||
|
|
||||||
// 添加其他 tab 的图标 URL
|
|
||||||
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;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@@ -173,6 +143,20 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
LogUtils.e("MainActivity", "onWindowFocusChanged:" + hasFocus);
|
LogUtils.e("MainActivity", "onWindowFocusChanged:" + hasFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private int getTabBg(){
|
||||||
|
// 1. 定义需要获取的自定义属性数组
|
||||||
|
int[] attrs = new int[]{com.xscm.moduleutil.R.attr.app_main_tab_bg};
|
||||||
|
// 2. 从Context的Theme中获取TypedArray(核心:绑定当前主题的属性值)
|
||||||
|
TypedArray ta = obtainStyledAttributes(attrs);
|
||||||
|
// 3. 获取attr对应的资源ID,默认值0(无有效资源时返回0)
|
||||||
|
int bgResId = ta.getResourceId(0, 0);
|
||||||
|
// 4. 关键:手动回收TypedArray,释放系统资源,避免内存泄漏
|
||||||
|
ta.recycle();
|
||||||
|
// 5. 有有效资源ID时,设置背景
|
||||||
|
return bgResId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -356,13 +340,8 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
// 初始化显示派对Tab
|
// 初始化显示派对Tab
|
||||||
reset();
|
reset();
|
||||||
mBinding.rlMedia.setSelected(true);
|
mBinding.rlMedia.setSelected(true);
|
||||||
mBinding.llBottomBar.setBackgroundResource(com.xscm.moduleutil.R.drawable.home_bbar_xz);
|
mBinding.llBottomBar.setBackgroundResource(getTabBg());
|
||||||
FragmentUtils.showHide(0, fragments);
|
FragmentUtils.showHide(0, fragments);
|
||||||
index = 0;
|
|
||||||
isMediaSelected = true; // 确保设置为选中状态
|
|
||||||
selectedTextColor = ColorManager.getInstance().getPrimaryColorInt();
|
|
||||||
unselectedTextColor = Color.parseColor("#6D6D6D");
|
|
||||||
updateAllTabUI(); // 这会同时更新图标和文字颜色
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -384,7 +363,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
int id = view.getId();
|
int id = view.getId();
|
||||||
if (id == R.id.rl_media) {
|
if (id == R.id.rl_media) {
|
||||||
mBinding.llBottomBar.setBackgroundResource(com.xscm.moduleutil.R.drawable.home_bbar_xz);
|
mBinding.llBottomBar.setBackgroundResource(getTabBg());
|
||||||
selectShow(0);
|
selectShow(0);
|
||||||
} else if (id == R.id.rl_trend) {
|
} else if (id == R.id.rl_trend) {
|
||||||
mBinding.llBottomBar.setBackgroundResource(com.xscm.moduleutil.R.drawable.home_bbar_yuan);
|
mBinding.llBottomBar.setBackgroundResource(com.xscm.moduleutil.R.drawable.home_bbar_yuan);
|
||||||
@@ -395,7 +374,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
|
|
||||||
selectShow(2);
|
selectShow(2);
|
||||||
} else if (id == R.id.rl_me) {
|
} else if (id == R.id.rl_me) {
|
||||||
mBinding.llBottomBar.setBackgroundResource(com.xscm.moduleutil.R.drawable.home_bbar_xz);
|
mBinding.llBottomBar.setBackgroundResource(getTabBg());
|
||||||
|
|
||||||
selectShow(3);
|
selectShow(3);
|
||||||
//C0101我的界面
|
//C0101我的界面
|
||||||
@@ -452,7 +431,6 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
switch (postion) {
|
switch (postion) {
|
||||||
case 0:
|
case 0:
|
||||||
mBinding.rlMedia.setSelected(true);
|
mBinding.rlMedia.setSelected(true);
|
||||||
isMediaSelected = true;
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
mBinding.rlTrend.setSelected(true);
|
mBinding.rlTrend.setSelected(true);
|
||||||
@@ -465,35 +443,9 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
mBinding.rlMe.setSelected(true);
|
mBinding.rlMe.setSelected(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 更新所有图标状态
|
|
||||||
updateMediaIcon();
|
|
||||||
updateTrendIcon();
|
|
||||||
updateNewsIcon();
|
|
||||||
updateMeIcon();
|
|
||||||
// 更新文字颜色
|
|
||||||
updateTabTextColors();
|
|
||||||
FragmentUtils.showHide(postion, fragments);
|
FragmentUtils.showHide(postion, fragments);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMediaIcon() {
|
|
||||||
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);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean shouldRestoreRoom() {
|
private boolean shouldRestoreRoom() {
|
||||||
// 检查是否应该恢复房间:
|
// 检查是否应该恢复房间:
|
||||||
@@ -869,43 +821,9 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
@Override
|
@Override
|
||||||
public void getThemeData(ThemeBean themeBean) {
|
public void getThemeData(ThemeBean themeBean) {
|
||||||
if (themeBean != null) {
|
if (themeBean != null) {
|
||||||
// 首页 tab 图标
|
|
||||||
selectedMediaUrl = themeBean.getHome_sel();
|
|
||||||
unselectedMediaUrl = themeBean.getHome_nor();
|
|
||||||
|
|
||||||
// 语圈 tab 图标
|
|
||||||
selectedTrendUrl = themeBean.getFind_sel();
|
|
||||||
unselectedTrendUrl = themeBean.getFind_nor();
|
|
||||||
|
|
||||||
// 消息 tab 图标
|
|
||||||
selectedNewsUrl = themeBean.getMsg_sel();
|
|
||||||
unselectedNewsUrl = themeBean.getMsg_nor();
|
|
||||||
|
|
||||||
// 我的 tab 图标
|
|
||||||
selectedMeUrl = themeBean.getMine_sel();
|
|
||||||
unselectedMeUrl = themeBean.getMine_nor();
|
|
||||||
// 获取文字颜色
|
|
||||||
try {
|
|
||||||
if (themeBean.getBtn_text_color() != null && !themeBean.getBtn_text_color().isEmpty()) {
|
|
||||||
if (CommonAppContext.getInstance().is_open == 1){
|
|
||||||
selectedTextColor = Color.parseColor("#FF663B");
|
|
||||||
}else {
|
|
||||||
selectedTextColor = Color.parseColor(themeBean.getTheme_color());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
unselectedTextColor = Color.parseColor("#898989");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// 使用默认颜色
|
|
||||||
selectedTextColor = ColorManager.getInstance().getPrimaryColorInt();
|
|
||||||
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
|
// 更新 UI
|
||||||
updateAllTabUI();
|
|
||||||
// if (themeBean.getApp_bg() != null) {
|
// if (themeBean.getApp_bg() != null) {
|
||||||
BackgroundManager.getInstance().setBackgroundUrl(themeBean.getApp_bg());
|
// BackgroundManager.getInstance().setBackgroundUrl(themeBean.getApp_bg());
|
||||||
loadNetworkBackground();
|
loadNetworkBackground();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -1136,96 +1054,6 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAllTabUI() {
|
|
||||||
index = 0;
|
|
||||||
// 更新图标
|
|
||||||
updateMediaIcon();
|
|
||||||
updateTrendIcon();
|
|
||||||
updateNewsIcon();
|
|
||||||
updateMeIcon();
|
|
||||||
|
|
||||||
// 更新文字
|
|
||||||
updateTabTextColors();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateTrendIcon() {
|
|
||||||
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() {
|
|
||||||
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() {
|
|
||||||
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);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void updateTabTextColors() {
|
|
||||||
// 更新声播 tab 文字颜色
|
|
||||||
if (selectedTextColor != 0 && unselectedTextColor != 0) {
|
|
||||||
int mediaTextColor = (index == 0) ? selectedTextColor : unselectedTextColor;
|
|
||||||
mBinding.tvMedia.setTextColor(mediaTextColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新语圈 tab 文字颜色
|
|
||||||
if (selectedTextColor != 0 && unselectedTextColor != 0) {
|
|
||||||
int trendTextColor = (index == 1) ? selectedTextColor : unselectedTextColor;
|
|
||||||
mBinding.tvTrend.setTextColor(trendTextColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新消息 tab 文字颜色
|
|
||||||
if (selectedTextColor != 0 && unselectedTextColor != 0) {
|
|
||||||
int newsTextColor = (index == 2) ? selectedTextColor : unselectedTextColor;
|
|
||||||
mBinding.tvNews.setTextColor(newsTextColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新我的 tab 文字颜色
|
|
||||||
if (selectedTextColor != 0 && unselectedTextColor != 0) {
|
|
||||||
int meTextColor = (index == 3) ? selectedTextColor : unselectedTextColor;
|
|
||||||
mBinding.tvMe.setTextColor(meTextColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
public void isShowLoading(boolean isShow) {
|
public void isShowLoading(boolean isShow) {
|
||||||
if (isShow) {
|
if (isShow) {
|
||||||
|
|||||||
@@ -120,9 +120,10 @@
|
|||||||
android:layout_height="@dimen/dp_30"
|
android:layout_height="@dimen/dp_30"
|
||||||
android:layout_marginEnd="@dimen/dp_12"
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
android:background="@drawable/cs"
|
android:background="@drawable/cs"
|
||||||
|
android:backgroundTint="?attr/app_color_colorPrimary"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="发送"
|
android:text="发送"
|
||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_root"
|
android:id="@+id/cl_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="@mipmap/log_bj">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -146,7 +145,6 @@
|
|||||||
android:layout_marginStart="@dimen/dp_40"
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginEnd="@dimen/dp_40"
|
android:layout_marginEnd="@dimen/dp_40"
|
||||||
android:background="@drawable/selector_sex_mm"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:background="?attr/app_main_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
android:layout_height="@dimen/dp_24"
|
android:layout_height="@dimen/dp_24"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@drawable/main_bottom_bar_icon_media" />
|
android:src="?attr/app_main_tab_1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_media"
|
android:id="@+id/tv_media"
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_2"
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
android:text="@string/main_tab1"
|
android:text="@string/main_tab1"
|
||||||
android:textColor="@drawable/text_color_two"
|
android:textColor="?attr/app_main_tab_text_color"
|
||||||
android:textSize="@dimen/sp_10" />
|
android:textSize="@dimen/sp_10" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@
|
|||||||
android:layout_height="@dimen/dp_24"
|
android:layout_height="@dimen/dp_24"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@drawable/main_bottom_bar_icon_tend" />
|
android:src="?attr/app_main_tab_2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_trend"
|
android:id="@+id/tv_trend"
|
||||||
@@ -85,7 +86,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_2"
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
android:text="@string/main_tab2"
|
android:text="@string/main_tab2"
|
||||||
android:textColor="@drawable/text_color_two"
|
android:textColor="?attr/app_main_tab_text_color"
|
||||||
android:textSize="@dimen/sp_10" />
|
android:textSize="@dimen/sp_10" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@
|
|||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@drawable/main_bottom_bar_icon_news" />
|
android:src="?attr/app_main_tab_3" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_message"
|
android:id="@+id/tv_message"
|
||||||
@@ -144,7 +145,7 @@
|
|||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="@dimen/dp_2"
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
android:text="@string/main_tab3"
|
android:text="@string/main_tab3"
|
||||||
android:textColor="@drawable/text_color_two"
|
android:textColor="?attr/app_main_tab_text_color"
|
||||||
android:textSize="@dimen/sp_10" />
|
android:textSize="@dimen/sp_10" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -165,7 +166,7 @@
|
|||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@drawable/main_bottom_bar_icon_me" />
|
android:src="?attr/app_main_tab_4" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_me"
|
android:id="@+id/tv_me"
|
||||||
@@ -173,7 +174,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_2"
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
android:text="@string/main_tab4"
|
android:text="@string/main_tab4"
|
||||||
android:textColor="@drawable/text_color_two"
|
android:textColor="?attr/app_main_tab_text_color"
|
||||||
android:textSize="@dimen/sp_10" />
|
android:textSize="@dimen/sp_10" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -119,6 +119,7 @@
|
|||||||
android:layout_marginTop="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
android:layout_marginEnd="@dimen/dp_38"
|
android:layout_marginEnd="@dimen/dp_38"
|
||||||
android:background="@drawable/cs"
|
android:background="@drawable/cs"
|
||||||
|
android:backgroundTint="?attr/app_color_colorPrimary"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="立即发布"
|
android:text="立即发布"
|
||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/color_FF333333"
|
||||||
|
|||||||
@@ -273,6 +273,7 @@
|
|||||||
android:layout_height="@dimen/dp_40"
|
android:layout_height="@dimen/dp_40"
|
||||||
android:text="确认"
|
android:text="确认"
|
||||||
android:background="@drawable/cs"
|
android:background="@drawable/cs"
|
||||||
|
android:backgroundTint="?attr/app_color_colorPrimary"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
|
|||||||
@@ -205,7 +205,7 @@
|
|||||||
android:layout_height="@dimen/dp_33"
|
android:layout_height="@dimen/dp_33"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@mipmap/me_edit"
|
android:src="?attr/app_user_edit_me"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
app:cardBackgroundColor="#231F2C"
|
app:cardBackgroundColor="?attr/app_user_bg_color"
|
||||||
app:cardCornerRadius="@dimen/dp_8">
|
app:cardCornerRadius="@dimen/dp_8">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -559,7 +559,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
app:cardBackgroundColor="#231F2C"
|
app:cardBackgroundColor="?attr/app_user_bg_color"
|
||||||
app:cardCornerRadius="@dimen/dp_8">
|
app:cardCornerRadius="@dimen/dp_8">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -678,7 +678,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
app:cardBackgroundColor="#231F2C"
|
app:cardBackgroundColor="?attr/app_user_bg_color"
|
||||||
app:cardCornerRadius="@dimen/dp_8">
|
app:cardCornerRadius="@dimen/dp_8">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -818,7 +818,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
app:cardBackgroundColor="#231F2C"
|
app:cardBackgroundColor="?attr/app_user_bg_color"
|
||||||
app:cardCornerRadius="@dimen/dp_8">
|
app:cardCornerRadius="@dimen/dp_8">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
android:id="@+id/root"
|
android:id="@+id/root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/transparent">
|
android:background="?attr/app_bg_img">
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|||||||
@@ -11,10 +11,11 @@
|
|||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@mipmap/log_bj" />
|
android:src="?attr/app_bg_img" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -161,7 +162,7 @@
|
|||||||
android:layout_marginRight="@dimen/dp_13"
|
android:layout_marginRight="@dimen/dp_13"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:text="@string/login_send_code"
|
android:text="@string/login_send_code"
|
||||||
android:textColor="#22BB79"
|
android:textColor="?attr/app_color_colorPrimary"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
@@ -340,7 +341,7 @@
|
|||||||
android:layout_height="@dimen/dp_15"
|
android:layout_height="@dimen/dp_15"
|
||||||
android:layout_marginEnd="@dimen/dp_5"
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
android:checked="false"
|
android:checked="false"
|
||||||
android:background="@drawable/selector_login_agreement"
|
android:background="?attr/app_login_check_select"
|
||||||
android:button="@null" />
|
android:button="@null" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -356,7 +357,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="《用户协议》"
|
android:text="《用户协议》"
|
||||||
android:textColor="#22BB79"
|
android:textColor="?attr/app_color_colorPrimary"
|
||||||
android:textSize="@dimen/sp_11"
|
android:textSize="@dimen/sp_11"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
@@ -373,7 +374,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="《隐私协议》"
|
android:text="《隐私协议》"
|
||||||
android:textColor="#22BB79"
|
android:textColor="?attr/app_color_colorPrimary"
|
||||||
android:textSize="@dimen/sp_11"
|
android:textSize="@dimen/sp_11"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||