This commit is contained in:
nail
2026-04-07 17:20:35 +08:00
parent 5340175551
commit bacfd44ecf
20 changed files with 446 additions and 245 deletions

View File

@@ -360,6 +360,10 @@
<activity
android:name=".view.main.GenderUserAndMibiRankActivity"
android:screenOrientation="portrait" />
<activity
android:name=".view.news.activity.CateRecordActivity"
android:screenOrientation="portrait" />
<activity
android:name=".wxapi.WXEntryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"

View File

@@ -1,11 +1,14 @@
package com.xuebiping.bolizhuzi.im.uikit.business.recent;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -51,6 +54,7 @@ import com.netease.nimlib.sdk.team.model.Team;
import com.netease.nimlib.sdk.team.model.TeamMember;
import com.netease.nimlib.sdk.uinfo.UserService;
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
import com.xuebiping.bolizhuzi.view.news.activity.CateRecordActivity;
import java.util.ArrayList;
import java.util.Collections;
@@ -136,6 +140,31 @@ public class RecentContactsFragment extends TFragment {
recyclerView = findView(R.id.recycler_view);
emptyBg = findView(R.id.emptyBg);
emptyHint = findView(R.id.message_list_empty_hint);
LinearLayout ll_system_notice = findView(R.id.ll_system_notice);
ll_system_notice.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NimUIKit.startP2PSession(getActivity(), "2");
}
});
LinearLayout ll_office_service = findView(R.id.ll_office_service);
ll_office_service.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NimUIKit.startP2PSession(getActivity(), "4");
}
});
LinearLayout ll_cate_record = findView(R.id.ll_cate_record);
ll_cate_record.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), CateRecordActivity.class);
startActivity(intent);
}
});
}
/**
@@ -156,7 +185,7 @@ public class RecentContactsFragment extends TFragment {
recyclerView.addOnItemTouchListener(touchListener);
// ios style
OverScrollDecoratorHelper.setUpOverScroll(recyclerView, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
// OverScrollDecoratorHelper.setUpOverScroll(recyclerView, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
// drop listener
DropManager.getInstance().setDropListener(new DropManager.IDropListener() {
@@ -291,56 +320,56 @@ public class RecentContactsFragment extends TFragment {
}
});
boolean checkState = NIMClient.getService(FriendService.class).isNeedMessageNotify(recent.getContactId());
title = (checkState ? getString(R.string.main_msg_list_mute_on) : getString(R.string.main_msg_list_mute_off));
alertDialog.addItem(title, new CustomAlertDialog.onSeparateItemClickListener() {
@Override
public void onClick() {
NIMClient.getService(FriendService.class).setMessageNotify(recent.getContactId(), !checkState).setCallback(new RequestCallbackWrapper<Void>() {
@Override
public void onResult(int code, Void result, Throwable exception) {
if (code == ResponseCode.RES_SUCCESS) {
int unreadNum = NIMClient.getService(MsgService.class).getTotalUnreadCount(true);
avatar = "";
if (unreadNum > 0) {
NIMClient.getService(MsgService.class).queryRecentContacts().setCallback(new RequestCallbackWrapper<List<RecentContact>>() {
@Override
public void onResult(int code, List<RecentContact> recentContacts, Throwable throwable) {
if (recentContacts != null && recentContacts.size() > 0) {
for (int i = 0; i < recentContacts.size(); i++) {
if (NIMClient.getService(FriendService.class).isNeedMessageNotify(recentContacts.get(i).getContactId())) {
if (recentContacts.get(i).getUnreadCount() != 0 && Long.parseLong(recentContacts.get(i).getContactId()) > 20 && recentContacts.get(i).getSessionType() == SessionTypeEnum.P2P) {
NimUserInfo userInfo = NIMClient.getService(UserService.class).getUserInfo(recentContacts.get(i).getContactId());
if (ConstUrl.LOGDEBUG)Log.i("TAG", "recentContacts: ----------->" + userInfo);
if (userInfo != null) {
avatar = userInfo.getAvatar();
if (!TextUtils.isEmpty(avatar)) {
avatar = StrU.getResourcePath(avatar, getContext());
}
}
break;
}
}
}
}
EventBus.getDefault().post(new UnReadCountEvent(unreadNum, avatar));
}
});
} else {
EventBus.getDefault().post(new UnReadCountEvent(unreadNum, avatar));
}
refreshMessages(false);
// if (checkState) {
// Toast.makeText(UserProfileActivity.this, "开启消息提醒", Toast.LENGTH_SHORT).show();
// } else {
// Toast.makeText(UserProfileActivity.this, "关闭消息提醒", Toast.LENGTH_SHORT).show();
// boolean checkState = NIMClient.getService(FriendService.class).isNeedMessageNotify(recent.getContactId());
// title = (checkState ? getString(R.string.main_msg_list_mute_on) : getString(R.string.main_msg_list_mute_off));
// alertDialog.addItem(title, new CustomAlertDialog.onSeparateItemClickListener() {
// @Override
// public void onClick() {
// NIMClient.getService(FriendService.class).setMessageNotify(recent.getContactId(), !checkState).setCallback(new RequestCallbackWrapper<Void>() {
// @Override
// public void onResult(int code, Void result, Throwable exception) {
// if (code == ResponseCode.RES_SUCCESS) {
// int unreadNum = NIMClient.getService(MsgService.class).getTotalUnreadCount(true);
// avatar = "";
// if (unreadNum > 0) {
// NIMClient.getService(MsgService.class).queryRecentContacts().setCallback(new RequestCallbackWrapper<List<RecentContact>>() {
// @Override
// public void onResult(int code, List<RecentContact> recentContacts, Throwable throwable) {
// if (recentContacts != null && recentContacts.size() > 0) {
// for (int i = 0; i < recentContacts.size(); i++) {
// if (NIMClient.getService(FriendService.class).isNeedMessageNotify(recentContacts.get(i).getContactId())) {
// if (recentContacts.get(i).getUnreadCount() != 0 && Long.parseLong(recentContacts.get(i).getContactId()) > 20 && recentContacts.get(i).getSessionType() == SessionTypeEnum.P2P) {
// NimUserInfo userInfo = NIMClient.getService(UserService.class).getUserInfo(recentContacts.get(i).getContactId());
// if (ConstUrl.LOGDEBUG)Log.i("TAG", "recentContacts: ----------->" + userInfo);
// if (userInfo != null) {
// avatar = userInfo.getAvatar();
// if (!TextUtils.isEmpty(avatar)) {
// avatar = StrU.getResourcePath(avatar, getContext());
// }
}
}
});
}
});
// }
// break;
// }
// }
// }
// }
// EventBus.getDefault().post(new UnReadCountEvent(unreadNum, avatar));
// }
// });
// } else {
// EventBus.getDefault().post(new UnReadCountEvent(unreadNum, avatar));
// }
//
// refreshMessages(false);
//// if (checkState) {
//// Toast.makeText(UserProfileActivity.this, "开启消息提醒", Toast.LENGTH_SHORT).show();
//// } else {
//// Toast.makeText(UserProfileActivity.this, "关闭消息提醒", Toast.LENGTH_SHORT).show();
//// }
// }
// }
// });
// }
// });
/* alertDialog.addItem("删除该聊天(仅服务器)", new CustomAlertDialog.onSeparateItemClickListener() {
@Override

View File

@@ -0,0 +1,42 @@
package com.xuebiping.bolizhuzi.view.news.activity;
import android.os.Bundle;
import android.view.View;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import com.xuebiping.bolizhuzi.R;
import com.xuebiping.bolizhuzi.controller.main.adapter.MainViewPagerAdapter;
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
import com.xuebiping.bolizhuzi.view.news.fragment.VideoRecordFragment;
import java.util.ArrayList;
import java.util.List;
public class CateRecordActivity extends BaseActivity{
private ViewPager mRecord_view_pager;
private VideoRecordFragment mVideoRecordFragment;
private List<Fragment> mChannelFragments = new ArrayList<>();
private MainViewPagerAdapter mViewPagerAdapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cate_record);
setTitleName("通话记录");
initView();
}
private void initView() {
mRecord_view_pager = findViewById(R.id.record_view_pager);
mVideoRecordFragment = new VideoRecordFragment();
mChannelFragments.add(mVideoRecordFragment);
mViewPagerAdapter = new MainViewPagerAdapter(getSupportFragmentManager(),
mChannelFragments);
mRecord_view_pager.setAdapter(mViewPagerAdapter);
}
}

View File

@@ -14,6 +14,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
@@ -22,8 +23,10 @@ import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import com.blankj.utilcode.util.TimeUtils;
import com.fengliyan.uikit.toast.MaleToast;
import com.xuebiping.bolizhuzi.R;
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
import com.xuebiping.bolizhuzi.controller.eventBus.UnReadCountEvent;
import com.xuebiping.bolizhuzi.controller.main.adapter.MainViewPagerAdapter;
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
import com.xuebiping.bolizhuzi.controller.user.manager.UserManager;
@@ -34,6 +37,7 @@ import com.xuebiping.bolizhuzi.utils.SPUtils;
import com.xuebiping.bolizhuzi.utils.StrU;
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
import com.xuebiping.bolizhuzi.view.main.SearchActivity;
import com.xuebiping.bolizhuzi.view.settings.MemberActivity;
import com.xuebiping.bolizhuzi.view.settings.MissionActivity;
import com.fengliyan.uikit.dialog.BaseMessageDialog;
@@ -44,6 +48,8 @@ import com.netease.nimlib.sdk.msg.MsgService;
import java.util.ArrayList;
import java.util.List;
import de.greenrobot.event.EventBus;
/**
* Created by halifa on 2019/2/27.
*/
@@ -58,7 +64,7 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
private View mTitleTag1;
private View mTitleTag2;
private View mTitlePost;
private ImageView title_clear_unread;
private RelativeLayout title_clear_unread;
private ViewPager mMainViewPager;
private LinearLayout lin_msg_vip;
private TextView tv_msg_vip_time;
@@ -67,10 +73,12 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
private List<Fragment> mChannelFragments = new ArrayList<>();
private MainViewPagerAdapter mViewPagerAdapter;
private ConversasionFragment mConversasionFragment;
private VideoRecordFragment mVideoRecordFragment;
// private VideoRecordFragment mVideoRecordFragment;
private int mIndex;
private RecentContactsFragment mRecentContactsFragment;
private CountDownTimer mVipCountDownTimer = null;
private RelativeLayout mRl_clear_chat_list;
private RelativeLayout mRl_home_search;
@Nullable
@Override
@@ -179,10 +187,14 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
mTitleBottom2 = mTitleView.findViewById(R.id.title_bottom_line_2);
mTitlePost = mTitleView.findViewById(R.id.title_post);
title_clear_unread = mTitleView.findViewById(R.id.title_clear_unread);
mRl_clear_chat_list = mTitleView.findViewById(R.id.rl_clear_chat_list);
mRl_home_search = mTitleView.findViewById(R.id.rl_home_search);
mTitleTag1.setOnClickListener(this);
mTitleTag2.setOnClickListener(this);
mTitlePost.setOnClickListener(this);
title_clear_unread.setOnClickListener(this);
mRl_clear_chat_list.setOnClickListener(this);
mRl_home_search.setOnClickListener(this);
title.addViewTo(mTitleView, POSTION_CENTER);
}
@@ -193,9 +205,9 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
lin_msg_sign = v.findViewById(R.id.lin_msg_sign);
tv_msg_sign_in = v.findViewById(R.id.tv_msg_sign_in);
mRecentContactsFragment = new RecentContactsFragment();
mVideoRecordFragment = new VideoRecordFragment();
// mVideoRecordFragment = new VideoRecordFragment();
mChannelFragments.add(mRecentContactsFragment);
mChannelFragments.add(mVideoRecordFragment);
// mChannelFragments.add(mVideoRecordFragment);
lin_msg_vip.setOnClickListener(this);
lin_msg_sign.setOnClickListener(this);
@@ -233,12 +245,12 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
mTitleText1.setTextColor(ContextCompat.getColor(getActivity(), R.color.one_text));
mTitleText1.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
mTitleText1.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 20);
mTitleBottom1.setVisibility(View.VISIBLE);
// mTitleBottom1.setVisibility(View.VISIBLE);
mTitleText2.setTextColor(ContextCompat.getColor(getActivity(), R.color.one_text));
mTitleText2.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
mTitleText2.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
mTitleBottom2.setVisibility(View.GONE);
// mTitleBottom2.setVisibility(View.GONE);
break;
case 1:
mTitleText2.setTextColor(ContextCompat.getColor(getActivity(), R.color.one_text));
@@ -255,6 +267,7 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
}
private BaseMessageDialog clearUnreadDialog;
private BaseMessageDialog clearChatListDialog;
@Override
public void onClick(View view) {
@@ -265,7 +278,7 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
} else if (view == mTitlePost) {
NimUIKit.startP2PSession(getActivity(), "2");
} else if (view == title_clear_unread) {
clearUnreadDialog = new BaseMessageDialog.Builder(getContext()).setTitle("温馨提示").setMessage("消息气泡会清除,但消息不会丢失").setNegative("取消").setNegativeButtonListener(new DialogInterface.OnClickListener() {
clearUnreadDialog = new BaseMessageDialog.Builder(getContext()).setTitle("是否忽略所有未读提醒").setMessage("消息未读气泡会清除,不会删除聊天记录").setNegative("取消").setNegativeButtonListener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
clearUnreadDialog.dismiss();
@@ -278,6 +291,24 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
}
}).build();
clearUnreadDialog.show();
} else if (view == mRl_clear_chat_list) {
clearChatListDialog = new BaseMessageDialog.Builder(getContext()).setTitle("是否清空聊天列表").setMessage("聊天记录会被清除,请谨慎清空消息列表").setNegative("取消").setNegativeButtonListener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
clearChatListDialog.dismiss();
}
}).setPositive("确定").setPositiveButtonListener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
NIMClient.getService(MsgService.class).clearMsgDatabase(true);
EventBus.getDefault().post(new UnReadCountEvent(0, ""));
clearChatListDialog.dismiss();
}
}).build();
clearChatListDialog.show();
} else if (view == mRl_home_search) {
Intent intent = new Intent(getActivity(), SearchActivity.class);
startActivity(intent);
} else if (view == lin_msg_vip) {
Intent intent = new Intent(getActivity(), MemberActivity.class);
intent.putExtra("index", 0);

View File

@@ -6,9 +6,11 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
@@ -21,11 +23,9 @@ import androidx.fragment.app.Fragment;
import com.blankj.utilcode.util.GsonUtils;
import com.facebook.drawee.view.SimpleDraweeView;
import com.fengliyan.device.DeviceManager;
import com.fengliyan.http.httprequest.HttpCallback;
import com.fengliyan.storage.StorageManager;
import com.fengliyan.uikit.toast.MaleToast;
import com.flyco.roundview.RoundLinearLayout;
import com.flyco.roundview.RoundTextView;
import com.opensource.svgaplayer.SVGADrawable;
import com.opensource.svgaplayer.SVGAImageView;
@@ -42,7 +42,6 @@ import com.xuebiping.bolizhuzi.controller.settings.adapter.constant.SettingOptio
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
import com.xuebiping.bolizhuzi.controller.user.manager.UserManager;
import com.xuebiping.bolizhuzi.im.uikit.api.NimUIKit;
import com.xuebiping.bolizhuzi.im.uikit.common.Constans;
import com.xuebiping.bolizhuzi.im.uikit.common.ToastHelper;
import com.xuebiping.bolizhuzi.model.login.bean.LoginBean;
import com.xuebiping.bolizhuzi.model.main.MainPageAnchorBean;
@@ -50,7 +49,6 @@ import com.xuebiping.bolizhuzi.model.settings.UserFrameBean;
import com.xuebiping.bolizhuzi.model.settings.UserHomeBean;
import com.xuebiping.bolizhuzi.model.settings.WalletIndexBean;
import com.xuebiping.bolizhuzi.model.user.bean.BaseUserInfo;
import com.xuebiping.bolizhuzi.utils.NoClearSPUtils;
import com.xuebiping.bolizhuzi.utils.SPUtils;
import com.xuebiping.bolizhuzi.utils.StrU;
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
@@ -59,7 +57,6 @@ import com.xuebiping.bolizhuzi.view.base.BaseWebViewActivity;
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
import com.xuebiping.bolizhuzi.view.main.MainPageActivity;
import com.xuebiping.bolizhuzi.view.main.dialog.ShaiXuanDialog;
import com.xuebiping.bolizhuzi.view.news.activity.ChatActivity;
import com.xuebiping.bolizhuzi.view.rank.ZhiRankActivity;
import com.xuebiping.bolizhuzi.view.settings.dialog.FreeVipDialog;
import com.xuebiping.bolizhuzi.view.settings.greeting.GreetingSettingActivity;
@@ -114,9 +111,9 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
private LinearLayout lin_my_list1;
private LinearLayout lin_my_list2;
private TextView tv_go_homepage;
//private LinearLayout ll_mine_video_chat;
private LinearLayout ll_mine_video_chat;
private List<SettingOptions> mOptions1 = new ArrayList<>();
@@ -194,9 +191,11 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
tv_income_num = v.findViewById(R.id.tv_income_num);
lin_my_list1 = v.findViewById(R.id.lin_my_list1);
lin_my_list2 = v.findViewById(R.id.lin_my_list2);
tv_go_homepage = v.findViewById(R.id.tv_go_homepage);
ll_mine_video_chat = v.findViewById(R.id.ll_mine_video_chat);
rl_user_info.setOnClickListener(this);
ll_go_edit_layout.setOnClickListener(this);
tv_go_homepage.setOnClickListener(this);
@@ -210,6 +209,7 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
ll_income.setOnClickListener(this);
cl_income.setOnClickListener(this);
rl_vip.setOnClickListener(this);
ll_mine_video_chat.setOnClickListener(this);
tv_qingyu_id.setOnClickListener(this);
UserManager.getInstance().registerUserInfoObserver(new Observer<BaseUserInfo>() {
@@ -433,7 +433,6 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
@Override
public void onSuccess(BaseActivity activity, MainPageAnchorBean result, String message) {
mVideoEnableFlag = result.getOpen_video_status();
addOption(mOptions1, lin_my_list1);
}
@Override
@@ -522,6 +521,8 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
startActivity(intent);
break;
case R.id.cl_income:
intent = new Intent(getActivity(), WalletActivity.class);
startActivity(intent);
case R.id.ll_income:
intent = new Intent(getActivity(), CaibeiRechargeActivity.class);
startActivity(intent);
@@ -541,6 +542,9 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
clipUrlData(mUsercode);
}
break;
case R.id.ll_mine_video_chat:
MaleToast.showMessage(getActivity(),"我的视频,暂定");
break;
}
}
@@ -739,11 +743,24 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
break;
case DONOTMODEL:
mSwitch.setVisibility(View.GONE);
mSwitch.setVisibility(View.VISIBLE);
mHint.setVisibility(View.GONE);
mArrow.setVisibility(View.VISIBLE);
mLogo.setImageResource(R.mipmap.ic_do_not_model);
mName.setText("勿扰模式");
if (mVideoEnableFlag == 1) { //已开启勿扰模式
mSwitch.setChecked(true);
}else {
mSwitch.setChecked(false);
}
mSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
changeVideoStatus();
}
});
break;
case MEMBER:
mSwitch.setVisibility(View.GONE);
@@ -842,6 +859,7 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
startActivity(intent);
});
break;
}
layout.addView(view);
}

