1:修改我的页面
2:添加爵位功能
This commit is contained in:
@@ -42,6 +42,9 @@ android {
|
||||
dataBinding {
|
||||
enable = true
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -50,6 +53,10 @@ dependencies {
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
implementation libs.androidx.material3.android
|
||||
implementation libs.androidx.ui.tooling.preview.android
|
||||
implementation libs.androidx.tiles.tooling.preview
|
||||
implementation libs.androidx.constraintlayout
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
@@ -64,6 +71,6 @@ dependencies {
|
||||
implementation files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
|
||||
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||
|
||||
|
||||
implementation(project(':locktableview'))
|
||||
}
|
||||
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||
@@ -1,148 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/BaseAppTheme">
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/BaseAppTheme">
|
||||
<activity
|
||||
android:name=".activity.AboutUsActivity"
|
||||
android:exported="false" />
|
||||
android:name=".activity.NoblePaymentActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.WithdrawalListActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.NobleDetailsActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.GiftBoxRecordActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.NobleTitleActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.BindCardDetailsActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.GiftWallActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.BindCardActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.AboutUsActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.AlbumDetailActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.WithdrawalListActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.SettingActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.GiftBoxRecordActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.CreateAlbumActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.BindCardDetailsActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.RevenueActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.BindCardActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.DailyTasksActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.AlbumDetailActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.UserHomepageActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.SettingActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.MyBagActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.CreateAlbumActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.BriefIntroductionActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.RevenueActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.ChangeNicknameActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.DailyTasksActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.CurrencyExchangeActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.UserHomepageActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.WithdrawalActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.MyBagActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.RechargeActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.BriefIntroductionActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.MyMoneyActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.ChangeNicknameActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.EditUserInfoActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.CurrencyExchangeActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.EditUserActivity"
|
||||
android:exported="false" />
|
||||
android:name=".activity.WithdrawalActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.ChangPassActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.RechargeActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.PersonalityActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.MyMoneyActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.RealDetailActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.EditUserInfoActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.RoomAllowanceDetailActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.ChangPassActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.RoomAllowanceActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.PersonalityActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.RoomDetailsActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.RealDetailActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.CreatedRoomActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.RoomAllowanceDetailActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.MyRoomActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.RoomAllowanceActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.PhoneReplacementActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.RoomDetailsActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.ChangePasswordActivity"
|
||||
android:exported="false" />
|
||||
android:name=".activity.CreatedRoomActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.BlacklistActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.MyRoomActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.MessageReminderActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.PhoneReplacementActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.NotificationActivity"
|
||||
android:exported="false"
|
||||
/>
|
||||
android:name=".activity.BlacklistActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.UnderageActivity"
|
||||
android:exported="true"
|
||||
/>
|
||||
android:name=".activity.MessageReminderActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.RealNameActivity"
|
||||
android:exported="false" />
|
||||
android:name=".activity.NotificationActivity"
|
||||
android:exported="false"/>
|
||||
<activity
|
||||
android:name=".activity.UnderageActivity"
|
||||
android:exported="true"/>
|
||||
<activity
|
||||
android:name=".activity.RealNameActivity"
|
||||
android:exported="false"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.activity.ui.main.GiftWallConacts;
|
||||
import com.example.modulevocal.activity.ui.main.GiftWallPresenter;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import com.example.modulevocal.activity.ui.main.SectionsPagerAdapter;
|
||||
import com.example.modulevocal.databinding.ActivityGiftWallBinding;
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.bean.CombinedGiftBean;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
import com.xscm.moduleutil.bean.RoomTypeModel;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
|
||||
/**
|
||||
* 礼物墙
|
||||
*/
|
||||
public class GiftWallActivity extends BaseMvpActivity<GiftWallPresenter, ActivityGiftWallBinding> implements GiftWallConacts.View {
|
||||
SectionsPagerAdapter sectionsPagerAdapter;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("礼物墙");
|
||||
mBinding.topBar.setColor(getResources().getColor(R.color.white));
|
||||
MvpPre.giftWall(SpUtil.getUserId()+"");
|
||||
}
|
||||
|
||||
// 在获取到数据后调用此方法初始化 ViewPager
|
||||
private void setupViewPagerWithData(GiftUserWallBean data) {
|
||||
sectionsPagerAdapter = new SectionsPagerAdapter(this, data);
|
||||
ViewPager2 viewPager = mBinding.viewPager;
|
||||
viewPager.setAdapter(sectionsPagerAdapter);
|
||||
TabLayout tabs = mBinding.tabs;
|
||||
|
||||
// TabLayout 需要手动关联
|
||||
new TabLayoutMediator(mBinding.tabs, mBinding.viewPager,
|
||||
(tab, position) -> tab.setText(sectionsPagerAdapter.getPageTitle(position))
|
||||
).attach();
|
||||
|
||||
// 设置选中和未选中的文字颜色及大小
|
||||
tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
@Override
|
||||
public void onTabSelected(TabLayout.Tab tab) {
|
||||
View customView = tab.getCustomView();
|
||||
if (customView instanceof TextView textView) {
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
||||
textView.setTextColor(getResources().getColor(android.R.color.white));
|
||||
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_indicator);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab) {
|
||||
View customView = tab.getCustomView();
|
||||
if (customView instanceof TextView textView) {
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
|
||||
textView.setTextColor(Color.parseColor("#ffffff"));
|
||||
customView.setBackgroundResource(com.xscm.moduleutil.R.drawable.tab_unselected_background);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselected(TabLayout.Tab tab) {
|
||||
}
|
||||
});
|
||||
tabs.selectTab(tabs.getTabAt(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_gift_wall;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GiftWallPresenter bindPresenter() {
|
||||
return new GiftWallPresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGiftWall(GiftUserWallBean data) {
|
||||
// 添加点亮的礼物
|
||||
// 初始化 ViewPager 和 TabLayout
|
||||
setupViewPagerWithData(data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Shader;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.GridView;
|
||||
import android.widget.TextView;
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.adapter.GridNobleAdapter;
|
||||
import com.example.modulevocal.adapter.NobliityBannerAdapter;
|
||||
import com.example.modulevocal.conacts.NobleTitleConacts;
|
||||
import com.example.modulevocal.databinding.ActivityNobleDetailsBinding;
|
||||
import com.example.modulevocal.presenter.NobleTitlePresenter;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.*;
|
||||
import com.xscm.moduleutil.dialog.RoomAuctionWebViewDialog;
|
||||
import com.zhpan.bannerview.BannerViewPager;
|
||||
import com.zhpan.bannerview.constants.PageStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
|
||||
/**
|
||||
* @Description: 这是爵位详情方案
|
||||
* @Author: qx
|
||||
* @CreateDate: 2022/3/23 10:05
|
||||
*/
|
||||
public class NobleDetailsActivity extends BaseMvpActivity<NobleTitlePresenter, ActivityNobleDetailsBinding> implements NobleTitleConacts.View {
|
||||
NobliityBannerAdapter mAdapter;
|
||||
GridView gridView;
|
||||
GridNobleAdapter mGiftWallAdapter;
|
||||
|
||||
private String lid="";
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
mBinding.ivBack.setColorFilter(getResources().getColor(R.color.white));
|
||||
mBinding.ivBack.setOnClickListener(v -> finish());
|
||||
mBinding.ivIntent.setOnClickListener(v -> {//爵位规则
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "api/Page/page_show?id=29");
|
||||
RoomAuctionWebViewDialog dialog = new RoomAuctionWebViewDialog(this, bundle);
|
||||
dialog.show();
|
||||
});
|
||||
gridView = mBinding.gridView;
|
||||
mGiftWallAdapter=new GridNobleAdapter();
|
||||
mBinding.imLjkt.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(this, NoblePaymentActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("lid",lid);
|
||||
intent.putExtras( bundle);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
lid=getIntent().getStringExtra("lid");
|
||||
if (lid==null){
|
||||
lid="";
|
||||
}
|
||||
MvpPre.getNobilityList();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_noble_details;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NobleTitlePresenter bindPresenter() {
|
||||
return new NobleTitlePresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityDetail(NobilitDeatils nobilitDeatils) {
|
||||
|
||||
}
|
||||
int index = 0;
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
@Override
|
||||
public void getNobilityList(List<NobilitList> nobilitLists) {
|
||||
if (nobilitLists==null){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (int i=0; i < nobilitLists.size(); i++){
|
||||
if (lid.equals(nobilitLists.get(i).getLid()+"")){
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
mAdapter = new NobliityBannerAdapter();
|
||||
mBinding.banner
|
||||
.setAdapter(mAdapter)
|
||||
.setAutoPlay(false)
|
||||
.setIndicatorVisibility(GONE)
|
||||
.setPageStyle(PageStyle.MULTI_PAGE_OVERLAP, 0.6f)
|
||||
.setRevealWidth(200)
|
||||
.setCanLoop(false)
|
||||
.create();
|
||||
mBinding.banner.create(nobilitLists); // 刷新数据并启动自动播放
|
||||
mBinding.banner.setCurrentItem(index);
|
||||
mAdapter.setmCurrentPosition( index);
|
||||
mBinding.banner.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
super.onPageScrolled(position, positionOffset, positionOffsetPixels);
|
||||
updateNobleInfo(nobilitLists.get( position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
super.onPageSelected(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
super.onPageScrollStateChanged(state);
|
||||
}
|
||||
});
|
||||
updateNobleInfo(nobilitLists.get(index), index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindType(BindType bindType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appPay(AppPay appPay) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityPrice(NobilityPrice nobilityPrice) {
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void updateNobleInfo(NobilitList nobilitLists, int position) {
|
||||
mBinding.tvNobleLv.setText(nobilitLists.getName());
|
||||
applyGradientToTextView(mBinding.tvNobleLv);
|
||||
mBinding.tvTq.setText("专属特权(" + nobilitLists.getPower().getCount_str()+")");
|
||||
mBinding.tvLvTis.setText(nobilitLists.getName() + "专属 ¥");
|
||||
mBinding.tvNobleMob.setText(nobilitLists.getPay_price()+" / "+nobilitLists.getDay()+"天");
|
||||
|
||||
gridView.setAdapter(mGiftWallAdapter);
|
||||
lid=nobilitLists.getLid()+"";
|
||||
// 观察数据变化并更新 GridView
|
||||
mGiftWallAdapter.updateData(nobilitLists.getPower().getList());
|
||||
if (position>=index){
|
||||
if (position==index){
|
||||
mBinding.imLjkt.setImageResource(com.xscm.moduleutil.R.mipmap.noble_xf);
|
||||
}else {
|
||||
mBinding.imLjkt.setImageResource(com.xscm.moduleutil.R.mipmap.noble_ljsj);
|
||||
}
|
||||
mBinding.imLjkt.setClickable( true);
|
||||
}else {
|
||||
mBinding.imLjkt.setImageResource(com.xscm.moduleutil.R.mipmap.noble_h_kt);
|
||||
mBinding.imLjkt.setClickable( false);
|
||||
}
|
||||
}
|
||||
private void applyGradientToTextView(TextView textView) {
|
||||
ViewTreeObserver vto = textView.getViewTreeObserver();
|
||||
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
textView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
int width = textView.getWidth();
|
||||
if (width > 0) {
|
||||
LinearGradient gradient = new LinearGradient(
|
||||
0, 0, width, 0,
|
||||
new int[]{0xFFF4C07C, 0xFFFFFFFF, 0xFFF4C07C},
|
||||
new float[]{0f, 0.5f, 1f},
|
||||
Shader.TileMode.CLAMP
|
||||
);
|
||||
textView.getPaint().setShader(gradient);
|
||||
textView.invalidate();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Paint;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.adapter.NoblePrivilegeAdapter;
|
||||
import com.example.modulevocal.conacts.NobleTitleConacts;
|
||||
import com.example.modulevocal.databinding.ActivityNoblePaymentBinding;
|
||||
import com.example.modulevocal.presenter.NobleTitlePresenter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.adapter.PayMethodAdapter;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.*;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.dialog.RoomAuctionWebViewDialog;
|
||||
import com.xscm.moduleutil.event.PayEvent;
|
||||
import com.xscm.moduleutil.utils.*;
|
||||
import com.xscm.moduleutil.widget.PaymentUtil;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
/**
|
||||
* @Description: 这是爵位支付方案
|
||||
* @Author: qx
|
||||
* @CreateDate: 2022/3/23 10:05
|
||||
*/
|
||||
public class NoblePaymentActivity extends BaseMvpActivity<NobleTitlePresenter, ActivityNoblePaymentBinding> implements NobleTitleConacts.View{
|
||||
private PayMethodAdapter bindTypeAdapter;
|
||||
private BindType.AllData selectedItem;
|
||||
private String lid;
|
||||
private String money;
|
||||
private String name;
|
||||
private String yxq;
|
||||
private String imNoble2;
|
||||
private List<NobilityPrice.PowerItem> powerItems=new ArrayList<>();
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.ivBack.setOnClickListener(v -> finish());
|
||||
mBinding.ivIntent.setOnClickListener(v -> {//爵位规则
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "api/Page/page_show?id=29");
|
||||
RoomAuctionWebViewDialog dialog = new RoomAuctionWebViewDialog(this, bundle);
|
||||
dialog.show(); });
|
||||
|
||||
mBinding.tvYsxy.setOnClickListener(this::onClick);
|
||||
|
||||
mBinding.recycleView1.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
bindTypeAdapter = new PayMethodAdapter(com.xscm.moduleutil.R.layout.item_bind_type);
|
||||
mBinding.recycleView1.setAdapter(bindTypeAdapter);
|
||||
|
||||
bindTypeAdapter.setOnItemClickListener((adapter, view, position) -> {
|
||||
|
||||
bindTypeAdapter.setSelectedPosition(position);
|
||||
|
||||
// 获取当前选中的数据
|
||||
selectedItem = bindTypeAdapter.getItem(position);
|
||||
// 可以在这里处理选中逻辑,比如保存到变量或触发支付
|
||||
});
|
||||
|
||||
|
||||
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.tvPayment, ColorManager.getInstance().getPrimaryColorInt(), 53);
|
||||
mBinding.tvPayment.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
||||
|
||||
mBinding.tvPayment.setOnClickListener(this::onClick);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
lid=getIntent().getStringExtra("lid");
|
||||
MvpPre.getNobilityPrice(lid);
|
||||
MvpPre.bindType(SpUtil.getUserId() + "");
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id== R.id.tv_ysxy) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=30").withString("title", "爵位服务协议").navigation();
|
||||
}else if (id== R.id.tv_payment){
|
||||
if (!mBinding.cbPrivacy.isChecked()) {
|
||||
ToastUtils.show("请先勾选服务条款");
|
||||
return;
|
||||
}
|
||||
MvpPre.appPay(SpUtil.getUserId() + "", money, selectedItem.getType(),lid);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_noble_payment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NobleTitlePresenter bindPresenter() {
|
||||
return new NobleTitlePresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityDetail(NobilitDeatils nobilitDeatils) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityList(List<NobilitList> nobilitLists) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindType(BindType bindType) {
|
||||
List<BindType.AllData> allData = new ArrayList<>();
|
||||
if (bindType.getAli().getIs_pay_open().equals("1")) {
|
||||
allData.add(bindType.getAli());
|
||||
}
|
||||
if (bindType.getWx().getIs_pay_open().equals("1")) {
|
||||
allData.add(bindType.getWx());
|
||||
}
|
||||
if (bindType.getBank().getIs_pay_open().equals("1")) {
|
||||
allData.add(bindType.getBank());
|
||||
}
|
||||
if (bindType.getAli_tl().getIs_pay_open().equals("1")) {
|
||||
allData.add(bindType.getAli_tl());
|
||||
}
|
||||
if (bindType.getWx_tl().getIs_pay_open().equals("1")) {
|
||||
allData.add(bindType.getWx_tl());
|
||||
}
|
||||
|
||||
bindTypeAdapter.setNewData(allData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appPay(AppPay appPay) {
|
||||
if (appPay.getAli()!=null) {
|
||||
PaymentUtil.payAlipay(this, appPay.getAli());
|
||||
}else if (appPay.getWx()!=null){
|
||||
|
||||
IWXAPI wxapi = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||
PaymentUtil.payWxMiniProgram2(wxapi,appPay);
|
||||
}else if (appPay.getTl()!=null){
|
||||
if (appPay.getTl().getRemark().equals("5")) {//微信
|
||||
IWXAPI wxapi = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||
try {
|
||||
String paramString = buildParamString(appPay.getTl());
|
||||
PaymentUtil.payWxMiniProgramWx(wxapi,paramString);
|
||||
android.util.Log.d("RequestParams", paramString); // 输出拼接后的参数
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (appPay.getTl().getRemark().equals("4")) {//支付宝
|
||||
String s= JSON.toJSONString(appPay.getTl());
|
||||
try {
|
||||
String query = URLEncoder.encode("payinfo=" + URLEncoder.encode(s, "UTF-8"), "UTF-8");
|
||||
String url = "alipays://platformapi/startapp?appId=2021001104615521&page=pages/orderDetail/orderDetail&thirdPartSchema="
|
||||
+ URLEncoder.encode("myziroom://myziroom/", "UTF-8") + "&query=" + query;
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityPrice(NobilityPrice nobilityPrice) {
|
||||
if (nobilityPrice==null){
|
||||
return;
|
||||
}
|
||||
name=nobilityPrice.getNobility_name();
|
||||
yxq=nobilityPrice.getEnd_time();
|
||||
mBinding.tvLv.setText(nobilityPrice.getNobility_name());
|
||||
ImageUtils.loadHeadCC(nobilityPrice.getNobility_image(), mBinding.imNoble);
|
||||
imNoble2=nobilityPrice.getNobility_image();
|
||||
mBinding.tvTime.setText("有效期:"+nobilityPrice.getDay()+"天");
|
||||
mBinding.tvSjJg.setText("¥"+nobilityPrice.getPrice());
|
||||
mBinding.tvHxJg.setText("¥"+nobilityPrice.getPay_price());
|
||||
mBinding.tvHxJg.setPaintFlags( mBinding.tvHxJg.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
money=nobilityPrice.getPrice();
|
||||
|
||||
NoblePrivilegeAdapter adapter = new NoblePrivilegeAdapter();
|
||||
adapter.setNewData(nobilityPrice.getPower_list());
|
||||
mBinding.recycleView2.setLayoutManager(new LinearLayoutManager(this));
|
||||
// 设置到 RecyclerView
|
||||
mBinding.recycleView2.setAdapter(adapter);
|
||||
powerItems=nobilityPrice.getPower_list();
|
||||
|
||||
}
|
||||
|
||||
public static String buildParamString(Object obj) throws IllegalAccessException {
|
||||
Class<?> clazz = obj.getClass();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
TreeMap<String, String> paramMap = new TreeMap<>();
|
||||
|
||||
// 遍历字段并填充 TreeMap
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true); // 允许访问私有字段
|
||||
Object value = field.get(obj);
|
||||
if (value != null && !String.valueOf(value).isEmpty()) {
|
||||
paramMap.put(field.getName(), String.valueOf(value));
|
||||
}
|
||||
}
|
||||
|
||||
// 使用 StringBuilder 拼接参数字符串
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Map.Entry<String, String> entry : paramMap.entrySet()) {
|
||||
if (builder.length() > 0) {
|
||||
builder.append("&");
|
||||
}
|
||||
builder.append(entry.getKey())
|
||||
.append("=")
|
||||
.append(entry.getValue());
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageEvent(PayEvent event) {
|
||||
if (event.getType()==1){
|
||||
ToastUtils.show("支付成功");
|
||||
mBinding.cl.setVisibility(GONE);
|
||||
mBinding.imNoble.setVisibility(GONE);
|
||||
mBinding.t2.setVisibility(GONE);
|
||||
mBinding.recycleView1.setVisibility(GONE);
|
||||
mBinding.tvPayment.setVisibility(GONE);
|
||||
mBinding.llAgreement.setVisibility(GONE);
|
||||
mBinding.recycleView2.setVisibility(GONE);
|
||||
mBinding.tvTs.setVisibility(GONE);
|
||||
mBinding.tv.setVisibility(GONE);
|
||||
|
||||
mBinding.cl2.setVisibility(VISIBLE);
|
||||
mBinding.tvSucess2.setText("恭喜您已成功开通"+name+"爵位");
|
||||
mBinding.tv3.setText(name+"特权");
|
||||
mBinding.tv4.setText("有效期:"+yxq);
|
||||
mBinding.tvPayment2.setOnClickListener(v -> {
|
||||
finish();
|
||||
});
|
||||
ImageUtils.loadHeadCC(imNoble2, mBinding.imNoble2);
|
||||
NoblePrivilegeAdapter adapter = new NoblePrivilegeAdapter();
|
||||
adapter.setNewData(powerItems);
|
||||
mBinding.recycleView3.setLayoutManager(new LinearLayoutManager(this));
|
||||
// 设置到 RecyclerView
|
||||
mBinding.recycleView3.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Shader;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.conacts.NobleTitleConacts;
|
||||
import com.example.modulevocal.databinding.ActivityNobleTitleBinding;
|
||||
import com.example.modulevocal.presenter.NobleTitlePresenter;
|
||||
import com.rmondjone.locktableview.LockTableView;
|
||||
import com.rmondjone.xrecyclerview.ProgressStyle;
|
||||
import com.rmondjone.xrecyclerview.XRecyclerView;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.base.BaseRoomContacts;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.*;
|
||||
import com.xscm.moduleutil.dialog.RoomAuctionWebViewDialog;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.TimeUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
/**
|
||||
* @Description: 爵位展示页面
|
||||
* @Author: qx
|
||||
* @Data: 2022/4/18 21:05
|
||||
*/
|
||||
public class NobleTitleActivity extends BaseMvpActivity<NobleTitlePresenter, ActivityNobleTitleBinding> implements NobleTitleConacts.View {
|
||||
private LinearLayout mContentView;
|
||||
private List<NobilitDeatils.nobilityPowerItem> mNobilityPowerItemList = new ArrayList<>();
|
||||
private String lid;
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.getNobilityDetail();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
mBinding.ivBack.setColorFilter(getResources().getColor(R.color.white));
|
||||
mBinding.ivBack.setOnClickListener(v -> finish());
|
||||
mBinding.ivIntent.setOnClickListener(v -> {//爵位规则
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "api/Page/page_show?id=29");
|
||||
RoomAuctionWebViewDialog dialog = new RoomAuctionWebViewDialog(this, bundle);
|
||||
dialog.show(); });
|
||||
mContentView = mBinding.contentView;
|
||||
|
||||
mBinding.imMeNobleStatus.setOnClickListener(this::onClick);
|
||||
mBinding.imMeNobleXf.setOnClickListener(this::onClick);
|
||||
mBinding.imSj.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id== R.id.im_me_noble_status || id== R.id.im_sj) {
|
||||
Intent intent = new Intent(this, NobleDetailsActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("lid",lid);
|
||||
intent.putExtras( bundle);
|
||||
startActivity(intent);
|
||||
}else if (id== R.id.im_me_noble_xf) {
|
||||
Intent intent = new Intent(this, NoblePaymentActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("lid",lid);
|
||||
intent.putExtras( bundle);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_noble_title;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NobleTitlePresenter bindPresenter() {
|
||||
return new NobleTitlePresenter(this, this);
|
||||
}
|
||||
|
||||
private void setmContentView() {
|
||||
ArrayList<ArrayList<TableCellData>> mTableDatas = new ArrayList<ArrayList<TableCellData>>();
|
||||
ArrayList<TableCellData> mfristData = new ArrayList<TableCellData>();
|
||||
for (int i = 0; i < mNobilityPowerItemList.size(); i++) {
|
||||
TableCellData mTableCellData = new TableCellData();
|
||||
mTableCellData.setTitle(mNobilityPowerItemList.get(i).getName());
|
||||
mTableCellData.setColor("");
|
||||
mfristData.add(mTableCellData); // 添加各爵位名称
|
||||
}
|
||||
mTableDatas.add(mfristData); // 只添加一次表头
|
||||
|
||||
// 构建每一行的数据
|
||||
if (!mNobilityPowerItemList.isEmpty()) {
|
||||
int maxPrivileges = mNobilityPowerItemList.get(0).getNobility_list().size();
|
||||
|
||||
// 为每个特权构建一行数据
|
||||
for (int j = 0; j < maxPrivileges; j++) {
|
||||
ArrayList<TableCellData> mRowDatas = new ArrayList<TableCellData>();
|
||||
|
||||
// 添加特权名称(第一列)
|
||||
if (j < mNobilityPowerItemList.get(0).getNobility_list().size()) {
|
||||
TableCellData mTableCellData = new TableCellData();
|
||||
mTableCellData.setTitle(mNobilityPowerItemList.get(0).getNobility_list().get(j).getName());
|
||||
mTableCellData.setColor("");
|
||||
mRowDatas.add(mTableCellData);
|
||||
} else {
|
||||
mRowDatas.add(new TableCellData()); // 空白占位
|
||||
}
|
||||
|
||||
// 添加各个爵位对该特权的支持情况
|
||||
for (int i = 1; i < mNobilityPowerItemList.size(); i++) {
|
||||
if (j < mNobilityPowerItemList.get(i).getNobility_list().size()) {
|
||||
NobilitDeatils.nobilityPowerItem nobilityItem = mNobilityPowerItemList.get(i);
|
||||
NobilitDeatils.nobilityPowerItem.nobilityPowerItem nobilityList = nobilityItem.getNobility_list().get(j);
|
||||
|
||||
if ( nobilityList.getId()==2) {
|
||||
if (nobilityItem.getNick_name_color_name() != null && !nobilityItem.getNick_name_color_name().equals("无")) {
|
||||
TableCellData mTableCellData = new TableCellData();
|
||||
mTableCellData.setTitle(nobilityItem.getNick_name_color_name());
|
||||
mTableCellData.setColor(nobilityItem.getNick_name_color());
|
||||
mRowDatas.add(mTableCellData); // 支持
|
||||
}
|
||||
}else {
|
||||
// 根据 status 显示是否支持
|
||||
if (nobilityList.getStatus() == 1) {
|
||||
TableCellData mTableCellData = new TableCellData();
|
||||
mTableCellData.setTitle("1");
|
||||
mTableCellData.setColor("");
|
||||
mRowDatas.add(mTableCellData); // 支持
|
||||
} else {
|
||||
TableCellData mTableCellData = new TableCellData();
|
||||
mTableCellData.setTitle("0");
|
||||
mTableCellData.setColor("");
|
||||
mRowDatas.add(mTableCellData); // 不支持
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mRowDatas.add(new TableCellData()); // 空白占位
|
||||
}
|
||||
}
|
||||
mTableDatas.add(mRowDatas);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final LockTableView mLockTableView = new LockTableView(this, mContentView, mTableDatas);
|
||||
mLockTableView.setLockFristColumn(true) //是否锁定第一列
|
||||
.setLockFristRow(true) //是否锁定第一行
|
||||
.setMaxColumnWidth(79) //列最大宽度
|
||||
.setMinColumnWidth(30) //列最小宽度
|
||||
.setColumnWidth(1, 79) //设置指定列文本宽度
|
||||
.setMinRowHeight(30)//行最小高度
|
||||
.setMaxRowHeight(35)//行最大高度
|
||||
.setTextViewSize(14) //单元格字体大小
|
||||
.setFristRowBackGroudColor(com.xscm.moduleutil.R.color.transparent)//表头背景色
|
||||
.setTableHeadTextColor(com.xscm.moduleutil.R.color.white)//表头字体颜色
|
||||
.setTableContentTextColor(com.xscm.moduleutil.R.color.white)//单元格字体颜色
|
||||
.setCellPadding(5)//设置单元格内边距(dp)
|
||||
// .setNullableString("N/A") //空值替换值
|
||||
.setTableViewListener(new LockTableView.OnTableViewListener() {
|
||||
@Override
|
||||
public void onTableViewScrollChange(int x, int y) {
|
||||
// Log.e("滚动值","["+x+"]"+"["+y+"]");
|
||||
}
|
||||
})//设置横向滚动回调监听
|
||||
.setTableViewRangeListener(new LockTableView.OnTableViewRangeListener() {
|
||||
@Override
|
||||
public void onLeft(HorizontalScrollView view) {
|
||||
Log.e("滚动边界", "滚动到最左边");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRight(HorizontalScrollView view) {
|
||||
Log.e("滚动边界", "滚动到最右边");
|
||||
}
|
||||
})//设置横向滚动边界监听
|
||||
.show(); //显示表格,此方法必须调用
|
||||
mLockTableView.getTableScrollView().setPullRefreshEnabled(false);
|
||||
mLockTableView.getTableScrollView().setLoadingMoreEnabled(false);
|
||||
mLockTableView.getTableScrollView().setRefreshProgressStyle(ProgressStyle.SquareSpin);
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void getNobilityDetail(NobilitDeatils nobilitDeatils) {
|
||||
ImageUtils.loadHeadCC(nobilitDeatils.getUser_info().getAvatar(), mBinding.ciUserImage);
|
||||
mBinding.tvUserName.setText(nobilitDeatils.getUser_info().getNickname());
|
||||
if (nobilitDeatils.getNobility_info().getStatus() == 0) {
|
||||
mBinding.tvUserLv.setText("暂未开通任何爵位");
|
||||
mBinding.imMeNobleStatus.setImageResource(com.xscm.moduleutil.R.mipmap.me_noble_no);
|
||||
mBinding.tvUserStatus.setText("您尚未开通任何爵位");
|
||||
mBinding.imMeNobleXf.setVisibility(GONE);
|
||||
mBinding.imSj.setVisibility(GONE);
|
||||
mBinding.ciImage2.setVisibility(GONE);
|
||||
mBinding.tvMeX.setVisibility(GONE);
|
||||
mBinding.imKt.setVisibility(GONE);
|
||||
} else {
|
||||
lid=nobilitDeatils.getNobility_info().getLid()+"";
|
||||
mBinding.tvUserLv.setText("的爵位");
|
||||
mBinding.imMeNobleStatus.setVisibility(GONE);
|
||||
ImageUtils.loadHeadCC(nobilitDeatils.getNobility_info().getImage(), mBinding.imNoble);
|
||||
mBinding.imMeNobleXf.setVisibility(VISIBLE);
|
||||
mBinding.tvMeNobleLv.setVisibility(VISIBLE);
|
||||
mBinding.tvUserStatus.setText("截止时间:" + nobilitDeatils.getNobility_info().getEnd_time());
|
||||
mBinding.tvMeNobleLv.setText(nobilitDeatils.getNobility_info().getName());
|
||||
applyGradientToTextView(mBinding.tvMeNobleLv);
|
||||
mBinding.imSj.setVisibility(VISIBLE);
|
||||
mBinding.ciImage2.setVisibility(VISIBLE);
|
||||
mBinding.tvMeX.setVisibility(VISIBLE);
|
||||
mBinding.imKt.setVisibility(VISIBLE);
|
||||
ImageUtils.loadHeadCC(nobilitDeatils.getUser_info().getAvatar(), mBinding.ciImage2);
|
||||
String nickname = nobilitDeatils.getUser_info().getNickname();
|
||||
String displayNickname = nickname.length() > 3 ? nickname.substring(0, 3) + ".." : nickname;
|
||||
mBinding.tvMeX.setText(displayNickname + "的当前爵位状态是" + nobilitDeatils.getNobility_info().getName());
|
||||
// mBinding.tvMeX.setText(nobilitDeatils.getUser_info().getNickname()+"的当前爵位状态是"+nobilitDeatils.getNobility_info().getName());
|
||||
|
||||
}
|
||||
|
||||
mNobilityPowerItemList = nobilitDeatils.getNobility_power_list();
|
||||
setmContentView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityList(List<NobilitList> nobilitLists) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindType(BindType bindType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appPay(AppPay appPay) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityPrice(NobilityPrice nobilityPrice) {
|
||||
|
||||
}
|
||||
|
||||
// 在 Activity 或 Fragment 中
|
||||
private void applyGradientToTextView(TextView textView) {
|
||||
ViewTreeObserver vto = textView.getViewTreeObserver();
|
||||
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
textView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
int width = textView.getWidth();
|
||||
int height = textView.getHeight();
|
||||
if (width > 0) {
|
||||
LinearGradient gradient = new LinearGradient(
|
||||
0, 0, 0, height,
|
||||
new int[]{0xFFA292FF,0xFFA292FF, 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 0xFFA292FF,0xFFA292FF},
|
||||
new float[]{0f,0.2f,0.5f, 0.5f,0.5f, 0.8f, 1f} ,
|
||||
Shader.TileMode.MIRROR
|
||||
);
|
||||
textView.getPaint().setShader(gradient);
|
||||
textView.invalidate();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.FirstChargeGiftBean;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.dialog.FirstChargeDialog;
|
||||
import com.xscm.moduleutil.dialog.RealNameDialog;
|
||||
import com.xscm.moduleutil.dialog.YouthModelDialog;
|
||||
@@ -40,6 +41,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
||||
|
||||
private int clickCount = 0;
|
||||
private static final int REQUIRED_CLICKS = 6;
|
||||
private UserInfo userInfo;
|
||||
private Handler handler = new Handler();
|
||||
private Runnable resetRunnable = new Runnable() {
|
||||
@Override
|
||||
@@ -50,7 +52,21 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
||||
private static final long RESET_DELAY = 1000; // 1秒无操作自动重置
|
||||
|
||||
protected void initData() {
|
||||
userInfo = SpUtil.getUserInfo();
|
||||
mBinding.tvBbh.setText(CommonAppConfig.getInstance().getVersion());
|
||||
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getIs_hide() != null && userInfo.getIs_hide().equals("1")) {
|
||||
mBinding.llQhdz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getHide_status()!=null && userInfo.getHide_status().equals("1")){
|
||||
mBinding.swit.setChecked(true);
|
||||
}else {
|
||||
mBinding.swit.setChecked(false);
|
||||
}
|
||||
} else {
|
||||
mBinding.llQhdz.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,9 +90,15 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
||||
mBinding.llZhxiao.setOnClickListener(this::onClick);
|
||||
mBinding.llGywm.setOnClickListener(this::onClick);
|
||||
mBinding.llBbh.setOnClickListener(this::onClick);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (MvpPre == null) {
|
||||
MvpPre = bindPresenter();
|
||||
}
|
||||
|
||||
if (view.getId() == R.id.ll_youth) {
|
||||
// startActivity(new Intent(this, UnderageActivity.class));
|
||||
showYouthModelDialog();
|
||||
@@ -125,17 +147,25 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
||||
}
|
||||
}).setNegativeButton("取消", null).create().show();
|
||||
} else if (view.getId() == R.id.swit) {
|
||||
// if (mBinding.swit.isChecked()) {
|
||||
// ConfigManager.getInstance().switchEnvironment(EnvironmentEnum.PRODUCTION);
|
||||
// EnvironmentEnum selectedEnv = EnvironmentEnum.PRODUCTION;
|
||||
// EnvironmentPrefs prefs = new EnvironmentPrefs(this);
|
||||
// prefs.setSelectedEnvironment(selectedEnv);
|
||||
// } else {
|
||||
// ConfigManager.getInstance().switchEnvironment(EnvironmentEnum.TEST);
|
||||
// EnvironmentEnum selectedEnv = EnvironmentEnum.TEST;
|
||||
// EnvironmentPrefs prefs = new EnvironmentPrefs(this);
|
||||
// prefs.setSelectedEnvironment(selectedEnv);
|
||||
// }
|
||||
|
||||
if (mBinding.swit.isChecked()) {
|
||||
ConfigManager.getInstance().switchEnvironment(EnvironmentEnum.PRODUCTION);
|
||||
EnvironmentEnum selectedEnv = EnvironmentEnum.PRODUCTION;
|
||||
EnvironmentPrefs prefs = new EnvironmentPrefs(this);
|
||||
prefs.setSelectedEnvironment(selectedEnv);
|
||||
MvpPre.getModifyHideStatus("1");
|
||||
} else {
|
||||
ConfigManager.getInstance().switchEnvironment(EnvironmentEnum.TEST);
|
||||
EnvironmentEnum selectedEnv = EnvironmentEnum.TEST;
|
||||
EnvironmentPrefs prefs = new EnvironmentPrefs(this);
|
||||
prefs.setSelectedEnvironment(selectedEnv);
|
||||
MvpPre.getModifyHideStatus("0");
|
||||
}
|
||||
|
||||
|
||||
} else if (view.getId() == R.id.ll_tcdl) {
|
||||
new AlertDialog.Builder(this).setMessage("确定要退出登录吗?")
|
||||
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||
@@ -177,7 +207,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
||||
startActivity(new Intent(this, AboutUsActivity.class));
|
||||
|
||||
} else if (view.getId() == R.id.ll_bbh) {
|
||||
if (SpUtil.getShelf()==1) {
|
||||
if (SpUtil.getShelf() == 1) {
|
||||
// 移除之前的重置任务
|
||||
handler.removeCallbacks(resetRunnable);
|
||||
clickCount++;
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.example.modulevocal.activity.ui.main;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.adapter.TopUsersAdapter;
|
||||
import com.xscm.moduleutil.bean.CombinedGiftBean;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
import com.xscm.moduleutil.utils.ImageLoader;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* com.example.modulevocal.activity.ui.main
|
||||
* qx
|
||||
* 2025/11/5
|
||||
*/
|
||||
public class GiftWallAdapter extends BaseAdapter {
|
||||
private List<GiftUserWallBean.GiftWallBean> mDataList;
|
||||
|
||||
public GiftWallAdapter(List<GiftUserWallBean.GiftWallBean> dataList) {
|
||||
this.mDataList = dataList;
|
||||
}
|
||||
|
||||
public void updateData(List<GiftUserWallBean.GiftWallBean> newDataList) {
|
||||
this.mDataList = newDataList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mDataList != null ? mDataList.size() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return mDataList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
// 实现 GridView item 的布局和数据绑定
|
||||
// 这里返回每个 GridView 项的视图
|
||||
ViewHolder holder;
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.item_gift_wall, parent, false);
|
||||
holder = new ViewHolder();
|
||||
holder.textView = convertView.findViewById(R.id.tv_gift_name);
|
||||
holder.iv_gift_image = convertView.findViewById(R.id.iv_gift_image);
|
||||
holder.gift_num = convertView.findViewById(R.id.gift_num);
|
||||
holder.tv_price33 = convertView.findViewById(R.id.tv_price33);
|
||||
holder.rv_gift_user_list = convertView.findViewById(R.id.rv_gift_user_list);
|
||||
holder.tv_gift_values = convertView.findViewById(R.id.tv_gift_values);
|
||||
holder.cl_gift_item = convertView.findViewById(R.id.cl_gift_item);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
GiftUserWallBean.GiftWallBean item = mDataList.get(position);
|
||||
holder.textView.setText(item.getGift_name());
|
||||
// ImageUtils.loadHeadCC(item.getBase_image(), holder.iv_gift_image);
|
||||
holder.tv_price33.setText(item.getGift_price());
|
||||
|
||||
|
||||
TextView tv_number = holder.gift_num;
|
||||
if (item.is_liang()) {
|
||||
holder.tv_gift_values.setVisibility(View.VISIBLE);
|
||||
holder.gift_num.setVisibility(View.VISIBLE);
|
||||
holder.rv_gift_user_list.setVisibility(View.VISIBLE);
|
||||
holder.cl_gift_item.setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_wall_liang);
|
||||
// helper.getView(R.id.cl_iv_down_on).setBackgroundColor(Color.parseColor("#E6E6E6"));
|
||||
// 点亮的礼物显示高亮和送礼物的用户
|
||||
tv_number.setText("共计" + item.getTotal_count() + "个");
|
||||
ImageUtils.loadHeadCC(item.getBase_image(), holder.iv_gift_image);
|
||||
// 显示送礼物的用户列表
|
||||
RecyclerView recyclerView = holder.rv_gift_user_list;
|
||||
// recyclerView.setLayoutManager(new GridLayoutManager(mContext,2,LinearLayoutManager.HORIZONTAL,false));
|
||||
// recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(convertView.getContext(), LinearLayoutManager.HORIZONTAL, false) {
|
||||
@Override
|
||||
public boolean canScrollHorizontally() {
|
||||
return false; // 禁止水平滑动
|
||||
}
|
||||
});
|
||||
|
||||
// TopUsersAdapter topUsersAdapter = new TopUsersAdapter(item.getTop_users());
|
||||
if (item.getTop_users() != null && item.getTop_users().size() > 0) {
|
||||
List<CombinedGiftBean.TopUsers> displayUsers = new ArrayList<>();
|
||||
if (item.getTop_users() != null) {
|
||||
int maxDisplay = Math.min(2, item.getTop_users().size()); // 最多显示2个
|
||||
for (int i = 0; i < maxDisplay; i++) {
|
||||
displayUsers.add(item.getTop_users().get(i));
|
||||
}
|
||||
}
|
||||
TopUsersAdapter topUsersAdapter = new TopUsersAdapter(displayUsers);
|
||||
recyclerView.setAdapter(topUsersAdapter);
|
||||
holder.tv_gift_values.setText("等" + item.getTop_users().size() + "人");
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
holder.cl_gift_item.setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_wall_no_liang);
|
||||
ImageLoader.loadImage(convertView.getContext(), holder.iv_gift_image, item.getBase_image(),0.4f);
|
||||
holder.tv_gift_values.setVisibility(View.GONE);
|
||||
holder.gift_num.setVisibility(View.GONE);
|
||||
holder.rv_gift_user_list.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
static class ViewHolder {
|
||||
TextView textView;
|
||||
ImageView iv_gift_image;
|
||||
|
||||
TextView tv_gift_values;
|
||||
TextView gift_num;
|
||||
TextView tv_price33;
|
||||
RecyclerView rv_gift_user_list;
|
||||
|
||||
ConstraintLayout cl_gift_item;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.example.modulevocal.activity.ui.main;
|
||||
|
||||
import android.app.Activity;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
|
||||
/**
|
||||
* com.example.modulevocal.activity.ui.main
|
||||
* qx
|
||||
* 2025/11/5
|
||||
*/
|
||||
public class GiftWallConacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void setGiftWall(GiftUserWallBean data);
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
|
||||
void giftWall(String userId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.example.modulevocal.activity.ui.main;
|
||||
|
||||
import android.content.Context;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* com.example.modulevocal.activity.ui.main
|
||||
* qx
|
||||
* 2025/11/5
|
||||
*/
|
||||
public class GiftWallPresenter extends BasePresenter<GiftWallConacts.View> implements GiftWallConacts.IMePre{
|
||||
public GiftWallPresenter(GiftWallConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giftWall(String userId) {
|
||||
api.giftWall(userId, new BaseObserver<GiftUserWallBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(GiftUserWallBean giftBeans) {
|
||||
MvpRef.get().setGiftWall(giftBeans);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.example.modulevocal.activity.ui.main;
|
||||
|
||||
import static androidx.lifecycle.Transformations.map;
|
||||
|
||||
import androidx.arch.core.util.Function;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PageViewModel extends ViewModel {
|
||||
|
||||
private MutableLiveData<Integer> mIndex = new MutableLiveData<>();
|
||||
private LiveData<String> mText = map(mIndex, input -> "Hello world from section: " + input);
|
||||
private MutableLiveData<List<GiftUserWallBean.GiftWallBean>> mLiangDataList = new MutableLiveData<>();
|
||||
private MutableLiveData<List<GiftUserWallBean.GiftWallBean>> mNoLiangDataList = new MutableLiveData<>();
|
||||
|
||||
// 根据索引返回不同的数据集合
|
||||
private LiveData<List<GiftUserWallBean.GiftWallBean>> mDataList = map(mIndex, input -> {
|
||||
if (input == 1) {
|
||||
return mLiangDataList.getValue();
|
||||
} else if (input == 2) {
|
||||
return mNoLiangDataList.getValue();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
public void setIndex(int index) {
|
||||
mIndex.setValue(index);
|
||||
}
|
||||
|
||||
public LiveData<String> getText() {
|
||||
return mText;
|
||||
}
|
||||
|
||||
// 获取根据索引动态变化的数据集合
|
||||
public LiveData<List<GiftUserWallBean.GiftWallBean>> getDataList() {
|
||||
return mDataList;
|
||||
}
|
||||
|
||||
// 设置liang数据集合
|
||||
public void setLiangDataList(List<GiftUserWallBean.GiftWallBean> dataList) {
|
||||
for (GiftUserWallBean.GiftWallBean bean : dataList) {
|
||||
bean.set_liang(true);
|
||||
}
|
||||
mLiangDataList.setValue(dataList);
|
||||
}
|
||||
|
||||
// 设置no_liang数据集合
|
||||
public void setNoLiangDataList(List<GiftUserWallBean.GiftWallBean> dataList) {
|
||||
for (GiftUserWallBean.GiftWallBean bean : dataList) {
|
||||
bean.set_liang(false);
|
||||
}
|
||||
mNoLiangDataList.setValue(dataList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.example.modulevocal.activity.ui.main;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.GridView;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import com.example.modulevocal.databinding.FragmentGiftWallBinding;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A placeholder fragment containing a simple view.
|
||||
*/
|
||||
public class PlaceholderFragment extends Fragment {
|
||||
|
||||
private static final String ARG_SECTION_NUMBER = "section_number";
|
||||
|
||||
private PageViewModel pageViewModel;
|
||||
private FragmentGiftWallBinding binding;
|
||||
|
||||
private GiftWallAdapter mGiftWallAdapter;
|
||||
|
||||
public static PlaceholderFragment newInstance(int index) {
|
||||
PlaceholderFragment fragment = new PlaceholderFragment();
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putInt(ARG_SECTION_NUMBER, index);
|
||||
// fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
pageViewModel = new ViewModelProvider(this).get(PageViewModel.class);
|
||||
int index = 1;
|
||||
if (getArguments() != null) {
|
||||
index = getArguments().getInt(ARG_SECTION_NUMBER);
|
||||
|
||||
// 获取传递的礼物列表数据
|
||||
List<GiftUserWallBean.GiftWallBean> giftList =
|
||||
(List<GiftUserWallBean.GiftWallBean>) getArguments().getSerializable("gift_list");
|
||||
|
||||
// 将数据设置到 ViewModel
|
||||
if (giftList != null) {
|
||||
if (index == 1){
|
||||
pageViewModel.setLiangDataList(giftList);
|
||||
}else if (index == 2){
|
||||
pageViewModel.setNoLiangDataList(giftList);
|
||||
}
|
||||
}
|
||||
}
|
||||
pageViewModel.setIndex(index);
|
||||
|
||||
mGiftWallAdapter= new GiftWallAdapter(new ArrayList<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(
|
||||
@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
binding = FragmentGiftWallBinding.inflate(inflater, container, false);
|
||||
View root = binding.getRoot();
|
||||
// 设置 GridView
|
||||
GridView gridView = binding.gridView;
|
||||
gridView.setAdapter(mGiftWallAdapter);
|
||||
// 观察数据变化并更新 GridView
|
||||
pageViewModel.getDataList().observe(getViewLifecycleOwner(), dataList -> {
|
||||
if (dataList != null) {
|
||||
mGiftWallAdapter.updateData(dataList);
|
||||
}
|
||||
});
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.example.modulevocal.activity.ui.main;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.fragment.app.*;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* A [FragmentPagerAdapter] that returns a fragment corresponding to
|
||||
* one of the sections/tabs/pages.
|
||||
*/
|
||||
public class SectionsPagerAdapter extends FragmentStateAdapter {
|
||||
|
||||
@StringRes
|
||||
private static final int[] TAB_TITLES = new int[]{com.xscm.moduleutil.R.string.tab_text_1, com.xscm.moduleutil.R.string.tab_text_2};
|
||||
private final Context mContext;
|
||||
private GiftUserWallBean giftData; // 添加数据字段
|
||||
|
||||
// public SectionsPagerAdapter(Context context, FragmentManager fm, GiftUserWallBean giftData) {
|
||||
// super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
|
||||
// this.mContext = context;
|
||||
// this.giftData = giftData;
|
||||
// }
|
||||
|
||||
public SectionsPagerAdapter(@NonNull FragmentActivity fragmentActivity, GiftUserWallBean giftData) {
|
||||
super(fragmentActivity);
|
||||
this.mContext = fragmentActivity;
|
||||
this.giftData = giftData;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
// 创建 Fragment 实例并传递参数
|
||||
PlaceholderFragment fragment = PlaceholderFragment.newInstance(position + 1);
|
||||
Bundle args = new Bundle();
|
||||
|
||||
// 根据位置传递不同的数据
|
||||
if (giftData != null) {
|
||||
if (position == 0) {
|
||||
// 传递 liang 数据
|
||||
args.putSerializable("gift_list", (Serializable) giftData.getLiang());
|
||||
} else if (position == 1) {
|
||||
// 传递 no_liang 数据
|
||||
args.putSerializable("gift_list", (Serializable) giftData.getNo_liang());
|
||||
}
|
||||
}
|
||||
args.putInt("section_number", position+1);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 2; // 假设 GiftUserWallBean 包含 list 数据结构
|
||||
}
|
||||
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return mContext.getResources().getString(TAB_TITLES[position]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class BlackAdapter extends BaseQuickAdapter<BlackUserBean, BaseViewHolder
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, BlackUserBean item) {
|
||||
MeHeadView headView = helper.getView(R.id.im_user);
|
||||
headView.setData(item.getAvatar(), "", item.getSex() + "");
|
||||
headView.setData(item.getAvatar(), "", "");
|
||||
helper.setText(R.id.tv_nick_name, item.getNickname());
|
||||
TextView imageView= helper.getView(R.id.im_g);
|
||||
helper.setText(R.id.tv_oline, item.getIs_online() == 1 ? "[在线]" : "[离线]");
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.example.modulevocal.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.activity.ui.main.GiftWallAdapter;
|
||||
import com.xscm.moduleutil.bean.CombinedGiftBean;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
import com.xscm.moduleutil.bean.NobilitList;
|
||||
import com.xscm.moduleutil.utils.ImageLoader;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.widget.CircularImage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* com.example.modulevocal.adapter
|
||||
* qx
|
||||
* 2025/11/10
|
||||
*/
|
||||
public class GridNobleAdapter extends BaseAdapter {
|
||||
private List<NobilitList.Power.PowerItem> mDataList;
|
||||
|
||||
public GridNobleAdapter(List<NobilitList.Power.PowerItem> dataList) {
|
||||
this.mDataList = dataList;
|
||||
}
|
||||
|
||||
public GridNobleAdapter() {
|
||||
|
||||
}
|
||||
|
||||
public void updateData(List<NobilitList.Power.PowerItem> newDataList) {
|
||||
this.mDataList = newDataList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mDataList != null ? mDataList.size() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return mDataList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
// 实现 GridView item 的布局和数据绑定
|
||||
// 这里返回每个 GridView 项的视图
|
||||
ViewHolder holder;
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.item_noble_tq, parent, false);
|
||||
holder = new ViewHolder();
|
||||
holder.tv_hz_mc = convertView.findViewById(R.id.tv_hz_mc);
|
||||
holder.ci_image = convertView.findViewById(R.id.ci_image);
|
||||
holder.tv_hz_detail = convertView.findViewById(R.id.tv_hz_detail);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
NobilitList.Power.PowerItem item = mDataList.get(position);
|
||||
holder.tv_hz_detail.setText(item.getContent());
|
||||
holder.tv_hz_mc.setText(item.getName());
|
||||
ImageUtils.loadHeadCC(item.getImage(), holder.ci_image);
|
||||
|
||||
|
||||
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
static class ViewHolder {
|
||||
TextView tv_hz_mc;
|
||||
CircularImage ci_image;
|
||||
|
||||
TextView tv_hz_detail;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.example.modulevocal.adapter;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevocal.R;
|
||||
import com.xscm.moduleutil.bean.NobilityPrice;
|
||||
|
||||
/**
|
||||
* com.example.modulevocal.adapter
|
||||
* qx
|
||||
* 2025/11/10
|
||||
*/
|
||||
// NoblePrivilegeAdapter.java
|
||||
public class NoblePrivilegeAdapter extends BaseQuickAdapter<NobilityPrice.PowerItem, BaseViewHolder> {
|
||||
|
||||
public NoblePrivilegeAdapter() {
|
||||
super(R.layout.item_noble_privilege);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, NobilityPrice.PowerItem item) {
|
||||
helper.setText(R.id.tv_title, item.getContent());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.example.modulevocal.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import com.example.modulevocal.R;
|
||||
import com.xscm.moduleutil.bean.NobilitList;
|
||||
import com.xscm.moduleutil.bean.TopRoom;
|
||||
import com.xscm.moduleutil.utils.ImageLoader;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.zhpan.bannerview.BaseBannerAdapter;
|
||||
import com.zhpan.bannerview.BaseViewHolder;
|
||||
|
||||
/**
|
||||
*com.example.modulevocal.adapter
|
||||
*qx
|
||||
*2025/11/10
|
||||
*
|
||||
*/
|
||||
public class NobliityBannerAdapter extends BaseBannerAdapter<NobilitList> {
|
||||
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
private int mCurrentPosition;
|
||||
|
||||
public int getmCurrentPosition() {
|
||||
return mCurrentPosition;
|
||||
}
|
||||
|
||||
public void setmCurrentPosition(int mCurrentPosition) {
|
||||
this.mCurrentPosition = mCurrentPosition;
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
this.onItemClickListener = listener;
|
||||
}
|
||||
@Override
|
||||
protected void bindData(BaseViewHolder<NobilitList> holder, NobilitList data, int position, int pageSize) {
|
||||
if (position>=mCurrentPosition) {
|
||||
ImageUtils.loadHeadCC(data.getImage(), holder.itemView.findViewById(R.id.iv_follow_bg));
|
||||
// ImageLoader.loadImage(holder.itemView.getContext(),holder.itemView.findViewById(R.id.iv_follow_bg),data.getImage(),1f);
|
||||
}else {
|
||||
ImageLoader.loadImage(holder.itemView.getContext(),holder.itemView.findViewById(R.id.iv_follow_bg),data.getImage(),0f);
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(View view, TopRoom data, int position);
|
||||
}
|
||||
@Override
|
||||
public int getLayoutId(int viewType) {
|
||||
return R.layout.index_item_nobli;
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class UserGiftWallAdapter extends BaseQuickAdapter<CombinedGiftBean, Base
|
||||
protected void convert(BaseViewHolder helper, CombinedGiftBean item) {
|
||||
helper.setText(R.id.tv_gift_name, item.getGift_name());
|
||||
helper.setText(R.id.tv_gift_price, item.getGift_price());
|
||||
ImageLoader.loadImage(mContext, helper.getView(R.id.iv_gift_pic), item.getBase_image());
|
||||
|
||||
TextView tv_number = helper.getView(R.id.tv_number);
|
||||
if (item.is_liang()) {
|
||||
// helper.getView(R.id.cl_iv_down_on).setBackgroundColor(Color.parseColor("#E6E6E6"));
|
||||
@@ -41,7 +41,7 @@ public class UserGiftWallAdapter extends BaseQuickAdapter<CombinedGiftBean, Base
|
||||
helper.setVisible(R.id.tv_number, true);
|
||||
// helper.setVisible(R.id.riv_user_head, true);
|
||||
helper.setVisible(R.id.iv_gift_pic_overlay, false);
|
||||
|
||||
ImageLoader.loadImage(mContext, helper.getView(R.id.iv_gift_pic), item.getBase_image());
|
||||
// 显示送礼物的用户列表
|
||||
RecyclerView recyclerView = helper.getView(R.id.rv_gift_user_list);
|
||||
// recyclerView.setLayoutManager(new GridLayoutManager(mContext,2,LinearLayoutManager.HORIZONTAL,false));
|
||||
@@ -71,10 +71,11 @@ public class UserGiftWallAdapter extends BaseQuickAdapter<CombinedGiftBean, Base
|
||||
// 未点亮的礼物只显示图片、名称和金额,不高亮
|
||||
helper.setVisible(R.id.tv_number, false);
|
||||
// helper.setVisible(R.id.riv_user_head, false);
|
||||
helper.setVisible(R.id.iv_gift_pic_overlay, true);
|
||||
helper.setVisible(R.id.iv_gift_pic_overlay, false);
|
||||
// 隐藏送礼物的用户列表
|
||||
helper.setVisible(R.id.rv_gift_user_list, false);
|
||||
helper.getView(R.id.iv_gift_pic).setAlpha(0.2f);
|
||||
// helper.getView(R.id.iv_gift_pic).setAlpha(0.2f);
|
||||
ImageLoader.loadImage(mContext, helper.getView(R.id.iv_gift_pic), item.getBase_image(),0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@ import android.app.Activity;
|
||||
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.BannerModel;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public final class MeConacts {
|
||||
@@ -16,9 +20,9 @@ public final class MeConacts {
|
||||
|
||||
void hideSkill(boolean hideSkill);
|
||||
|
||||
// void isFirstRecharge(EntranceCheckBean entranceCheckBean);
|
||||
void wallet(WalletBean walletBean);
|
||||
|
||||
// void setMemberList(GuardMemberBean guardMemberBean);
|
||||
void setBanners(List<BannerModel> bannerModels);
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
@@ -33,6 +37,8 @@ public final class MeConacts {
|
||||
void entranceCheckFirstRecharge();
|
||||
|
||||
void getMemberList(String userId, int page);
|
||||
|
||||
void wallet();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.example.modulevocal.conacts;
|
||||
|
||||
import android.app.Activity;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* com.example.modulevocal.conacts
|
||||
* qx
|
||||
* 2025/11/8
|
||||
*/
|
||||
public class NobleTitleConacts {
|
||||
|
||||
public interface View extends IView<Activity> {
|
||||
void getNobilityDetail(NobilitDeatils nobilitDeatils);
|
||||
|
||||
void getNobilityList(List<NobilitList> nobilitLists);
|
||||
|
||||
void bindType(BindType bindType);
|
||||
|
||||
void appPay(AppPay appPay);
|
||||
|
||||
void getNobilityPrice(NobilityPrice nobilityPrice);
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
void getNobilityDetail();
|
||||
|
||||
void getNobilityList();
|
||||
|
||||
void bindType(String userId);
|
||||
|
||||
void appPay(String user_id, String money, String type, String type_id);
|
||||
|
||||
void getNobilityPrice(String id);
|
||||
}
|
||||
}
|
||||
@@ -15,5 +15,7 @@ public class SettingConacts {
|
||||
void clearLoginInfo();
|
||||
|
||||
void cancel();
|
||||
|
||||
void getModifyHideStatus(String hide_status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,11 +116,21 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
} else {
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
}
|
||||
mBinding.headerInfo.rivUserHead.setData(userInfo.getAvatar(), "", userInfo.getSex() + "");
|
||||
mBinding.headerInfo.rivUserHead.setData(userInfo.getAvatar(), "", userInfo.getNobility_image());
|
||||
String sex = userInfo.getSex()==1?"男":"女";
|
||||
mBinding.headerInfo.tvUserId.setText(sex+" | ID:"+userInfo.getUser_code());
|
||||
mBinding.headerInfo.tvNickName.setText(userInfo.getNickname());
|
||||
mBinding.headerInfo.tvUserId.setText(userInfo.getUser_code());
|
||||
mBinding.headerInfo.tvNickName.setTextColor( (userInfo.getNickname_color()!=null && !userInfo.getNickname_color().equals(""))?Color.parseColor(userInfo.getNickname_color()):Color.parseColor("#333333"));
|
||||
// mBinding.headerInfo.tvUserId.setText(userInfo.getUser_code());
|
||||
mBinding.headerInfo.tvAge.setText(userInfo.getAge() + "岁");
|
||||
mBinding.headerInfo.tvJj.setText(userInfo.getProfile());
|
||||
|
||||
if (userInfo.getIs_use_code()==1){
|
||||
mBinding.headerInfo.imBeautiful.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
mBinding.headerInfo.imBeautiful.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
LinearLayout llContainer = mBinding.headerInfo.llImageContainer;
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -20,22 +21,20 @@ import android.widget.Toast;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.activity.BlacklistActivity;
|
||||
import com.example.modulevocal.activity.DailyTasksActivity;
|
||||
import com.example.modulevocal.activity.EditUserInfoActivity;
|
||||
import com.example.modulevocal.activity.MyBagActivity;
|
||||
import com.example.modulevocal.activity.MyMoneyActivity;
|
||||
import com.example.modulevocal.activity.MyRoomActivity;
|
||||
import com.example.modulevocal.activity.PersonalityActivity;
|
||||
import com.example.modulevocal.activity.SettingActivity;
|
||||
import com.example.modulevocal.activity.UserHomepageActivity;
|
||||
import com.example.modulevocal.activity.*;
|
||||
import com.example.modulevocal.conacts.MeConacts;
|
||||
import com.example.modulevocal.databinding.FragmentVocalRangeBinding;
|
||||
import com.example.modulevocal.presenter.MePresenter;
|
||||
import com.stx.xhb.xbanner.XBanner;
|
||||
import com.tencent.mm.opensdk.modelbiz.WXOpenCustomerServiceChat;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.BannerModel;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
|
||||
@@ -94,18 +93,51 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
// mBinding.meMyCustom.setOnClickListener(this::onClick);
|
||||
// mBinding.meMyHelp.setOnClickListener(this::onClick);
|
||||
mBinding.ivSz.setOnClickListener(this::onClick);
|
||||
mBinding.beautifulViewCopy.setOnClickListener(this::onClick);
|
||||
mBinding.tvCopy.setOnClickListener(this::onClick);
|
||||
// mBinding.meMyShare.setOnClickListener(this::onClick);
|
||||
mBinding.tvHome.setOnClickListener(this::onClick);
|
||||
mBinding.meDressUp.setOnClickListener(this::onClick);
|
||||
mBinding.tvMyWallet.setOnClickListener(this::onClick);
|
||||
mBinding.meDaily.setOnClickListener(this::onClick);
|
||||
mBinding.meMyGuild.setOnClickListener(this::onClick);
|
||||
mBinding.tvMyShopping.setOnClickListener(this::onClick);
|
||||
mBinding.llMeGuild.setOnClickListener(this::onClick);
|
||||
mBinding.llMyShopping.setOnClickListener(this::onClick);
|
||||
mBinding.imMyRoom.setOnClickListener(this::onClick);
|
||||
mBinding.meMyDan.setOnClickListener(this::onClick);
|
||||
mBinding.ivHb.setOnClickListener(this::onClick);
|
||||
mBinding.ivKf.setOnClickListener(this::onClick);
|
||||
mBinding.ivFk.setOnClickListener(this::onClick);
|
||||
mBinding.llRecharge.setOnClickListener(this::onClick);
|
||||
mBinding.llMeIncome.setOnClickListener(this::onClick);
|
||||
mBinding.llMeHelp.setOnClickListener(this::onClick);
|
||||
mBinding.llGiftWall.setOnClickListener(this::onClick);
|
||||
mBinding.clNobleTitle.setOnClickListener(this::onClick);
|
||||
|
||||
mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
|
||||
@Override
|
||||
public void loadBanner(XBanner banner, Object model, View view, int position) {
|
||||
BannerModel bannerModel = (BannerModel) model;
|
||||
ImageUtils.loadCenterCrop((String) bannerModel.getXBannerUrl(), (ImageView) view);
|
||||
}
|
||||
});
|
||||
mBinding.banner.setOnItemClickListener(new XBanner.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(XBanner banner, Object model, View view, int position) {
|
||||
// if (ProxyChecker.isProxySet(context)) {
|
||||
// ToastUtils.show("使用代理禁止访问");
|
||||
// return;
|
||||
// }
|
||||
/**
|
||||
* 1房间2文章3链接 其他详情图
|
||||
*
|
||||
* type=1时,该值表示房间id;type=2时,表示文章id
|
||||
*/
|
||||
BannerModel bannerModel = (BannerModel) model;
|
||||
Intent intent=new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", bannerModel.getUrl());
|
||||
intent.putExtra("title", "防骗指南");
|
||||
startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", bannerModel.getUrl()).withString("title", "首页横幅").navigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +145,8 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
MvpPre.getMyInfo();
|
||||
MvpPre.wallet();
|
||||
MvpPre.getBanners("6");
|
||||
// MvpPre.getMemberList(SpUtils.getUserId(), 1);
|
||||
}
|
||||
|
||||
@@ -130,12 +164,12 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
Intent intent=new Intent(getContext(), BlacklistActivity.class);
|
||||
intent.putExtra("type",0);
|
||||
startActivity(intent);
|
||||
}else if (id==R.id.me_my_guild){
|
||||
}else if (id==R.id.ll_me_guild){
|
||||
Intent intent=new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+"/web/index.html#/pages/union/index?id="+SpUtil.getToken());
|
||||
intent.putExtra("title", "公会");
|
||||
startActivity(intent);
|
||||
}else if (id==R.id.tv_my_shopping){
|
||||
}else if (id==R.id.ll_my_shopping){
|
||||
Intent intent=new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+"/web/index.html#/pages/prop/propMall?id="+SpUtil.getToken());
|
||||
intent.putExtra("title", "道具商城");
|
||||
@@ -185,13 +219,18 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
startActivity(new Intent(getContext(), DailyTasksActivity.class));
|
||||
}
|
||||
else if (id == R.id.iv_sz) {//设置
|
||||
startActivity(new Intent(getContext(), SettingActivity.class));
|
||||
// startActivity(new Intent(getContext(), SettingActivity.class));
|
||||
Intent intent = new Intent(getContext(), SettingActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userInfo", userInfo);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
}else if (id == R.id.me_my_dan){//等级
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+"/web/index.html#/pages/other/grade?id=" + SpUtil.getToken());
|
||||
intent.putExtra("title", "等级");
|
||||
startActivity(intent);
|
||||
}else if (id == R.id.iv_kf){//反馈
|
||||
}else if (id == R.id.iv_fk || id == R.id.ll_me_help){//反馈/帮助中心
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+"/web/index.html#/pages/feedback/help?id=" + SpUtil.getToken());
|
||||
// intent.putExtra("url", "http://192.168.110.17:8080/web/index.html#/pages/feedback/help?id=" + SpUtil.getToken());
|
||||
@@ -202,8 +241,23 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+"/web/index.html#/pages/other/income?id=" + SpUtil.getToken());
|
||||
intent.putExtra("title", "邀请");
|
||||
startActivity(intent);
|
||||
}else if (id==R.id.beautiful_view_copy){
|
||||
}else if (id==R.id.tv_copy){
|
||||
copyComment(mBinding.beautifulView.getText().toString());
|
||||
}else if (id==R.id.ll_recharge){//充值
|
||||
startActivity(new Intent(getActivity(), RechargeActivity.class));
|
||||
}else if (id==R.id.ll_me_income){
|
||||
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(); // 填移动应用(App)的 AppId
|
||||
IWXAPI api = WXAPIFactory.createWXAPI(getContext(), appId);
|
||||
|
||||
// 判断当前版本是否支持拉起客服会话
|
||||
WXOpenCustomerServiceChat.Req req = new WXOpenCustomerServiceChat.Req();
|
||||
req.corpId = "ww1de4300858c0b461"; // 企业ID
|
||||
req.url = "https://work.weixin.qq.com/kfid/kfcb3d23a59c188a0e7"; // 客服URL
|
||||
api.sendReq(req);
|
||||
}else if (id==R.id.ll_gift_wall){//我的页面的礼物墙
|
||||
startActivity(new Intent(getContext(), GiftWallActivity.class));
|
||||
}else if (id==R.id.cl_noble_title){//爵位展示页面
|
||||
startActivity(new Intent(getContext(), NobleTitleActivity.class));
|
||||
}
|
||||
}
|
||||
private void copyComment(String content) {
|
||||
@@ -249,12 +303,19 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
public void myInfoSuccess(UserInfo data) {
|
||||
SpUtil.saveUserInfo(data);
|
||||
this.userInfo = data;
|
||||
mBinding.rivUserHead.setData(data.getAvatar(), data.getDress(), String.valueOf(data.getSex()));
|
||||
mBinding.rivUserHead.setData(data.getAvatar(), data.getDress(),data.getNobility_image());
|
||||
mBinding.tvNickName.setText(data.getNickname());
|
||||
mBinding.beautifulView.setText("ID:"+data.getUser_code());
|
||||
mBinding.tvNickName.setTextColor( (data.getNickname_color()!=null&& !data.getNickname_color().equals(""))?Color.parseColor(data.getNickname_color()): Color.parseColor("#ffffff"));
|
||||
String sex = data.getSex()==1?"男":"女";
|
||||
mBinding.beautifulView.setText(sex+" | ID:"+data.getUser_code());
|
||||
mBinding.tvFollow.setText(data.getFollow_num()+"");
|
||||
mBinding.tvFans.setText(data.getFans_num()+"");
|
||||
mBinding.tvFriends.setText(data.getLook_me_num()+"");
|
||||
if (data.getIs_use_code()==1){
|
||||
mBinding.imBeautiful.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
mBinding.imBeautiful.setVisibility(View.GONE);
|
||||
}
|
||||
if (data.getAuth()==1){
|
||||
SpUtil.setRealName(true);
|
||||
}else {
|
||||
@@ -303,6 +364,16 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wallet(WalletBean walletBean) {
|
||||
mBinding.tvIcon.setText(walletBean.getCoin());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBanners(List<BannerModel> bannerModels) {
|
||||
mBinding.banner.setBannerData(com.xscm.moduleutil.R.layout.index_image_banner, bannerModels);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首充有礼显示
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.example.modulevocal.fragment.zhuangb;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static com.xscm.moduleutil.utils.ImageLoader.loadImage;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
@@ -12,13 +12,16 @@ import com.xscm.moduleutil.utils.cos.CosUploadManager;
|
||||
import com.xscm.moduleutil.utils.oss.OSSOperUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class EditUserPresenter extends BasePresenter<EditUserConactos.View> implements EditUserConactos.IMePre {
|
||||
EditUserConactos.View mView;
|
||||
public EditUserPresenter(EditUserConactos.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,6 +88,9 @@ public class EditUserPresenter extends BasePresenter<EditUserConactos.View> impl
|
||||
|
||||
@Override
|
||||
public void onNext(UserInfo userInfo) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getUserHomeSuccess(userInfo);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -3,16 +3,22 @@ package com.example.modulevocal.presenter;
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulevocal.conacts.MeConacts;
|
||||
import com.xscm.moduleutil.bean.BannerModel;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class MePresenter extends BasePresenter<MeConacts.View> implements MeConacts.IMePre {
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
public class MePresenter extends BasePresenter<MeConacts.View> implements MeConacts.IMePre {
|
||||
MeConacts.View mView;
|
||||
public MePresenter(MeConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -164,28 +170,39 @@ public class MePresenter extends BasePresenter<MeConacts.View> implements MeCona
|
||||
}
|
||||
|
||||
|
||||
public void getConfig() {
|
||||
// api.appUpdate(new com.qpyy.libcommon.http.BaseObserver<AppUpdateModel>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(AppUpdateModel appUpdateModel) {
|
||||
// String channelId = "default";
|
||||
// try {
|
||||
// channelId = MetaDataUtils.getMetaDataInApp("TD_CHANNEL_ID");
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// MvpRef.get().hideSkill(appUpdateModel != null && appUpdateModel.getChannels() != null && appUpdateModel.getChannels().contains(channelId));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
@Override
|
||||
public void wallet() {
|
||||
api.wallet(new BaseObserver<WalletBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(WalletBean walletBean) {
|
||||
MvpRef.get().wallet(walletBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getBanners(String s) {
|
||||
// Type listType = new TypeToken<List<BannerModel>>() {}.getType();
|
||||
// List<BannerModel> restoredRoomModels = GsonUtils.getGSON().fromJson(SpUtils.getHomeBanner(), listType);
|
||||
// MvpRef.get().setBanners(restoredRoomModels);
|
||||
api.getBanners(s,new BaseObserver<List<BannerModel>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<BannerModel> bannerModels) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setBanners(bannerModels);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.example.modulevocal.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
import com.example.modulevocal.conacts.MeConacts;
|
||||
import com.example.modulevocal.conacts.NobleTitleConacts;
|
||||
import com.xscm.moduleutil.bean.*;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* com.example.modulevocal.presenter
|
||||
* qx
|
||||
* 2025/11/8
|
||||
*/
|
||||
public class NobleTitlePresenter extends BasePresenter<NobleTitleConacts.View> implements NobleTitleConacts.IMePre{
|
||||
private NobleTitleConacts.View mView;
|
||||
public NobleTitlePresenter(NobleTitleConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityDetail() {
|
||||
api.getNobilityDetail(new BaseObserver<NobilitDeatils>() {
|
||||
@Override
|
||||
public void onSubscribe(@NotNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull NobilitDeatils nobilitDeatils) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getNobilityDetail(nobilitDeatils);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityList() {
|
||||
api.getNobilityList(new BaseObserver<List<NobilitList>>(){
|
||||
|
||||
@Override
|
||||
public void onSubscribe(@NotNull Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull List<NobilitList> nobilitLists) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getNobilityList(nobilitLists);
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void bindType(String userId) {
|
||||
api.bindType(userId, new BaseObserver<BindType>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BindType bindType) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().bindType(bindType);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appPay(String user_id, String money, String type, String nobility_id) {
|
||||
api.appPay(user_id, money, "", type,"","",nobility_id, new BaseObserver<AppPay>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(AppPay appPay) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().appPay(appPay);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNobilityPrice(String id) {
|
||||
api.getNobilityPrice(id, new BaseObserver<NobilityPrice>() {
|
||||
@Override
|
||||
public void onSubscribe(@NotNull Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull NobilityPrice nobilityPrice) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getNobilityPrice(nobilityPrice);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class RechargePresenter extends BasePresenter<RechargeConactos.View> impl
|
||||
|
||||
@Override
|
||||
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id) {
|
||||
api.appPay(user_id, money, coin, type,type_params,type_id, new BaseObserver<AppPay>() {
|
||||
api.appPay(user_id, money, coin, type,type_params,type_id,"", new BaseObserver<AppPay>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
|
||||
@@ -13,8 +13,10 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class SettingPresenter extends BasePresenter<SettingConacts.View> implements SettingConacts.IMePre {
|
||||
private SettingConacts.View mView;
|
||||
public SettingPresenter(SettingConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -27,6 +29,9 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().clearLoginInfo(s);
|
||||
}
|
||||
});
|
||||
@@ -43,9 +48,27 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().cancel(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getModifyHideStatus(String hide_status) {
|
||||
api.getModifyHideStatus(hide_status, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(@NotNull Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull String s) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
9
modulevocal/src/main/res/drawable/noble_card_border.xml
Normal file
9
modulevocal/src/main/res/drawable/noble_card_border.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#F5E9D1" />
|
||||
<corners android:radius="@dimen/dp_12" />
|
||||
<solid android:color="#1E2127" />
|
||||
</shape>
|
||||
@@ -2,7 +2,7 @@
|
||||
<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"
|
||||
tools:context=".activity.ChangePasswordActivity">
|
||||
>
|
||||
|
||||
<data>
|
||||
|
||||
|
||||
47
modulevocal/src/main/res/layout/activity_gift_wall.xml
Normal file
47
modulevocal/src/main/res/layout/activity_gift_wall.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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"
|
||||
tools:context=".activity.GiftWallActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ranking_bj">
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextColor="@color/colorWhite65"
|
||||
app:tabIndicator="@drawable/tab_indicator_bottom"
|
||||
app:tabIndicatorColor="@color/transparent"
|
||||
app:tabMode="fixed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"/>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tabs"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
203
modulevocal/src/main/res/layout/activity_noble_details.xml
Normal file
203
modulevocal/src/main/res/layout/activity_noble_details.xml
Normal file
@@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main"
|
||||
tools:context=".activity.NobleDetailsActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/noble_details_bj"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/ic_topbar_back_dark"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_noble_title"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_intent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/icon_noble_gz"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_noble_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
tools:text="骑士"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:textSize="@dimen/dp_34"/>
|
||||
|
||||
|
||||
<com.zhpan.bannerview.BannerViewPager
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_noble_lv"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_noble_tq"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/banner"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@mipmap/noble_details_tq"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tq"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_16"
|
||||
tools:text="专属特权"
|
||||
android:textColor="#FFEDBD"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_noble_tq"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_noble_tq"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_noble_tq"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_noble_tq"/>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_tq"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toTopOf="@+id/im_kt">
|
||||
|
||||
<com.xscm.moduleutil.widget.MyGridView
|
||||
android:id="@+id/gridView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/item_noble_tq"
|
||||
android:horizontalSpacing="8dp"
|
||||
android:verticalSpacing="8dp"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_8"
|
||||
android:clipToPadding="false"
|
||||
android:numColumns="3"/>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<!-- <GridView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tv_tq"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/im_kt"-->
|
||||
<!-- tools:listitem="@layout/item_noble_tq"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_5"-->
|
||||
<!-- android:horizontalSpacing="8dp"-->
|
||||
<!-- android:verticalSpacing="8dp"-->
|
||||
<!-- android:paddingStart="@dimen/dp_15"-->
|
||||
<!-- android:paddingEnd="@dimen/dp_15"-->
|
||||
<!-- android:paddingBottom="@dimen/dp_8"-->
|
||||
<!-- android:clipToPadding="false"-->
|
||||
<!-- android:id="@+id/gridView"-->
|
||||
<!-- android:numColumns="3"-->
|
||||
|
||||
<!-- />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_kt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:src="@mipmap/noble_kt"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_lv_tis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_16"
|
||||
tools:text="骑士开通"
|
||||
android:textColor="#F7EAC9"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_kt"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_kt"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_kt"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_noble_mob"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_16"
|
||||
tools:text="¥30/月"
|
||||
android:textColor="#F7EAC9"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_lv_tis"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_lv_tis"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_lv_tis"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_ljkt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/noble_ljkt"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_kt"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_kt"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
392
modulevocal/src/main/res/layout/activity_noble_payment.xml
Normal file
392
modulevocal/src/main/res/layout/activity_noble_payment.xml
Normal file
@@ -0,0 +1,392 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main"
|
||||
tools:context=".activity.NoblePaymentActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/noble_zf_bj">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/ic_topbar_back_dark"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="支付页面"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_16"
|
||||
/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_intent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/icon_noble_gz"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_153"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r8_f8f6c7_fffff"
|
||||
tools:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
tools:text="骑士"
|
||||
android:gravity="center"
|
||||
android:fontFamily="@font/youshebiaotihei"
|
||||
android:textSize="@dimen/sp_34"
|
||||
android:textColor="@color/color_FF333333"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_22"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="有效期:30天"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="#a6000000"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_lv"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_lv"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sj_jg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="¥ 99.00"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#FF2727"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_hx_jg"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hx_jg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="¥ 99.00"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="#999999"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_noble"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_104"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cl"
|
||||
tools:src="@mipmap/me_noble_image"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginEnd="@dimen/dp_34"
|
||||
tools:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/t_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl"
|
||||
android:text="@string/payment_method"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<!-- 第二个RecyclerView -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layout_constraintTop_toBottomOf="@+id/t_2"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_payment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_38"
|
||||
android:layout_marginRight="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="立即支付"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycle_view1"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_agreement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_payment"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
tools:visibility="gone">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_privacy"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:background="@drawable/selector_login_agreement"
|
||||
android:button="@null"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="点击支付即表示您同意"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ysxy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="《爵位服务协议》"
|
||||
android:textColor="#3ABC6D"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_success"
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:src="@mipmap/noble_seccer"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_success"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_success"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_success"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_success"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:gravity="center"
|
||||
android:fontFamily="@font/jiaoyzit"
|
||||
android:text="支付成功"
|
||||
android:textColor="#333333"
|
||||
android:textSize="@dimen/sp_20"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sucess2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_success"
|
||||
android:gravity="center"
|
||||
tools:text="恭喜您已成功开通骑士爵位"
|
||||
android:textColor="#a6000000"
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_noble2"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_104"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_sucess2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:src="@mipmap/me_noble_image"
|
||||
android:scaleType="fitCenter"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_noble2"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="骑士特权"
|
||||
android:textColor="#d9000000"
|
||||
android:textSize="@dimen/sp_16"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_130"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_3"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:nestedScrollingEnabled="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/dp_120"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycle_view3"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:paddingVertical="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
android:background="@drawable/bg_r6_000ff"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:backgroundTint="#E6FFEB"
|
||||
android:drawableLeft="@mipmap/noble_yxq"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
tools:text="有效期至2024年12月31日"
|
||||
android:textColor="#d9000000"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_payment2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_38"
|
||||
android:layout_marginRight="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="查看爵位中心"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:textColor="#FFFFFF"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_agreement"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_ts"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:nestedScrollingEnabled="false"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:drawableLeft="@mipmap/noble_cz_ts"
|
||||
android:text="升级说明"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:text="如果您当前已有爵位,升级时将自动计算剩余价值抵扣新爵位费用"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:visibility="gone"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
286
modulevocal/src/main/res/layout/activity_noble_title.xml
Normal file
286
modulevocal/src/main/res/layout/activity_noble_title.xml
Normal file
@@ -0,0 +1,286 @@
|
||||
<?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"
|
||||
tools:context=".activity.NobleTitleActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/noble_bj">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/ic_topbar_back_dark"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_noble_title"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_intent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/icon_noble_gz"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/ci_user_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
tools:src="@mipmap/ic_launcher_foreground"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
app:layout_constraintTop_toTopOf="@+id/ci_user_image"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ci_user_image"
|
||||
app:layout_constraintStart_toEndOf="@+id/ci_user_image"
|
||||
tools:text="用户名"
|
||||
android:textColor="#F5E9D1"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_user_name"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_user_name"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_user_name"
|
||||
tools:text="Lv.1"
|
||||
android:textColor="#F5E9D1"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_me_noble"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_94"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ci_user_image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@mipmap/me_noble_bj"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_me_noble_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_me_noble"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_me_noble"
|
||||
tools:text="Lv.1"
|
||||
android:fontFamily="@font/youshebiaotihei"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textSize="@dimen/sp_34"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_me_noble_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_me_noble"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_me_noble"
|
||||
android:scaleType="fitCenter"
|
||||
tools:src="@mipmap/me_noble_no"
|
||||
tools:visibility="gone"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_me_noble_xf"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_me_noble_lv"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_me_noble_lv"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_me_noble_lv"
|
||||
android:src="@mipmap/me_noble_xf"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_me_noble_status"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_me_noble"
|
||||
tools:text="未开通"
|
||||
android:textColor="#F5E9D1"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_noble_db"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_me_noble"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@mipmap/noble_duib"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_noble"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_104"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_me_noble"
|
||||
android:src="@mipmap/me_noble_image"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
/>
|
||||
|
||||
<!-- <androidx.cardview.widget.CardView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_0"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/im_noble_db"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_13"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_16"-->
|
||||
<!-- app:cardCornerRadius="@dimen/dp_12"-->
|
||||
<!-- app:cardElevation="@dimen/dp_1"-->
|
||||
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
||||
<!-- >-->
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/noble_card_border"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_noble_db"
|
||||
app:layout_constraintBottom_toTopOf="@+id/im_kt"
|
||||
>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/contentView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r6_2a2a4e"
|
||||
/>
|
||||
</FrameLayout>
|
||||
<!-- </androidx.cardview.widget.CardView>-->
|
||||
<ImageView
|
||||
android:id="@+id/im_kt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:src="@mipmap/me_sj"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/ci_image2"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_kt"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_kt"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_kt"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_me_x"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
app:layout_constraintStart_toEndOf="@+id/ci_image2"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_kt"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_kt"
|
||||
tools:text="夏沫..的当前爵位状态是骑"
|
||||
android:textColor="#F5E9D1"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:maxEms="12"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_sj"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:src="@mipmap/noble_sj"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_kt"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_kt"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@@ -112,6 +112,35 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_qhdz"
|
||||
style="@style/My_Info_Item_LL_Style"
|
||||
android:background="@drawable/bg_r15_white"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
>
|
||||
|
||||
<TextView
|
||||
style="@style/My_Info_Item_Title_Style"
|
||||
android:text="是否隐身" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:gravity="right"
|
||||
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_shb"
|
||||
style="@style/My_Info_Item_LL_Style"
|
||||
@@ -237,33 +266,6 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_qhdz"
|
||||
style="@style/My_Info_Item_LL_Style"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r15_white"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<TextView
|
||||
style="@style/My_Info_Item_Title_Style"
|
||||
android:text="@string/change_address" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:gravity="right"
|
||||
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_qhzh"
|
||||
|
||||
26
modulevocal/src/main/res/layout/fragment_gift_wall.xml
Normal file
26
modulevocal/src/main/res/layout/fragment_gift_wall.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.ui.main.PlaceholderFragment">
|
||||
|
||||
<GridView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:id="@+id/gridView"
|
||||
android:numColumns="3"
|
||||
android:horizontalSpacing="8dp"
|
||||
android:verticalSpacing="8dp"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
File diff suppressed because it is too large
Load Diff
45
modulevocal/src/main/res/layout/index_item_nobli.xml
Normal file
45
modulevocal/src/main/res/layout/index_item_nobli.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_room_name"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_18"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:textColor="#F1ECFF"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:text="标题" />-->
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/ll"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_220"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent">-->
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_follow_bg"
|
||||
android:layout_width="@dimen/dp_220"
|
||||
android:layout_height="@dimen/dp_220"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
96
modulevocal/src/main/res/layout/item_gift_wall.xml
Normal file
96
modulevocal/src/main/res/layout/item_gift_wall.xml
Normal file
@@ -0,0 +1,96 @@
|
||||
<?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">
|
||||
|
||||
<data></data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_gift_item"
|
||||
android:layout_width="@dimen/dp_106"
|
||||
android:layout_height="@dimen/dp_143"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:background="@mipmap/gift_wall_liang"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_7"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
tools:text="共计25个"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift_image"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:singleLine="true"
|
||||
android:text="甜蜜奶酪"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/iv_gift_image"
|
||||
app:layout_constraintRight_toRightOf="@+id/iv_gift_image"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_gift_image"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_price33"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:text="10000"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/tv_gift_name"
|
||||
app:layout_constraintRight_toRightOf="@+id/tv_gift_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_gift_name"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_gift_user_list"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_price33" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_values"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:layout_marginEnd="@dimen/dp_13"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/rv_gift_user_list"
|
||||
app:layout_constraintTop_toTopOf="@+id/rv_gift_user_list"
|
||||
tools:text="x100"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
22
modulevocal/src/main/res/layout/item_noble_privilege.xml
Normal file
22
modulevocal/src/main/res/layout/item_noble_privilege.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
android:paddingBottom="@dimen/dp_8">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:drawableLeft="@mipmap/icon_noble_d"
|
||||
android:textColor="#333333"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
46
modulevocal/src/main/res/layout/item_noble_tq.xml
Normal file
46
modulevocal/src/main/res/layout/item_noble_tq.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_109"
|
||||
android:layout_height="@dimen/dp_109"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/bg_r4_2a2925">
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/ci_image"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_hz_mc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ci_image"
|
||||
tools:text="专属徽章"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="#DABD9A"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hz_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:text="专属动态爵位徽章"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="#777775"
|
||||
android:layout_marginBottom="@dimen/dp_9"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -71,7 +71,8 @@
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:text="ID:"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_id"
|
||||
@@ -81,6 +82,16 @@
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="123131" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_beautiful"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_11"
|
||||
android:layout_marginLeft="5dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_copy"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_copy"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/beautiful"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
3
modulevocal/src/main/res/values-land/dimens.xml
Normal file
3
modulevocal/src/main/res/values-land/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">48dp</dimen>
|
||||
</resources>
|
||||
3
modulevocal/src/main/res/values-w1240dp/dimens.xml
Normal file
3
modulevocal/src/main/res/values-w1240dp/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">200dp</dimen>
|
||||
</resources>
|
||||
3
modulevocal/src/main/res/values-w600dp/dimens.xml
Normal file
3
modulevocal/src/main/res/values-w600dp/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">48dp</dimen>
|
||||
</resources>
|
||||
6
modulevocal/src/main/res/values-w820dp/dimens.xml
Normal file
6
modulevocal/src/main/res/values-w820dp/dimens.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
</resources>
|
||||
8
modulevocal/src/main/res/values/dimens.xml
Normal file
8
modulevocal/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding">16dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
</resources>
|
||||
@@ -1,4 +1,2 @@
|
||||
<resources>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user