Compare commits
3 Commits
3de455c004
...
aa26d9f9f5
| Author | SHA1 | Date | |
|---|---|---|---|
| aa26d9f9f5 | |||
| a79e5268b5 | |||
| b82a991f40 |
2
.idea/.name
generated
@@ -1 +1 @@
|
|||||||
秘地
|
MY语聊
|
||||||
6
.idea/deploymentTargetSelector.xml
generated
@@ -13,12 +13,6 @@
|
|||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
<DialogSelection />
|
<DialogSelection />
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
<SelectionState runConfigName="moduleactivity">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="muduleactivity">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -148,8 +148,9 @@
|
|||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<!-- com.xscm.action.LAUNCH_PAGE-->
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.xscm.action.LAUNCH_PAGE" />
|
<action android:name="com.jdf.action.LAUNCH_PAGE" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|||||||
@@ -360,13 +360,13 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
|||||||
.setLogBtnBackgroundPath("theme_bg")
|
.setLogBtnBackgroundPath("theme_bg")
|
||||||
//切换到其他方式
|
//切换到其他方式
|
||||||
.setSwitchAccText("其他登录方式")
|
.setSwitchAccText("其他登录方式")
|
||||||
.setSwitchAccTextColor(Color.parseColor("#333333"))
|
.setSwitchAccTextColor(Color.parseColor("#FC7285"))
|
||||||
.setSwitchAccTextSize(12)
|
.setSwitchAccTextSize(12)
|
||||||
.setSwitchOffsetY(390)
|
.setSwitchOffsetY(390)
|
||||||
//协议栏
|
//协议栏
|
||||||
.setAppPrivacyOne("《用户协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6")
|
.setAppPrivacyOne("《用户协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6")
|
||||||
.setAppPrivacyTwo("《隐私协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4")
|
.setAppPrivacyTwo("《隐私协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4")
|
||||||
.setAppPrivacyColor(Color.parseColor("#A8A8A8"), Color.parseColor("#FFBC00"))
|
.setAppPrivacyColor(Color.parseColor("#A8A8A8"), Color.parseColor("#FF8ACC"))
|
||||||
.setPrivacyBefore("登录即代表同意")
|
.setPrivacyBefore("登录即代表同意")
|
||||||
.setPrivacyEnd("并授权获得号码")
|
.setPrivacyEnd("并授权获得号码")
|
||||||
.setPrivacyTextSize(11)
|
.setPrivacyTextSize(11)
|
||||||
|
|||||||
@@ -161,7 +161,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="#5F3EAB"
|
android:textColor="#FF8ACC"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
@@ -295,7 +295,8 @@
|
|||||||
android:text="@string/login_btn_qt"
|
android:text="@string/login_btn_qt"
|
||||||
android:textColor="@color/color_666666"
|
android:textColor="@color/color_666666"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
tools:visibility="visible" />
|
android:visibility="invisible"
|
||||||
|
tools:visibility="invisible" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_other_login"
|
android:id="@+id/ll_other_login"
|
||||||
@@ -305,8 +306,8 @@
|
|||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:layout_marginBottom="@dimen/dp_55"
|
android:layout_marginBottom="@dimen/dp_55"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility="visible"
|
android:visibility="invisible"
|
||||||
tools:visibility="visible">
|
tools:visibility="invisible">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 217 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 517 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 380 KiB |
|
Before Width: | Height: | Size: 977 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/screen.webp
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
8
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,8 +1,6 @@
|
|||||||
#Wed May 07 09:31:48 CST 2025
|
#Mon Sep 22 21:05:11 CST 2025
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
#distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.7-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/distsl.
|
||||||
#distributionUrl=file:///D:/Greadle/gradle-8.10.2-all.zip
|
|
||||||
distributionUrl=file:///D:/Gradle/gradle-8.10.2-bin.zip
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
private BroadcastReceiver mLogoutReceiver = new BroadcastReceiver() {
|
private BroadcastReceiver mLogoutReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
if ("com.xscm.moduleutil.ACTION_USER_LOGOUT".equals(intent.getAction())) {
|
if ("com.jdf.moduleutil.ACTION_USER_LOGOUT".equals(intent.getAction())) {
|
||||||
// 在这里处理用户登出后的UI更新
|
// 在这里处理用户登出后的UI更新
|
||||||
// 例如:隐藏需要登录才能显示的控件
|
// 例如:隐藏需要登录才能显示的控件
|
||||||
// 或者跳转到登录状态的页面
|
// 或者跳转到登录状态的页面
|
||||||
@@ -131,7 +131,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
ColorManager.getInstance().addColorChangeListener(this);
|
ColorManager.getInstance().addColorChangeListener(this);
|
||||||
|
|
||||||
// 注册登出广播接收器
|
// 注册登出广播接收器
|
||||||
IntentFilter filter = new IntentFilter("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
IntentFilter filter = new IntentFilter("com.jdf.moduleutil.ACTION_USER_LOGOUT");
|
||||||
registerReceiver(mLogoutReceiver, filter);
|
registerReceiver(mLogoutReceiver, filter);
|
||||||
|
|
||||||
// 动态判断是否包含 @Subscribe 注解的方法
|
// 动态判断是否包含 @Subscribe 注解的方法
|
||||||
|
|||||||
@@ -672,9 +672,9 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
SpUtil.setBooleanValue("youth_model_shown", false);
|
SpUtil.setBooleanValue("youth_model_shown", false);
|
||||||
|
|
||||||
// 发送广播通知所有Activity刷新状态
|
// 发送广播通知所有Activity刷新状态
|
||||||
Intent refreshIntent = new Intent("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
Intent refreshIntent = new Intent("com.jdf.moduleutil.ACTION_USER_LOGOUT");
|
||||||
sendBroadcast(refreshIntent);
|
sendBroadcast(refreshIntent);
|
||||||
Intent intent = new Intent("com.xscm.action.LAUNCH_PAGE");
|
Intent intent = new Intent("com.jdf.action.LAUNCH_PAGE");
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
getApplicationContext().startActivity(intent);
|
getApplicationContext().startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class ColorManager {
|
public class ColorManager {
|
||||||
private static ColorManager instance;
|
private static ColorManager instance;
|
||||||
private String primaryColor = "#6C49E4"; // 默认主题色
|
private String primaryColor = "#FC7285"; // 默认主题色
|
||||||
private String buttonColor = "#FFFFFF"; // 默认按钮色
|
private String buttonColor = "#FFFFFF"; // 默认按钮色
|
||||||
|
|
||||||
// 监听器列表,用于通知颜色变化
|
// 监听器列表,用于通知颜色变化
|
||||||
@@ -71,7 +71,7 @@ public class ColorManager {
|
|||||||
try {
|
try {
|
||||||
return Color.parseColor(primaryColor);
|
return Color.parseColor(primaryColor);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return Color.parseColor("#6C49E4"); // 默认颜色
|
return Color.parseColor("#FC7285"); // 默认颜色
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 856 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 6.5 KiB |
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_selected="true" android:drawable="@mipmap/icon_me_trend_select"/>
|
<item android:state_selected="true" android:drawable="@mipmap/icon_me_trend_select"/>
|
||||||
<item android:state_selected="false" android:drawable="@mipmap/icon_me_trend_unselect"/>
|
<item android:state_selected="false" android:drawable="@mipmap/icon_me_trend_unselect"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="#BFBFBF"
|
<item android:color="#333333"
|
||||||
android:state_selected="false" />
|
android:state_selected="false" />
|
||||||
<item android:color="#323232"
|
<item android:color="#FC7285"
|
||||||
android:state_selected="true"/>
|
android:state_selected="true"/>
|
||||||
</selector>
|
</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="#ff6c49e4 " />
|
<solid android:color="#FC7285 " />
|
||||||
<corners
|
<corners
|
||||||
android:bottomLeftRadius="22dp"
|
android:bottomLeftRadius="22dp"
|
||||||
android:bottomRightRadius="22dp"
|
android:bottomRightRadius="22dp"
|
||||||
|
|||||||
@@ -294,6 +294,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/zs"
|
android:id="@+id/zs"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 1018 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 976 B After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 1020 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 900 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 768 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 972 B After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 1.3 KiB |
@@ -294,7 +294,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 主题色 -->
|
<!-- 主题色 -->
|
||||||
<color name="colorPrimary">#6C49E4</color>
|
<color name="colorPrimary">#FC7285</color>
|
||||||
|
|
||||||
<!-- 辅助色 -->
|
<!-- 辅助色 -->
|
||||||
<color name="colorSecondary1">#F0EEF7</color>
|
<color name="colorSecondary1">#F0EEF7</color>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
|||||||
protected void initData () {
|
protected void initData () {
|
||||||
list=new ArrayList<>();
|
list=new ArrayList<>();
|
||||||
list.add(new MyBagBean("发现", "1"));
|
list.add(new MyBagBean("发现", "1"));
|
||||||
list.add(new MyBagBean("扩列", "2"));
|
// list.add(new MyBagBean("扩列", "2"));
|
||||||
|
|
||||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list));
|
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list));
|
||||||
mBinding.tabLayout.setViewPager(mBinding.viewPager);
|
mBinding.tabLayout.setViewPager(mBinding.viewPager);
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
index = 0;
|
index = 0;
|
||||||
isMediaSelected = true; // 确保设置为选中状态
|
isMediaSelected = true; // 确保设置为选中状态
|
||||||
selectedTextColor = ColorManager.getInstance().getPrimaryColorInt();
|
selectedTextColor = ColorManager.getInstance().getPrimaryColorInt();
|
||||||
unselectedTextColor = Color.parseColor("#000000");
|
unselectedTextColor = Color.parseColor("#333333");
|
||||||
updateAllTabUI(); // 这会同时更新图标和文字颜色
|
updateAllTabUI(); // 这会同时更新图标和文字颜色
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.content.ClipData;
|
|||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@ import com.xscm.moduleutil.utils.SpUtil;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 音域--我的
|
* 音域--我的
|
||||||
*/
|
*/
|
||||||
@@ -260,31 +262,51 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
|||||||
SpUtil.setRealName(false);
|
SpUtil.setRealName(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 使用 ViewBinding 直接操作布局
|
||||||
LinearLayout llContainer = mBinding.llImageContainer;
|
LinearLayout llContainer = mBinding.llImageContainer;
|
||||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
llContainer.removeAllViews();
|
||||||
|
|
||||||
List<String> images = data.getIcon(); // 获取图片列表
|
List<String> images = data.getIcon();
|
||||||
if (images != null && !images.isEmpty()) {
|
if (images == null || images.isEmpty()) {
|
||||||
|
return; // 提前返回,减少嵌套层级
|
||||||
for (String url : images) {
|
|
||||||
if (url.contains("http")) {
|
|
||||||
ImageView imageView = new ImageView(getContext());
|
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
|
||||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
|
||||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
|
||||||
);
|
|
||||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
|
||||||
imageView.setLayoutParams(params);
|
|
||||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
|
||||||
|
|
||||||
// 使用 Glide 加载图片
|
|
||||||
ImageUtils.loadHeadCC(url, imageView);
|
|
||||||
|
|
||||||
llContainer.addView(imageView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取尺寸资源,避免重复调用
|
||||||
|
Resources res = getContext().getResources();
|
||||||
|
int imageWidth = res.getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_42);
|
||||||
|
int imageHeight = res.getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_15);
|
||||||
|
int rightMargin = res.getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5);
|
||||||
|
|
||||||
|
for (String url : images) {
|
||||||
|
if (!url.contains("http")) {
|
||||||
|
continue; // 跳过非HTTP链接
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageView imageView = createImageView(url, imageWidth, imageHeight, rightMargin);
|
||||||
|
llContainer.addView(imageView);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 创建ImageView并设置相关参数
|
||||||
|
*/
|
||||||
|
|
||||||
|
private ImageView createImageView(String url, int width, int height, int rightMargin) {
|
||||||
|
ImageView imageView = new ImageView(getContext());
|
||||||
|
|
||||||
|
// 设置布局参数
|
||||||
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, height);
|
||||||
|
params.setMargins(0, 0, rightMargin, 0);
|
||||||
|
imageView.setLayoutParams(params);
|
||||||
|
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||||
|
|
||||||
|
// 加载图片
|
||||||
|
ImageUtils.loadHeadCC(url, imageView);
|
||||||
|
|
||||||
|
return imageView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -16,8 +16,12 @@ import androidx.fragment.app.FragmentPagerAdapter;
|
|||||||
public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
@StringRes
|
@StringRes
|
||||||
private static final int[] TAB_TITLES = new int[]{com.xscm.moduleutil.R.string.room_rank, com.xscm.moduleutil.R.string.wealth_rank,
|
private static final int[] TAB_TITLES = new int[]{
|
||||||
com.xscm.moduleutil.R.string.charm_rank, com.xscm.moduleutil.R.string.true_love_rank};
|
com.xscm.moduleutil.R.string.room_rank,
|
||||||
|
com.xscm.moduleutil.R.string.wealth_rank,
|
||||||
|
com.xscm.moduleutil.R.string.charm_rank,
|
||||||
|
// com.xscm.moduleutil.R.string.true_love_rank
|
||||||
|
};
|
||||||
// com.xscm.moduleutil.R.string.guild_rank,
|
// com.xscm.moduleutil.R.string.guild_rank,
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
|
||||||
@@ -42,6 +46,6 @@ public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public int getCount() {
|
public int getCount() {
|
||||||
// Show 2 total pages.
|
// Show 2 total pages.
|
||||||
return 4;
|
return TAB_TITLES.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ import android.os.Bundle;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||||
@@ -297,11 +298,11 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
|||||||
// 设置初始状态
|
// 设置初始状态
|
||||||
if (position == 0) {
|
if (position == 0) {
|
||||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
||||||
textView.setTextColor(getResources().getColor(android.R.color.white));
|
textView.setTextColor(Color.parseColor("#333333"));
|
||||||
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_indicator);
|
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_indicator);
|
||||||
} else {
|
} else {
|
||||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||||
textView.setTextColor(Color.parseColor("#F1ECFF"));
|
textView.setTextColor(Color.parseColor("#666666"));
|
||||||
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_unselected_background);
|
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_unselected_background);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,7 +322,7 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
|||||||
TextView textView = customView.findViewById(R.id.tab_text);
|
TextView textView = customView.findViewById(R.id.tab_text);
|
||||||
if (textView != null) {
|
if (textView != null) {
|
||||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
||||||
textView.setTextColor(getResources().getColor(android.R.color.white));
|
textView.setTextColor(Color.parseColor("#333333"));
|
||||||
}
|
}
|
||||||
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_indicator);
|
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_indicator);
|
||||||
}
|
}
|
||||||
@@ -340,7 +341,7 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
|||||||
TextView textView = customView.findViewById(R.id.tab_text);
|
TextView textView = customView.findViewById(R.id.tab_text);
|
||||||
if (textView != null) {
|
if (textView != null) {
|
||||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||||
textView.setTextColor(Color.parseColor("#F1ECFF"));
|
textView.setTextColor(Color.parseColor("#333333"));
|
||||||
}
|
}
|
||||||
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_unselected_background);
|
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_unselected_background);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@mipmap/home_bj">
|
android:background="@mipmap/log_bj">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -104,8 +104,8 @@
|
|||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
android:layout_marginRight="@dimen/dp_16"
|
android:layout_marginRight="@dimen/dp_16"
|
||||||
app:tabIndicatorHeight="0dp"
|
app:tabIndicatorHeight="0dp"
|
||||||
app:tabSelectedTextColor="@color/white"
|
app:tabSelectedTextColor="#666666"
|
||||||
app:tabTextColor="#F1ECFF"
|
app:tabTextColor="#333333"
|
||||||
app:tabTextAppearance="@style/CustomTabTextAppearance"
|
app:tabTextAppearance="@style/CustomTabTextAppearance"
|
||||||
app:tabIndicatorFullWidth="true"
|
app:tabIndicatorFullWidth="true"
|
||||||
app:tabMode="scrollable"/>
|
app:tabMode="scrollable"/>
|
||||||
|
|||||||