View File

@@ -1,12 +1,10 @@
package com.xuebiping.bolizhuzi.view.settings;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.xuebiping.bolizhuzi.R;
@@ -14,62 +12,48 @@ import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
import com.xuebiping.bolizhuzi.model.settings.WalletIndexBean;
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
import com.fengliyan.uikit.title.Title;
public class WalletActivity extends BaseActivity implements View.OnClickListener{
public static final int REQUEST_RECHARGE = 110;
private TextView mWalletRecharge;
private TextView mWalletIncoming;
private LinearLayout mRechargeButton;
private LinearLayout mExchangeButton;
private LinearLayout mWithdrawButton;
private LinearLayout wallet_bill_button;
private TextView mCaiBeiRecharge;
private TextView mCaiBeiImcome;
private View mCaiBeiRechargeButton;
private RelativeLayout mRl_back;
@Override
public void onCreate(Bundle onSavedInstance){
super.onCreate(onSavedInstance);
setContentView(R.layout.activity_wallet);
Title title = getCustomTitle();
title.setTitleBackground(Color.TRANSPARENT);
title.dismissBottomLine();
title.findViewById(R.id.title_bg).getBackground().setAlpha(255);
ImageView left = findViewById(R.id.left_image);
left.setImageResource(R.mipmap.ic_back_white);
title.setTitleWhite("我的钱包", null, null, new Title.OnFunctionalAreaClickListener() {
@Override
public void onLeftClick(View v) {
finish();
}
@Override
public void onRightClick(View v) {
Intent intent = new Intent(WalletActivity.this, BillActivity.class);
intent.putExtra("type", 0);
startActivity(intent);
}
});
hideTitleBar();
initView();
}
@Override
public void onResume() {
super.onResume();
getWalletIndex();
}
private void initView(){
mRl_back = findViewById(R.id.rl_back);
mWalletRecharge = findViewById(R.id.wallet_charge_amount);
mWalletIncoming = findViewById(R.id.wallet_income_amount);
mRechargeButton = findViewById(R.id.wallet_recharge_button);
mExchangeButton = findViewById(R.id.wallet_exchange_button);
wallet_bill_button = findViewById(R.id.wallet_bill_button);
mWithdrawButton = findViewById(R.id.wallet_cash_button);
mCaiBeiRecharge = findViewById(R.id.wallet_caibei_recharge);
mCaiBeiImcome = findViewById(R.id.wallet_caibei_income);
mCaiBeiRechargeButton = findViewById(R.id.wallet_caibei_recharge_layout);
mRechargeButton.setOnClickListener(this);
mExchangeButton.setOnClickListener(this);
mWithdrawButton.setOnClickListener(this);
wallet_bill_button.setOnClickListener(this);
mCaiBeiRechargeButton.setOnClickListener(this);
mRl_back.setOnClickListener(this);
}
private void getWalletIndex(){
@@ -78,8 +62,6 @@ public class WalletActivity extends BaseActivity implements View.OnClickListener
public void onSuccess(BaseActivity activity, WalletIndexBean result, String message) {
mWalletRecharge.setText(result.getAccount().getCoin() + "");
mWalletIncoming.setText(result.getAccount().getIncome_coin() + "");
mCaiBeiRecharge.setText(result.getAccount().getCoin() + "");
mCaiBeiImcome.setText(result.getAccount().getIncome_coin() + "");
}
@Override
@@ -98,25 +80,25 @@ public class WalletActivity extends BaseActivity implements View.OnClickListener
public void onClick(View view) {
if(view == mRechargeButton){
Intent intent = new Intent(this, CaibeiRechargeActivity.class);
startActivityForResult(intent, REQUEST_RECHARGE);
}else if(view == mCaiBeiRechargeButton){
Intent intent = new Intent(this, CaibeiRechargeActivity.class);
startActivityForResult(intent, REQUEST_RECHARGE);
startActivity(intent);
}else if(view == mWithdrawButton){
Intent intent = new Intent(this, WithdrawActivity.class);
startActivityForResult(intent, REQUEST_RECHARGE);
startActivity(intent);
}else if(view == mExchangeButton){
Intent intent = new Intent(this, ExchangeActivity.class);
startActivityForResult(intent, REQUEST_RECHARGE);
startActivity(intent);
}else if(view == wallet_bill_button){
Intent intent = new Intent(WalletActivity.this, BillActivity.class);
intent.putExtra("type", 0);
startActivity(intent);
}else if (view == mRl_back) {
finish();
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_RECHARGE) {
getWalletIndex();
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.viewpager.widget.ViewPager
android:id="@+id/record_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>

View File

@@ -75,6 +75,7 @@
</RelativeLayout>
<RelativeLayout
android:visibility="gone"
android:id="@+id/system_setting_guard"
android:layout_width="match_parent"
android:layout_height="@dimen/dp54"

View File

@@ -23,12 +23,39 @@
android:scaleType="fitXY"
android:src="@mipmap/ic_wallet_bg" />
<RelativeLayout
android:layout_marginTop="24dp"
android:layout_width="match_parent"
android:layout_height="@dimen/dp48">
<RelativeLayout
android:id="@+id/rl_back"
android:layout_width="@dimen/dp44"
android:layout_height="@dimen/dp44">
<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_back_white"/>
</RelativeLayout>
<TextView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我的钱包"
android:textColor="@color/white"
android:textSize="18sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="@dimen/dp50"
android:layout_marginTop="@dimen/dp90"
android:layout_marginRight="16dp"
android:orientation="horizontal">
@@ -148,7 +175,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp12"
android:layout_weight="1"
android:text="账单明细"
android:text="收支明细"
android:textColor="@color/black"
android:textSize="@dimen/dp14"
android:textStyle="bold" />
@@ -203,6 +230,7 @@
android:background="#EEEEEE" />
<LinearLayout
android:visibility="gone"
android:id="@+id/wallet_exchange_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -240,115 +268,4 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="22dp"
android:layout_marginRight="16dp"
android:background="@drawable/shape_wallet_header"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="85dp"
android:orientation="horizontal"
android:weightSum="2">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="充值的金币"
android:textColor="@color/infoEditTextColor2"
android:textSize="14sp" />
<TextView
android:id="@+id/wallet_caibei_recharge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="0"
android:textColor="#680ad2"
android:textSize="23sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收益的金币"
android:textColor="@color/infoEditTextColor2"
android:textSize="14sp" />
<TextView
android:id="@+id/wallet_caibei_income"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="0"
android:textColor="#680ad2"
android:textSize="23sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2px"
android:background="@color/bottomCuttingLine" />
<RelativeLayout
android:id="@+id/wallet_caibei_recharge_layout"
android:layout_width="match_parent"
android:layout_height="60dp">
<ImageView
android:id="@+id/wallet_shell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:src="@drawable/ic_shell" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="6dp"
android:layout_toRightOf="@+id/wallet_shell"
android:text="金币"
android:textColor="@color/infoEditTextColor2"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="16sp"
android:drawableRight="@drawable/group"
android:drawablePadding="5dp"
android:text="充值"
android:textColor="@color/infoEditTextColor2"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>

View File

@@ -9,6 +9,7 @@
tools:viewBindingIgnore="true">
<RelativeLayout
android:layout_marginBottom="@dimen/dp100"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -637,20 +638,8 @@
android:background="@drawable/shape_recommend_bg"
android:orientation="vertical" />
<LinearLayout
android:id="@+id/lin_my_list2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="62dp"
android:background="@drawable/shape_recommend_bg"
android:orientation="vertical" />
</LinearLayout>
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@@ -20,6 +20,7 @@
android:layout_marginRight="@dimen/dp16">
<ImageView
android:visibility="gone"
android:id="@+id/title_bottom_line_1"
android:layout_width="@dimen/dp20"
android:layout_height="@dimen/dp5"
@@ -39,6 +40,7 @@
</RelativeLayout>
<RelativeLayout
android:visibility="gone"
android:id="@+id/title_view_2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
@@ -66,6 +68,7 @@
</LinearLayout>
<ImageView
android:visibility="gone"
android:id="@+id/title_post"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -74,13 +77,59 @@
android:layout_marginRight="@dimen/dp16"
android:src="@drawable/ic_dynamic_remind" />
<ImageView
android:id="@+id/title_clear_unread"
<!-- <ImageView-->
<!-- android:id="@+id/title_clear_unread"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:layout_toStartOf="@+id/title_post"-->
<!-- android:src="@drawable/ic_clear_unread" />-->
<LinearLayout
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:layout_toStartOf="@+id/title_post"
android:src="@drawable/ic_clear_unread" />
android:orientation="horizontal">
<RelativeLayout
android:id="@+id/rl_clear_chat_list"
android:layout_width="36dp"
android:layout_height="32dp">
<ImageView
android:layout_centerInParent="true"
android:src="@mipmap/ic_clear_chat_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/title_clear_unread"
android:layout_width="36dp"
android:layout_height="32dp">
<ImageView
android:layout_centerInParent="true"
android:src="@mipmap/ic_clear_un_read"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_home_search"
android:layout_width="36dp"
android:layout_height="32dp">
<ImageView
android:layout_centerInParent="true"
android:src="@drawable/ic_home_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -83,6 +83,7 @@
fresco:layout_constraintTop_toTopOf="@+id/tv_user_name" />
<ImageView
android:visibility="gone"
android:id="@+id/iv_user_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

View File

@@ -47,7 +47,7 @@
android:layout_weight="1"
android:background="@drawable/muna_base_dialog_cancel_btn_bg"
android:text="取消"
android:textColor="@color/mainColor"
android:textColor="#000000"
android:textSize="@dimen/base_dialog_button_text_size" />
<View

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -2,7 +2,15 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#C178FE"/>
<corners android:radius="16dp"/>
<!-- <solid android:color="#C178FE"/>-->
<!-- <corners android:radius="16dp"/>-->
<gradient android:angle="0"
android:startColor="#EA6FEE"
android:endColor="#EB6969"/>
<!--<solid android:color="@color/yellow_ffd33e"/>-->
<corners android:radius="45dp"/>
</shape>

View File

@@ -1,16 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/messages_list_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:layout_marginBottom="50dp">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/channel_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/ctl_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
<LinearLayout
android:gravity="center_vertical"
android:id="@+id/rl_banner"
android:layout_width="match_parent"
android:layout_height="100dp"
android:weightSum="3"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_system_notice"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">
<ImageView
android:layout_gravity="center_horizontal"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_system_notice" />
<TextView
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="系统通知"
android:textColor="#ff000000"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:id="@+id/ll_office_service"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_gravity="center_horizontal"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_office_service" />
<TextView
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="官方客服"
android:textColor="#ff000000"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:id="@+id/ll_cate_record"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_gravity="center_horizontal"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_cate_record" />
<TextView
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="通话记录"
android:textColor="#ff000000"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="@android:color/transparent" />
android:cacheColorHint="@android:color/transparent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<!-- <androidx.recyclerview.widget.RecyclerView-->
<!-- android:id="@+id/recycler_view"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:cacheColorHint="@android:color/transparent" />-->
<RelativeLayout
android:id="@+id/emptyBg"