Merge branch 'develop_home' into develop_new
4
.gitignore
vendored
@@ -6,4 +6,6 @@
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.idea
|
||||
.settings
|
||||
.settings
|
||||
app/accompany/debug/app-accompany-debug.apk
|
||||
app/accompany/debug/output.json
|
||||
|
@@ -1 +0,0 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0.0","enabled":true,"outputFile":"app-accompany-debug.apk","fullName":"accompanyDebug","baseName":"accompany-debug"},"path":"app-accompany-debug.apk","properties":{}}]
|
@@ -18,6 +18,7 @@ import android.util.LongSparseArray;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mcxiaoke.packer.helper.PackerNg;
|
||||
@@ -206,7 +207,7 @@ import static com.yizhuan.xchat_android_core.Constants.SHOW_CAR_GUIDE;
|
||||
*/
|
||||
@CreatePresenter(MainPresenter.class)
|
||||
public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
implements MainTabLayout.OnTabClickListener, IMainView {
|
||||
implements MainTabLayout.OnTabClickListener, IMainView , View.OnClickListener {
|
||||
|
||||
private static final String TAG = "MainActivity";
|
||||
|
||||
@@ -217,6 +218,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
private TextView tvName;//最小化窗口名称
|
||||
private TextView tvId;//最小化窗口ID
|
||||
private CircleImageView avatarImage;
|
||||
private LinearLayout llDragInfo;
|
||||
private LivingIconView userLivingView;
|
||||
private View viewClose;
|
||||
|
||||
@@ -514,6 +516,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
avatarImage = findViewById(R.id.avatar_image);
|
||||
userLivingView = findViewById(R.id.liv_user);
|
||||
viewClose = findViewById(R.id.view_close);
|
||||
llDragInfo = findViewById(R.id.ll_drag_info);
|
||||
// floatingLiveMiniView = findViewById(R.id.floating_view);
|
||||
|
||||
userLivingView.setColor(Color.WHITE);
|
||||
@@ -573,25 +576,10 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
|
||||
private void initMaterialView() {
|
||||
avatarLayout.setVisibility(View.GONE);
|
||||
avatarLayout.setOnClickListener(v -> {
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo != null) {
|
||||
if (AvRoomDataManager.get().isParty()) {
|
||||
AVRoomActivity.start(MainActivity.this, true);
|
||||
}else {
|
||||
AVRoomActivity.start(MainActivity.this, roomInfo.getUid());
|
||||
}
|
||||
} else {
|
||||
toast("-房间信息为空-");
|
||||
}
|
||||
});
|
||||
avatarImage.setOnClickListener(this);
|
||||
llDragInfo.setOnClickListener(this);
|
||||
viewClose.setOnClickListener(this);
|
||||
|
||||
viewClose.setOnClickListener(v -> {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_MINIMIZE_CLOSED,
|
||||
"房间最小化关闭按钮");
|
||||
MainActivity.this.getMvpPresenter().exitRoom();
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -761,7 +749,8 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLoadLoginUserInfoEvent(LoadLoginUserInfoEvent event) {
|
||||
handleSign();
|
||||
//签到弹窗
|
||||
// handleSign();
|
||||
firstLoadedUserInfo();
|
||||
}
|
||||
|
||||
@@ -1275,4 +1264,28 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.avatar_image:
|
||||
case R.id.ll_drag_info:
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo != null) {
|
||||
if (AvRoomDataManager.get().isParty()) {
|
||||
AVRoomActivity.start(MainActivity.this, true);
|
||||
}else {
|
||||
AVRoomActivity.start(MainActivity.this, roomInfo.getUid());
|
||||
}
|
||||
} else {
|
||||
toast("-房间信息为空-");
|
||||
}
|
||||
|
||||
break;
|
||||
case R.id.view_close:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_MINIMIZE_CLOSED,
|
||||
"房间最小化关闭按钮");
|
||||
MainActivity.this.getMvpPresenter().exitRoom();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ public class MainMagicIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
indicator.setLineWidth(UIUtil.dip2px(mContext, 9));
|
||||
indicator.setColors(context.getResources().getColor(R.color.white));
|
||||
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
lp.bottomMargin = 0;
|
||||
lp.bottomMargin = UIUtil.dip2px(mContext, 0);
|
||||
indicator.setLayoutParams(lp);
|
||||
return mIsShowIndicator?indicator:null;
|
||||
}
|
||||
|
@@ -863,7 +863,7 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
ViewGroup.LayoutParams layoutParams = mBinding.rollView.getLayoutParams();
|
||||
int bannerWidth = UIUtil.getScreenWidth(mContext) - UIUtil.dip2px(mContext, 40);
|
||||
layoutParams.width = bannerWidth;
|
||||
layoutParams.height = bannerWidth * 116 / 335;
|
||||
layoutParams.height = bannerWidth * 90 / 345;
|
||||
mBinding.rollView.setLayoutParams(layoutParams);
|
||||
|
||||
mBinding.rollView.setHintView(new ColorPointHintView(mContext, Color.WHITE, mContext.getResources().getColor(R.color.color_66FFFFFF)) {
|
||||
@@ -966,4 +966,5 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
})
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ import com.yizhuan.xchat_android_library.utils.log.MLog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.CancellationException;
|
||||
|
||||
/**
|
||||
@@ -35,16 +36,8 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
private RecyclerView recyclerView;
|
||||
private String tabId;
|
||||
private HomeRoomFragmentAdapter mHomeRoomAdapter;
|
||||
private final Object lock = new Object();
|
||||
/**
|
||||
* 是否包含了banner
|
||||
*/
|
||||
private boolean isContainsBanner = false;
|
||||
|
||||
/**
|
||||
* 用于显示的数据
|
||||
*/
|
||||
private List<HomeItem> totalHomeItemList = new ArrayList<>();
|
||||
private List<HomeTabMapInfo> sixRoomsList;
|
||||
private final int ROOM_COUNT = 6;
|
||||
|
||||
public static HomeTabHomeFragment newInstance(int tabId) {
|
||||
|
||||
@@ -77,12 +70,9 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
public void onFindViews() {
|
||||
super.onFindViews();
|
||||
recyclerView = mView.findViewById(R.id.recycler_view);
|
||||
|
||||
initRecyclerView();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 刷新数据
|
||||
*/
|
||||
@@ -90,8 +80,6 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
getData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 请求数据
|
||||
*/
|
||||
@@ -107,7 +95,18 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
showNoData();
|
||||
mHomeRoomAdapter.notifyDataSetChanged();
|
||||
}
|
||||
mHomeRoomAdapter.setNewData(getMultipleItemData(serviceResult));
|
||||
|
||||
int max = getMultipleItemData(serviceResult).size();
|
||||
int min = 0;
|
||||
|
||||
sixRoomsList = new ArrayList<>();
|
||||
for (int i = 0; i < ROOM_COUNT ; i++) {
|
||||
Random random = new Random();
|
||||
int s = random.nextInt(max)%(max-min+1) + min;
|
||||
sixRoomsList.add(getMultipleItemData(serviceResult).get(s));
|
||||
}
|
||||
|
||||
mHomeRoomAdapter.setNewData(sixRoomsList);
|
||||
mHomeRoomAdapter.notifyDataSetChanged();
|
||||
|
||||
} else {
|
||||
@@ -146,7 +145,7 @@ public class HomeTabHomeFragment extends BaseFragment {
|
||||
return null;
|
||||
}
|
||||
|
||||
final int ROOM_COUNT = 6;
|
||||
|
||||
final int ADD_COUNT = ROOM_COUNT - itemList.size();
|
||||
|
||||
for (int i = 0; i < ADD_COUNT; i++) {
|
||||
|
@@ -46,8 +46,8 @@ public class PatriarchModeDialog extends BaseSdDialog {
|
||||
if (window != null) {
|
||||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
WindowManager.LayoutParams windowParams = window.getAttributes();
|
||||
windowParams.width = UIUtil.dip2px(getContext(), 296);
|
||||
windowParams.height = UIUtil.dip2px(getContext(), 277);
|
||||
windowParams.width = UIUtil.dip2px(getContext(), 300);
|
||||
// windowParams.height = UIUtil.dip2px(getContext(), 277);
|
||||
windowParams.dimAmount = 0.4f;
|
||||
windowParams.gravity = Gravity.CENTER;
|
||||
window.setAttributes(windowParams);
|
||||
|
@@ -75,6 +75,7 @@ public class ChargeActivity extends BaseActivity {
|
||||
private ChargeAdapter mChargeAdapter;
|
||||
private LinearLayout unionPayLayout;
|
||||
private ImageView unionPayImage;
|
||||
private TextView tvAgreement;
|
||||
|
||||
private ChargeBean mSelectChargeBean;
|
||||
|
||||
@@ -113,6 +114,9 @@ public class ChargeActivity extends BaseActivity {
|
||||
getDialogManager().showProgressDialog(this, false);
|
||||
PaymentActivity.start(this, payChannel, String.valueOf(mSelectChargeBean.chargeProdId));
|
||||
});
|
||||
tvAgreement.setOnClickListener(v -> {
|
||||
CommonWebViewActivity.start(this,UriProvider.getRechargeAgreementUrl());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -125,6 +129,7 @@ public class ChargeActivity extends BaseActivity {
|
||||
tvCharge = findViewById(R.id.tv_charge);
|
||||
unionPayLayout = findViewById(R.id.ll_union_pay);
|
||||
unionPayImage = findViewById(R.id.iv_sel_union_pay);
|
||||
tvAgreement = findViewById(R.id.tv_agreement);
|
||||
}
|
||||
|
||||
public void selectPayChannelDisplay(String payChannel) {
|
||||
@@ -283,6 +288,7 @@ public class ChargeActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
getDialogManager().dismissDialog();
|
||||
if (resultCode != RESULT_OK) {
|
||||
return;
|
||||
@@ -436,7 +442,7 @@ public class ChargeActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void setWalletData(WalletInfo walletInfo) {
|
||||
mTv_gold.setText(getString(R.string.charge_gold, walletInfo != null ? walletInfo.getGoldNum() : 0));
|
||||
mTv_gold.setText(getString(R.string.charge_gold, walletInfo != null ? walletInfo.getDiamondNum() : 0));
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
|
@@ -1,11 +1,14 @@
|
||||
package com.yizhuan.erban.ui.user;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
@@ -79,6 +82,7 @@ import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_core.user.UserInfoUiMgr;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserDetailInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserPhoto;
|
||||
import com.yizhuan.xchat_android_core.user.event.LoginUserInfoUpdateEvent;
|
||||
@@ -96,6 +100,9 @@ import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CancellationException;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
|
||||
/**
|
||||
* create by lvzebiao on 2018/8/31
|
||||
@@ -108,11 +115,10 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
|
||||
public static final int REQUEST_CODE_UPDATE_VOICE = 1;
|
||||
|
||||
private int TAB_SIZE = 4;
|
||||
private int TAB_SIZE = 3;
|
||||
private int TAB_DYNAMIC = 0;
|
||||
private int TAB_INFORMATION = 1;
|
||||
private int TAB_GIFT = 2;
|
||||
private int TAB_CAR = 3;
|
||||
|
||||
@Override
|
||||
public void onItemSelect(int position) {
|
||||
@@ -131,7 +137,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
private UserInfoActivity mActivity;
|
||||
private long userId;
|
||||
private UserInfo userInfo;
|
||||
private SVGAParser mSVGAParser;
|
||||
Drawable mAttenDrawable;
|
||||
Drawable mAttenedDrawable;
|
||||
|
||||
@@ -148,15 +153,12 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
|
||||
UserInfoFragment mUserInfoFragment;
|
||||
UserInfoGiftGroupFrg mUserInfoGiftGroupFrg;
|
||||
UserInfoCarFragment mUserInfoCarFragment;
|
||||
UserDynamicFrg mUserDynamicFrg;
|
||||
|
||||
private void onSetListener() {
|
||||
mBinding.ivUserBack.setOnClickListener(this);
|
||||
mBinding.ivEdit.setOnClickListener(this);
|
||||
mBinding.llUserRoom.setOnClickListener(this);
|
||||
mBinding.llWhere.setOnClickListener(this);
|
||||
mBinding.imageView.setOnClickListener(this);
|
||||
// mBinding.imageView.setOnClickListener(this);
|
||||
|
||||
mBinding.ablUserInfo.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
||||
@Override
|
||||
@@ -182,6 +184,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
@Override
|
||||
protected void init() {
|
||||
mActivity = this;
|
||||
@@ -192,7 +195,21 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
onSetListener();
|
||||
EventBus.getDefault().register(this);
|
||||
|
||||
mSVGAParser = new SVGAParser(this);
|
||||
UserModel.get().getUserInfoDetail(userId)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new BeanObserver<UserDetailInfo>() {
|
||||
@Override
|
||||
public void onErrorMsg(String error) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(UserDetailInfo info) {
|
||||
LogUtil.e(info.toString());
|
||||
initUserDetail(info.getData());
|
||||
}
|
||||
});
|
||||
|
||||
UserModel.get().getUserInfoFromServer(userId)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new BeanObserver<UserInfo>() {
|
||||
@@ -204,68 +221,18 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
@Override
|
||||
public void onSuccess(UserInfo Info) {
|
||||
userInfo = Info;
|
||||
//这里座驾只显示一次
|
||||
if (userInfo.getCarInfo() != null && userInfo.getCarInfo().isUsing()) {
|
||||
try {
|
||||
mSVGAParser.parse(new URL(userInfo.getCarInfo().getEffect()), new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
mBinding.userInfoSvgaCar.setVisibility(View.VISIBLE);
|
||||
mBinding.userInfoSvgaCar.setLoops(1);
|
||||
Drawable drawable = new SVGADrawable(videoItem);
|
||||
mBinding.userInfoSvgaCar.setImageDrawable(drawable);
|
||||
mBinding.userInfoSvgaCar.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
mBinding.userInfoSvgaCar.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
initData(userInfo);
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.userInfoSvgaCar.setCallback(new SVGACallback() {
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinished() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRepeat() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStep(int i, double v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mAttenDrawable = ContextCompat.getDrawable(this, R.mipmap.icon_new_attention);
|
||||
mAttenedDrawable = ContextCompat.getDrawable(this, R.drawable.ic_attened);
|
||||
|
||||
mBinding.userInfoSvgaCar.clearAnimation();
|
||||
mBinding.userInfoSvgaCar.setVisibility(View.GONE);
|
||||
mSVGAParser = new SVGAParser(this);
|
||||
|
||||
if (AuthModel.get().getCurrentUid() == userId) {
|
||||
identityState = IdentityState.OWN;
|
||||
mBinding.tvAttentionCount.setOnClickListener(this);
|
||||
mBinding.tvUserAttentionText.setOnClickListener(this);
|
||||
|
||||
mBinding.tvFansCount.setOnClickListener(this);
|
||||
mBinding.tvUserFanText.setOnClickListener(this);
|
||||
setWhereVisible(false);
|
||||
|
||||
if (bottomViewLayout != null)
|
||||
bottomViewLayout.setVisibility(View.GONE);
|
||||
@@ -275,7 +242,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
} else {
|
||||
identityState = IdentityState.OTHER;
|
||||
}
|
||||
setWhereVisible(true);
|
||||
|
||||
|
||||
if (bottomViewLayout == null) {
|
||||
View view = mBinding.vsBottomLayout.getViewStub().inflate();
|
||||
@@ -302,7 +269,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
if (reason != null) {
|
||||
ChatRoomKickOutEvent.ChatRoomKickOutReason kickOutReason = reason.getReason();
|
||||
if (kickOutReason == ChatRoomKickOutEvent.ChatRoomKickOutReason.CHAT_ROOM_INVALID) {
|
||||
setUserRoomVisible(false);
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -316,6 +283,8 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setEditButton(int identityState, boolean isExpanded) {
|
||||
|
||||
if (identityState == IdentityState.OWN) {
|
||||
@@ -340,21 +309,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
mBinding.tvUserInfoTitle.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 找到TA, 主态不展示
|
||||
*/
|
||||
private void setWhereVisible(boolean visible) {
|
||||
mBinding.viewLineTwo.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
mBinding.llWhere.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* TA的房间, 主态不展示
|
||||
*/
|
||||
private void setUserRoomVisible(boolean visible) {
|
||||
mBinding.viewLineThree.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
mBinding.llUserRoom.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private void onFindViews() {
|
||||
mBinding.tbUserInfo.setTitle("");
|
||||
@@ -363,7 +318,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
tabInfoList.add(new TabInfo(TAB_DYNAMIC, "动态"));
|
||||
tabInfoList.add(new TabInfo(TAB_INFORMATION, "资料"));
|
||||
tabInfoList.add(new TabInfo(TAB_GIFT, "礼物"));
|
||||
tabInfoList.add(new TabInfo(TAB_CAR, "座驾"));
|
||||
|
||||
CommonNavigator commonNavigator = new CommonNavigator(this);
|
||||
commonNavigator.setAdjustMode(true);
|
||||
@@ -393,7 +347,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
mUserDynamicFrg = UserDynamicFrg.newInstance(userId);
|
||||
mUserInfoFragment = UserInfoFragment.newInstance(userId, getIntent().getIntExtra("from", 1));
|
||||
mUserInfoGiftGroupFrg = UserInfoGiftGroupFrg.newInstance();
|
||||
mUserInfoCarFragment = UserInfoCarFragment.newInstance();
|
||||
|
||||
mBinding.vpUserInfo.setOffscreenPageLimit(3);
|
||||
mBinding.vpUserInfo.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@@ -410,8 +363,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
return mUserInfoFragment;
|
||||
} else if (position == TAB_GIFT) {
|
||||
return mUserInfoGiftGroupFrg;
|
||||
} else if (position == TAB_CAR) {
|
||||
return mUserInfoCarFragment;
|
||||
}
|
||||
return mUserInfoFragment;
|
||||
}
|
||||
@@ -436,9 +387,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_HOMEPAGE_GIFT, "个人主页礼物tab-" + temp);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_HOMEPAGE_CAR, "个人主页座驾tab-" + temp);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -451,159 +399,86 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
}
|
||||
}
|
||||
|
||||
private void initUserDetail(UserDetailInfo.DataBean info) {
|
||||
if (null != info) {
|
||||
String nick = RegexUtil.getPrintableString(info.getNick());
|
||||
mBinding.tvNick.setText(nick);
|
||||
mBinding.tvUserInfoTitle.setText(nick);
|
||||
// Drawable drawable = ContextCompat.getDrawable(this,
|
||||
// (info.getGender() == 1) ? R.drawable.ic_gender_male : R.drawable.ic_gender_female);
|
||||
// mBinding.tvNick.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null);
|
||||
mBinding.tvFansCount.setText(String.valueOf(info.getFansNum()));
|
||||
//设置星座
|
||||
// String star = StarUtils.getConstellation(new Date(info.getBirth()));
|
||||
// if (null == star) {
|
||||
// mBinding.tvConstellation.setVisibility(View.GONE);
|
||||
// } else {
|
||||
// mBinding.tvConstellation.setText(star);
|
||||
// mBinding.tvConstellation.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
mBinding.tvErbanId.setText(getString(R.string.me_user_id, info.getErbanNo()));
|
||||
setUserLevel(info.getUserLevelVo());
|
||||
|
||||
// if (info.getNameplate() != null) {
|
||||
// setOfficialMask(info.getNameplate().getFixedWord(), info.getNameplate().getIconPic());
|
||||
// } else {
|
||||
// setOfficialMask("", "");
|
||||
// }
|
||||
|
||||
// if (!TextUtils.isEmpty(info.getAttestationBackPic())) {
|
||||
// ImageLoadUtils.loadImage(this, info.getAttestationBackPic(), mBinding.avatarBg);
|
||||
//
|
||||
// } else {
|
||||
// setBgByLevel(false);
|
||||
// GlideApp.with(this)
|
||||
// .load(info.getAvatar())
|
||||
// .dontAnimate()
|
||||
// .centerInside()
|
||||
// .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
// .listener(new RequestListener<Drawable>() {
|
||||
// @Override
|
||||
// public boolean onLoadFailed(@Nullable GlideException e, Object o,
|
||||
// Target<Drawable> target, boolean b) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean onResourceReady(Drawable drawable, Object o,
|
||||
// Target<Drawable> target, DataSource dataSource, boolean b) {
|
||||
// drawable.setColorFilter(context.getResources().getColor(R.color.black_transparent_20), PorterDuff.Mode.DARKEN);
|
||||
// ViewTarget<ImageView, Drawable> viewTarget = (ViewTarget<ImageView, Drawable>) target;
|
||||
// viewTarget.getView().setImageDrawable(drawable);
|
||||
// return true;
|
||||
// }
|
||||
// })
|
||||
// // “23”:设置模糊度(在0.0到25.0之间),默认”25";"4":图片缩放比例,默认“1”。
|
||||
// .transforms(new BlurTransformation(context, 10, 1))
|
||||
// .into(mBinding.avatarBg);
|
||||
// }
|
||||
|
||||
// if (null == star) {
|
||||
// mBinding.tvConstellation.setVisibility(View.GONE);
|
||||
// } else {
|
||||
// mBinding.tvConstellation.setText(star);
|
||||
// mBinding.tvConstellation.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
|
||||
if (AuthModel.get().getCurrentUid() != info.getUid()) {
|
||||
PraiseModel.get().isPraised(AuthModel.get().getCurrentUid(), info.getUid()).subscribe();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initData(UserInfo userInfo) {
|
||||
if (null != userInfo) {
|
||||
UserInfoUiMgr.get().setValue(userInfo);
|
||||
|
||||
ImageLoadUtils.loadBigAvatar(this, userInfo.getAvatar(), mBinding.imageView, false);
|
||||
|
||||
requestRoomInfo(userInfo);
|
||||
|
||||
String nick = RegexUtil.getPrintableString(userInfo.getNick());
|
||||
mBinding.tvNick.setText(nick);
|
||||
mBinding.tvUserInfoTitle.setText(nick);
|
||||
Drawable drawable = ContextCompat.getDrawable(this,
|
||||
(userInfo.getGender() == 1) ? R.drawable.ic_gender_male : R.drawable.ic_gender_female);
|
||||
mBinding.tvNick.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null);
|
||||
|
||||
mBinding.tvAttentionCount.setText(String.valueOf(userInfo.getFollowNum()));
|
||||
mBinding.tvFansCount.setText(String.valueOf(userInfo.getFansNum()));
|
||||
|
||||
//设置星座
|
||||
String star = StarUtils.getConstellation(new Date(userInfo.getBirth()));
|
||||
if (null == star) {
|
||||
mBinding.tvConstellation.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.tvConstellation.setText(star);
|
||||
mBinding.tvConstellation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mBinding.tvErbanId.setText(getString(R.string.me_user_id, userInfo.getErbanNo()));
|
||||
setUserLevel(userInfo.getUserLevelVo());
|
||||
|
||||
if (userInfo.getNameplate() != null) {
|
||||
setOfficialMask(userInfo.getNameplate().getFixedWord(), userInfo.getNameplate().getIconPic());
|
||||
} else {
|
||||
setOfficialMask("", "");
|
||||
}
|
||||
|
||||
NobleInfo nobleInfo = userInfo.getNobleInfo();
|
||||
HeadWearInfo headWearInfo = userInfo.getUserHeadwear();
|
||||
if (!TextUtils.isEmpty(userInfo.getAttestationBackPic())) {
|
||||
ImageLoadUtils.loadImage(this, userInfo.getAttestationBackPic(), mBinding.avatarBg);
|
||||
|
||||
} else if (nobleInfo != null) {
|
||||
setBgByLevel(true);
|
||||
String zoneBg = nobleInfo.getZoneBg();
|
||||
if (TextUtils.isEmpty(zoneBg)) {
|
||||
ImageLoadUtils.loadImage(this, userInfo.getAvatar(), mBinding.avatarBg);
|
||||
} else {
|
||||
ImageLoadUtils.loadImage(this, zoneBg, mBinding.avatarBg);
|
||||
}
|
||||
NobleUtil.loadResource(
|
||||
NobleUtil.getBadgeByLevel(nobleInfo.getLevel()), mBinding.ivUserNobleLevel);
|
||||
} else {
|
||||
setBgByLevel(false);
|
||||
mBinding.ivUserNobleLevel.setImageDrawable(null);
|
||||
GlideApp.with(this)
|
||||
.load(userInfo.getAvatar())
|
||||
.dontAnimate()
|
||||
.centerInside()
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.listener(new RequestListener<Drawable>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, Object o,
|
||||
Target<Drawable> target, boolean b) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onResourceReady(Drawable drawable, Object o,
|
||||
Target<Drawable> target, DataSource dataSource, boolean b) {
|
||||
drawable.setColorFilter(context.getResources().getColor(R.color.black_transparent_20), PorterDuff.Mode.DARKEN);
|
||||
ViewTarget<ImageView, Drawable> viewTarget = (ViewTarget<ImageView, Drawable>) target;
|
||||
viewTarget.getView().setImageDrawable(drawable);
|
||||
return true;
|
||||
}
|
||||
})
|
||||
// “23”:设置模糊度(在0.0到25.0之间),默认”25";"4":图片缩放比例,默认“1”。
|
||||
.transforms(new BlurTransformation(context, 10, 1))
|
||||
.into(mBinding.avatarBg);
|
||||
}
|
||||
setHeadWare(headWearInfo, nobleInfo);
|
||||
|
||||
//设置靓号
|
||||
boolean hasPrettyErbanNo = userInfo.isHasPrettyErbanNo();
|
||||
mBinding.ivGoodNumber.setVisibility(hasPrettyErbanNo ? View.VISIBLE : View.GONE);
|
||||
// 设置官字
|
||||
mBinding.ivUserOfficial.setVisibility(userInfo.isOfficial() ? View.VISIBLE : View.GONE);
|
||||
// 设置新字
|
||||
mBinding.ivUserNew.setVisibility(userInfo.isNewUser() ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (null == star) {
|
||||
mBinding.tvConstellation.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.tvConstellation.setText(star);
|
||||
mBinding.tvConstellation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
//设置地址
|
||||
String address = null;
|
||||
if (null != userInfo.getUserExpand() && userInfo.getUserExpand().isShowLocation()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String province = userInfo.getUserExpand().getProvinceName();
|
||||
if (!TextUtils.isEmpty(province)) {
|
||||
sb.append(" ").append(province);
|
||||
}
|
||||
String city = userInfo.getUserExpand().getCityName();
|
||||
if (!TextUtils.isEmpty(city)) {
|
||||
sb.append(" ").append(city);
|
||||
}
|
||||
if (sb.length() != 0) {
|
||||
address = sb.toString();
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(address)) {
|
||||
mBinding.tvAddress.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.tvAddress.setText(address);
|
||||
mBinding.tvAddress.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
if (AuthModel.get().getCurrentUid() != userInfo.getUid()) {
|
||||
PraiseModel.get().isPraised(AuthModel.get().getCurrentUid(), userInfo.getUid()).subscribe();
|
||||
}
|
||||
|
||||
mUserInfoFragment.onGetUserInfo(userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void requestRoomInfo(UserInfo userInfo) {
|
||||
AvRoomModel.get().requestRoomInfoByUser(String.valueOf(userInfo.getUid()))
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(roomInfo -> onGetRoomInfo(roomInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 自选头饰 -> 贵族头饰 -> 无
|
||||
*/
|
||||
private void setHeadWare(HeadWearInfo headWearInfo, NobleInfo nobleInfo) {
|
||||
mBinding.ivAvatarHeadWear.setImageDrawable(null);
|
||||
mBinding.ivAvatarHeadWear.setVisibility(View.GONE);
|
||||
|
||||
if (headWearInfo != null) {
|
||||
mBinding.ivAvatarHeadWear.setVisibility(View.VISIBLE);
|
||||
NobleUtil.loadHeadWear(headWearInfo.getPic(), mBinding.ivAvatarHeadWear);
|
||||
return;
|
||||
}
|
||||
|
||||
if (nobleInfo != null) {
|
||||
mBinding.ivAvatarHeadWear.setVisibility(View.VISIBLE);
|
||||
NobleUtil.loadResource(nobleInfo.getHeadWear(), mBinding.ivAvatarHeadWear);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void setUserLevel(UserLevelVo userLevelVo) {
|
||||
private void setUserLevel(UserDetailInfo.DataBean.UserLevelVoBean userLevelVo) {
|
||||
mBinding.ivUserCharm.setVisibility(View.GONE);
|
||||
mBinding.ivUserLevel.setVisibility(View.GONE);
|
||||
if (userLevelVo != null) {
|
||||
@@ -622,11 +497,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
|
||||
private void setBgByLevel(boolean isNoble) {
|
||||
this.isNoble = isNoble;
|
||||
mBinding.ivUserNobleLevel.setVisibility(isNoble ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) mBinding.ivUserNobleLevel.getLayoutParams();
|
||||
layoutParams.width = isNoble ? SizeUtils.dp2px(this, 17f) : 0;
|
||||
layoutParams.height = isNoble ? SizeUtils.dp2px(this, 17f) : 0;
|
||||
|
||||
int nobleTextColor = ContextCompat.getColor(this, R.color.white_op_30);
|
||||
mBinding.tvConstellation.setTextColor(isNoble ? nobleTextColor : Color.WHITE);
|
||||
@@ -716,24 +586,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
case R.id.iv_edit:
|
||||
editClick(identityState);
|
||||
break;
|
||||
case R.id.tv_attention_count:
|
||||
case R.id.tv_user_attention_text:
|
||||
Intent intent = new Intent(mActivity, FansListActivity.class);
|
||||
intent.putExtra(FansListActivity.IS_ATTENT, true);
|
||||
startActivity(intent);
|
||||
break;
|
||||
|
||||
case R.id.tv_fans_count:
|
||||
case R.id.tv_user_fan_text:
|
||||
startActivity(new Intent(mActivity, FansListActivity.class));
|
||||
break;
|
||||
|
||||
case R.id.ll_user_room:
|
||||
if (mRoomInfo != null) {
|
||||
LogUtil.i(Companion.TAG, "进入的房间: " + mRoomInfo.getUid());
|
||||
AVRoomActivity.start(this, mRoomInfo.getUid(), mRoomInfo.getType());
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.send_msg_layout:
|
||||
NimUserInfo nimUserInfo = NimUserInfoCache.getInstance().getUserInfo(String.valueOf(userId));
|
||||
@@ -753,94 +605,11 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.attention_layout:
|
||||
if (userInfo == null) {
|
||||
toast("用户信息为空。");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mIslike) {
|
||||
boolean isMyFriend = IMFriendModel.get().isMyFriend(String.valueOf(userInfo.getUid()));
|
||||
String tip = (isMyFriend) ? "取消关注将不再是好友关系,确定取消关注?" : "确定取消关注?";
|
||||
getDialogManager().showOkCancelDialog(tip, true, new DialogManager.OkCancelDialogListener() {
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
getDialogManager().dismissDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOk() {
|
||||
getDialogManager().dismissDialog();
|
||||
getDialogManager().showProgressDialog(mActivity, getString(R.string.waiting_text));
|
||||
PraiseModel.get().praise(userInfo.getUid(), false).subscribe();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.guest_page_follow, "客态页-关注");
|
||||
getDialogManager().showProgressDialog(mActivity, getString(R.string.waiting_text));
|
||||
PraiseModel.get().praise(userInfo.getUid(), true).subscribe();
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.ll_where:
|
||||
getDialogManager().showProgressDialog(this, "请稍后...");
|
||||
AvRoomModel.get()
|
||||
.getUserRoom(userId)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe((roomResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
onGetUserRoomFail(throwable.getMessage());
|
||||
} else if (roomResult != null && roomResult.isSuccess()) {
|
||||
onGetUserRoom(roomResult.getData());
|
||||
} else if (roomResult != null && !roomResult.isSuccess()) {
|
||||
onGetUserRoomFail(roomResult.getError());
|
||||
} else {
|
||||
onGetUserRoomFail("未知错误");
|
||||
}
|
||||
});
|
||||
// /**************** 测试代码 **************/
|
||||
// AVRoomActivity.start(this, 91, mRoomInfo!!.type)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void onGetRoomInfo(RoomInfo roomInfo) {
|
||||
if (roomInfo == null) {
|
||||
//该用户还未开房间
|
||||
setUserRoomVisible(false);
|
||||
return;
|
||||
}
|
||||
//已经存在的activity
|
||||
if (mRoomInfo != null && mRoomInfo.getRoomId() == roomInfo.getRoomId()) {
|
||||
mRoomInfo = roomInfo;
|
||||
} else if (mRoomInfo == null) {
|
||||
//打开新的activity的时候
|
||||
mRoomInfo = roomInfo;
|
||||
}
|
||||
setUserRoomVisible(roomInfo.isValid() && identityState != IdentityState.OWN);
|
||||
}
|
||||
|
||||
public void onGetUserRoom(RoomInfo roomInfo) {
|
||||
getDialogManager().dismissDialog();
|
||||
RoomInfo current = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo != null && roomInfo.getUid() > 0) {
|
||||
if (current != null) {
|
||||
if (current.getUid() == roomInfo.getUid()) {
|
||||
toast("已经和对方在同一个房间");
|
||||
return;
|
||||
}
|
||||
}
|
||||
AVRoomActivity.start(this, roomInfo.getUid(), roomInfo.getType());
|
||||
} else {
|
||||
toast("对方不在房间内");
|
||||
}
|
||||
}
|
||||
|
||||
public void onGetUserRoomFail(String msg) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(msg);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onIsLiked(IsLikedEvent event) {
|
||||
@@ -875,10 +644,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
|
||||
if (mBinding.userInfoSvgaCar.isAnimating()) {
|
||||
mBinding.userInfoSvgaCar.clearAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -12,6 +12,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.trello.rxlifecycle2.android.FragmentEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
@@ -46,6 +47,7 @@ import com.yizhuan.xchat_android_core.utils.StringUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.LogUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -288,7 +290,8 @@ public class UserInfoFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
setHallData(userInfo);
|
||||
setGameInfo();
|
||||
|
||||
// setGameInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -369,6 +372,7 @@ public class UserInfoFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
@SuppressWarnings("CheckResult")
|
||||
|
||||
private void setGameInfo() {
|
||||
UserModel.get().getGameWeek(userId)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
@@ -0,0 +1,940 @@
|
||||
package com.yizhuan.erban.ui.user;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.bumptech.glide.request.target.ViewTarget;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.netease.nim.uikit.impl.cache.NimUserInfoCache;
|
||||
import com.netease.nim.uikit.support.glide.GlideApp;
|
||||
import com.netease.nimlib.sdk.RequestCallbackWrapper;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomKickOutEvent;
|
||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.audio.RecordingVoiceActivity;
|
||||
import com.yizhuan.erban.avroom.ButtonItemFactory;
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.base.BaseBindingActivity;
|
||||
import com.yizhuan.erban.common.widget.dialog.CommonPopupDialog;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.erban.community.user_dynamic.UserDynamicFrg;
|
||||
import com.yizhuan.erban.databinding.ActivityUserInfoBinding;
|
||||
import com.yizhuan.erban.databinding.ActivityUserInfoOldBinding;
|
||||
import com.yizhuan.erban.family.view.activity.FamilyHomeActivity;
|
||||
import com.yizhuan.erban.family.view.activity.FamilyMemberListActivity;
|
||||
import com.yizhuan.erban.family.view.activity.FamilyMemberSearchActivity;
|
||||
import com.yizhuan.erban.ui.im.avtivity.NimFriendModel;
|
||||
import com.yizhuan.erban.ui.im.avtivity.NimP2PMessageActivity;
|
||||
import com.yizhuan.erban.ui.relation.FansListActivity;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.ui.widget.ButtonItem;
|
||||
import com.yizhuan.erban.ui.widget.ObservableScrollView;
|
||||
import com.yizhuan.erban.ui.widget.UserMagicIndicator;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||
import com.yizhuan.erban.utils.AppBarStateChangeListener;
|
||||
import com.yizhuan.erban.utils.BlurTransformation;
|
||||
import com.yizhuan.erban.utils.RegexUtil;
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.decoration.headwear.bean.HeadWearInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.TabInfo;
|
||||
import com.yizhuan.xchat_android_core.im.friend.IMFriendModel;
|
||||
import com.yizhuan.xchat_android_core.level.UserLevelVo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleInfo;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleUtil;
|
||||
import com.yizhuan.xchat_android_core.praise.PraiseModel;
|
||||
import com.yizhuan.xchat_android_core.praise.event.IsLikedEvent;
|
||||
import com.yizhuan.xchat_android_core.praise.event.PraiseEvent;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_core.user.UserInfoUiMgr;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserPhoto;
|
||||
import com.yizhuan.xchat_android_core.user.event.LoginUserInfoUpdateEvent;
|
||||
import com.yizhuan.xchat_android_core.utils.StarUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.SizeUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* create by lvzebiao on 2018/8/31
|
||||
*/
|
||||
|
||||
@ActLayoutRes(R.layout.activity_user_info_old)
|
||||
public class UserInfoOldActivity extends BaseBindingActivity<ActivityUserInfoOldBinding>
|
||||
implements UserPhotoAdapter.ImageClickListener, ObservableScrollView.ScrollViewListener,
|
||||
UserMagicIndicator.OnItemSelectListener {
|
||||
|
||||
public static final int REQUEST_CODE_UPDATE_VOICE = 1;
|
||||
|
||||
private int TAB_SIZE = 4;
|
||||
private int TAB_DYNAMIC = 0;
|
||||
private int TAB_INFORMATION = 1;
|
||||
private int TAB_GIFT = 2;
|
||||
private int TAB_CAR = 3;
|
||||
|
||||
@Override
|
||||
public void onItemSelect(int position) {
|
||||
Log.i("onItemselect", "position:" + position);
|
||||
mBinding.vpUserInfo.setCurrentItem(position);
|
||||
}
|
||||
|
||||
public interface IdentityState {
|
||||
int NON = 0; // 无法识别
|
||||
int OWN = 1; // 自己
|
||||
int OTHER = 2; // 其他人
|
||||
}
|
||||
|
||||
private int identityState = IdentityState.NON;
|
||||
|
||||
private UserInfoOldActivity mActivity;
|
||||
private long userId;
|
||||
private UserInfo userInfo;
|
||||
private SVGAParser mSVGAParser;
|
||||
Drawable mAttenDrawable;
|
||||
Drawable mAttenedDrawable;
|
||||
|
||||
private boolean mIslike = false;
|
||||
private RoomInfo mRoomInfo = null;
|
||||
private int flag = 0;
|
||||
private boolean isNoble;
|
||||
private LinearLayout bottomViewLayout = null;
|
||||
private TextView sendMsgLayout;
|
||||
private TextView attentionLayout;
|
||||
|
||||
private ImageView ivOfficialMask;
|
||||
private TextView tvOfficialMask;
|
||||
|
||||
UserInfoFragment mUserInfoFragment;
|
||||
UserInfoGiftGroupFrg mUserInfoGiftGroupFrg;
|
||||
UserInfoCarFragment mUserInfoCarFragment;
|
||||
UserDynamicFrg mUserDynamicFrg;
|
||||
|
||||
private void onSetListener() {
|
||||
mBinding.ivUserBack.setOnClickListener(this);
|
||||
mBinding.ivEdit.setOnClickListener(this);
|
||||
mBinding.llUserRoom.setOnClickListener(this);
|
||||
mBinding.llWhere.setOnClickListener(this);
|
||||
mBinding.imageView.setOnClickListener(this);
|
||||
|
||||
mBinding.ablUserInfo.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
||||
@Override
|
||||
public void onStateChanged(AppBarLayout appBarLayout, State state) {
|
||||
if (state == State.EXPANDED) {
|
||||
//展开状态
|
||||
setEditButton(identityState, true);
|
||||
setBackBottom(true);
|
||||
setTitleVisible(false);
|
||||
|
||||
} else if (state == State.COLLAPSED) {
|
||||
//折叠状态
|
||||
setEditButton(identityState, false);
|
||||
setBackBottom(false);
|
||||
setTitleVisible(true);
|
||||
|
||||
} else {
|
||||
//中间状态
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
mActivity = this;
|
||||
userId = getIntent().getLongExtra("userId", 0);
|
||||
UserInfoUiMgr.get().setUid(userId);
|
||||
|
||||
onFindViews();
|
||||
onSetListener();
|
||||
EventBus.getDefault().register(this);
|
||||
|
||||
mSVGAParser = new SVGAParser(this);
|
||||
UserModel.get().getUserInfoFromServer(userId)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new BeanObserver<UserInfo>() {
|
||||
@Override
|
||||
public void onErrorMsg(String error) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(UserInfo Info) {
|
||||
userInfo = Info;
|
||||
//这里座驾只显示一次
|
||||
if (userInfo.getCarInfo() != null && userInfo.getCarInfo().isUsing()) {
|
||||
try {
|
||||
mSVGAParser.parse(new URL(userInfo.getCarInfo().getEffect()), new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
mBinding.userInfoSvgaCar.setVisibility(View.VISIBLE);
|
||||
mBinding.userInfoSvgaCar.setLoops(1);
|
||||
Drawable drawable = new SVGADrawable(videoItem);
|
||||
mBinding.userInfoSvgaCar.setImageDrawable(drawable);
|
||||
mBinding.userInfoSvgaCar.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
mBinding.userInfoSvgaCar.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
initData(userInfo);
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.userInfoSvgaCar.setCallback(new SVGACallback() {
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinished() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRepeat() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStep(int i, double v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mAttenDrawable = ContextCompat.getDrawable(this, R.mipmap.icon_new_attention);
|
||||
mAttenedDrawable = ContextCompat.getDrawable(this, R.drawable.ic_attened);
|
||||
|
||||
mBinding.userInfoSvgaCar.clearAnimation();
|
||||
mBinding.userInfoSvgaCar.setVisibility(View.GONE);
|
||||
mSVGAParser = new SVGAParser(this);
|
||||
|
||||
if (AuthModel.get().getCurrentUid() == userId) {
|
||||
identityState = IdentityState.OWN;
|
||||
mBinding.tvAttentionCount.setOnClickListener(this);
|
||||
mBinding.tvUserAttentionText.setOnClickListener(this);
|
||||
mBinding.tvFansCount.setOnClickListener(this);
|
||||
mBinding.tvUserFanText.setOnClickListener(this);
|
||||
setWhereVisible(false);
|
||||
|
||||
if (bottomViewLayout != null)
|
||||
bottomViewLayout.setVisibility(View.GONE);
|
||||
} else {
|
||||
if (userId == NimP2PMessageActivity.SECRETARY_UID || userId == NimP2PMessageActivity.SYSTEM_MESSAGE_UID) {
|
||||
identityState = IdentityState.NON;
|
||||
} else {
|
||||
identityState = IdentityState.OTHER;
|
||||
}
|
||||
setWhereVisible(true);
|
||||
|
||||
if (bottomViewLayout == null) {
|
||||
View view = mBinding.vsBottomLayout.getViewStub().inflate();
|
||||
bottomViewLayout = view.findViewById(R.id.bottom_view_layout);
|
||||
sendMsgLayout = view.findViewById(R.id.send_msg_layout);
|
||||
attentionLayout = view.findViewById(R.id.attention_layout);
|
||||
sendMsgLayout.setOnClickListener(this);
|
||||
attentionLayout.setOnClickListener(this);
|
||||
}
|
||||
|
||||
bottomViewLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
setEditButton(identityState, true);
|
||||
setBackBottom(true);
|
||||
setTitleVisible(false);
|
||||
|
||||
mCompositeDisposable.add(IMNetEaseManager.get().getChatRoomEventObservable()
|
||||
.subscribe(roomEvent -> {
|
||||
if (roomEvent != null) {
|
||||
switch (roomEvent.getEvent()) {
|
||||
case RoomEvent.KICK_OUT_ROOM:
|
||||
ChatRoomKickOutEvent reason = roomEvent.getReason();
|
||||
if (reason != null) {
|
||||
ChatRoomKickOutEvent.ChatRoomKickOutReason kickOutReason = reason.getReason();
|
||||
if (kickOutReason == ChatRoomKickOutEvent.ChatRoomKickOutReason.CHAT_ROOM_INVALID) {
|
||||
setUserRoomVisible(false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
if (mBinding.inOfficialMask != null) {
|
||||
ivOfficialMask = mBinding.inOfficialMask.findViewById(R.id.iv_official_mask);
|
||||
tvOfficialMask = mBinding.inOfficialMask.findViewById(R.id.tv_official_mask);
|
||||
}
|
||||
}
|
||||
|
||||
private void setEditButton(int identityState, boolean isExpanded) {
|
||||
|
||||
if (identityState == IdentityState.OWN) {
|
||||
mBinding.ivEdit.setVisibility(View.VISIBLE);
|
||||
mBinding.ivEdit.setImageResource(isExpanded ? R.drawable.icon_user_info_edit : R.drawable.icon_edit_black);
|
||||
|
||||
} else if (identityState == IdentityState.OTHER) {
|
||||
mBinding.ivEdit.setVisibility(View.VISIBLE);
|
||||
mBinding.ivEdit.setImageResource(isExpanded ? R.drawable.icon_home_page_more : R.drawable.icon_home_page_more_black);
|
||||
|
||||
} else {
|
||||
mBinding.ivEdit.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void setBackBottom(boolean isExpanded) {
|
||||
mBinding.ivUserBack.setImageResource(isExpanded ? R.drawable.icon_user_back : R.drawable.icon_user_back_black);
|
||||
}
|
||||
|
||||
private void setTitleVisible(boolean visible) {
|
||||
mBinding.tvUserInfoTitle.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 找到TA, 主态不展示
|
||||
*/
|
||||
private void setWhereVisible(boolean visible) {
|
||||
mBinding.viewLineTwo.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
mBinding.llWhere.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* TA的房间, 主态不展示
|
||||
*/
|
||||
private void setUserRoomVisible(boolean visible) {
|
||||
mBinding.viewLineThree.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
mBinding.llUserRoom.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private void onFindViews() {
|
||||
mBinding.tbUserInfo.setTitle("");
|
||||
|
||||
List<TabInfo> tabInfoList = new ArrayList<>(TAB_SIZE);
|
||||
tabInfoList.add(new TabInfo(TAB_DYNAMIC, "动态"));
|
||||
tabInfoList.add(new TabInfo(TAB_INFORMATION, "资料"));
|
||||
tabInfoList.add(new TabInfo(TAB_GIFT, "礼物"));
|
||||
tabInfoList.add(new TabInfo(TAB_CAR, "座驾"));
|
||||
|
||||
CommonNavigator commonNavigator = new CommonNavigator(this);
|
||||
commonNavigator.setAdjustMode(true);
|
||||
UserMagicIndicator indicator = new UserMagicIndicator(this, tabInfoList, 0);
|
||||
indicator.setOnItemSelectListener(this);
|
||||
commonNavigator.setAdapter(indicator);
|
||||
mBinding.miUserInfo.setNavigator(commonNavigator);
|
||||
mBinding.vpUserInfo.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
mBinding.miUserInfo.onPageScrolled(position, positionOffset, positionOffsetPixels);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
mBinding.miUserInfo.onPageSelected(position);
|
||||
setStatistic(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
mBinding.miUserInfo.onPageScrollStateChanged(state);
|
||||
}
|
||||
});
|
||||
|
||||
mUserDynamicFrg = UserDynamicFrg.newInstance(userId);
|
||||
mUserInfoFragment = UserInfoFragment.newInstance(userId, getIntent().getIntExtra("from", 1));
|
||||
mUserInfoGiftGroupFrg = UserInfoGiftGroupFrg.newInstance();
|
||||
mUserInfoCarFragment = UserInfoCarFragment.newInstance();
|
||||
|
||||
mBinding.vpUserInfo.setOffscreenPageLimit(3);
|
||||
mBinding.vpUserInfo.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@Override
|
||||
public int getCount() {
|
||||
return TAB_SIZE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
if (position == TAB_DYNAMIC) {
|
||||
return mUserDynamicFrg;
|
||||
} else if (position == TAB_INFORMATION) {
|
||||
return mUserInfoFragment;
|
||||
} else if (position == TAB_GIFT) {
|
||||
return mUserInfoGiftGroupFrg;
|
||||
} else if (position == TAB_CAR) {
|
||||
return mUserInfoCarFragment;
|
||||
}
|
||||
return mUserInfoFragment;
|
||||
}
|
||||
});
|
||||
mBinding.vpUserInfo.setCurrentItem(0);
|
||||
setStatistic(0);
|
||||
}
|
||||
|
||||
// 埋点
|
||||
private void setStatistic(int position) {
|
||||
String temp = AuthModel.get().getCurrentUid() == userId ? "主态" : "客态";
|
||||
switch (position) {
|
||||
case 0:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_HOMEPAGE_MOMENT, "个人主页动态tab-" + temp);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_HOMEPAGE_DATA, "个人主页资料tab-" + temp);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_HOMEPAGE_GIFT, "个人主页礼物tab-" + temp);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_HOMEPAGE_CAR, "个人主页座驾tab-" + temp);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onCurrentUserInfoUpdate(LoginUserInfoUpdateEvent event) {
|
||||
if (UserModel.get().getCacheLoginUserInfo().getUid() == userId) {
|
||||
userInfo = UserModel.get().getCacheLoginUserInfo();
|
||||
initData(userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void initData(UserInfo userInfo) {
|
||||
if (null != userInfo) {
|
||||
UserInfoUiMgr.get().setValue(userInfo);
|
||||
|
||||
ImageLoadUtils.loadBigAvatar(this, userInfo.getAvatar(), mBinding.imageView, false);
|
||||
|
||||
requestRoomInfo(userInfo);
|
||||
|
||||
String nick = RegexUtil.getPrintableString(userInfo.getNick());
|
||||
mBinding.tvNick.setText(nick);
|
||||
mBinding.tvUserInfoTitle.setText(nick);
|
||||
Drawable drawable = ContextCompat.getDrawable(this,
|
||||
(userInfo.getGender() == 1) ? R.drawable.ic_gender_male : R.drawable.ic_gender_female);
|
||||
mBinding.tvNick.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null);
|
||||
|
||||
mBinding.tvAttentionCount.setText(String.valueOf(userInfo.getFollowNum()));
|
||||
mBinding.tvFansCount.setText(String.valueOf(userInfo.getFansNum()));
|
||||
|
||||
//设置星座
|
||||
String star = StarUtils.getConstellation(new Date(userInfo.getBirth()));
|
||||
if (null == star) {
|
||||
mBinding.tvConstellation.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.tvConstellation.setText(star);
|
||||
mBinding.tvConstellation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mBinding.tvErbanId.setText(getString(R.string.me_user_id, userInfo.getErbanNo()));
|
||||
setUserLevel(userInfo.getUserLevelVo());
|
||||
|
||||
if (userInfo.getNameplate() != null) {
|
||||
setOfficialMask(userInfo.getNameplate().getFixedWord(), userInfo.getNameplate().getIconPic());
|
||||
} else {
|
||||
setOfficialMask("", "");
|
||||
}
|
||||
|
||||
NobleInfo nobleInfo = userInfo.getNobleInfo();
|
||||
HeadWearInfo headWearInfo = userInfo.getUserHeadwear();
|
||||
if (!TextUtils.isEmpty(userInfo.getAttestationBackPic())) {
|
||||
ImageLoadUtils.loadImage(this, userInfo.getAttestationBackPic(), mBinding.avatarBg);
|
||||
|
||||
} else if (nobleInfo != null) {
|
||||
setBgByLevel(true);
|
||||
String zoneBg = nobleInfo.getZoneBg();
|
||||
if (TextUtils.isEmpty(zoneBg)) {
|
||||
ImageLoadUtils.loadImage(this, userInfo.getAvatar(), mBinding.avatarBg);
|
||||
} else {
|
||||
ImageLoadUtils.loadImage(this, zoneBg, mBinding.avatarBg);
|
||||
}
|
||||
NobleUtil.loadResource(
|
||||
NobleUtil.getBadgeByLevel(nobleInfo.getLevel()), mBinding.ivUserNobleLevel);
|
||||
} else {
|
||||
setBgByLevel(false);
|
||||
mBinding.ivUserNobleLevel.setImageDrawable(null);
|
||||
GlideApp.with(this)
|
||||
.load(userInfo.getAvatar())
|
||||
.dontAnimate()
|
||||
.centerInside()
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.listener(new RequestListener<Drawable>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, Object o,
|
||||
Target<Drawable> target, boolean b) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onResourceReady(Drawable drawable, Object o,
|
||||
Target<Drawable> target, DataSource dataSource, boolean b) {
|
||||
drawable.setColorFilter(context.getResources().getColor(R.color.black_transparent_20), PorterDuff.Mode.DARKEN);
|
||||
ViewTarget<ImageView, Drawable> viewTarget = (ViewTarget<ImageView, Drawable>) target;
|
||||
viewTarget.getView().setImageDrawable(drawable);
|
||||
return true;
|
||||
}
|
||||
})
|
||||
// “23”:设置模糊度(在0.0到25.0之间),默认”25";"4":图片缩放比例,默认“1”。
|
||||
.transforms(new BlurTransformation(context, 10, 1))
|
||||
.into(mBinding.avatarBg);
|
||||
}
|
||||
setHeadWare(headWearInfo, nobleInfo);
|
||||
|
||||
//设置靓号
|
||||
boolean hasPrettyErbanNo = userInfo.isHasPrettyErbanNo();
|
||||
mBinding.ivGoodNumber.setVisibility(hasPrettyErbanNo ? View.VISIBLE : View.GONE);
|
||||
// 设置官字
|
||||
mBinding.ivUserOfficial.setVisibility(userInfo.isOfficial() ? View.VISIBLE : View.GONE);
|
||||
// 设置新字
|
||||
mBinding.ivUserNew.setVisibility(userInfo.isNewUser() ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (null == star) {
|
||||
mBinding.tvConstellation.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.tvConstellation.setText(star);
|
||||
mBinding.tvConstellation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
//设置地址
|
||||
String address = null;
|
||||
if (null != userInfo.getUserExpand() && userInfo.getUserExpand().isShowLocation()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String province = userInfo.getUserExpand().getProvinceName();
|
||||
if (!TextUtils.isEmpty(province)) {
|
||||
sb.append(" ").append(province);
|
||||
}
|
||||
String city = userInfo.getUserExpand().getCityName();
|
||||
if (!TextUtils.isEmpty(city)) {
|
||||
sb.append(" ").append(city);
|
||||
}
|
||||
if (sb.length() != 0) {
|
||||
address = sb.toString();
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(address)) {
|
||||
mBinding.tvAddress.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.tvAddress.setText(address);
|
||||
mBinding.tvAddress.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
if (AuthModel.get().getCurrentUid() != userInfo.getUid()) {
|
||||
PraiseModel.get().isPraised(AuthModel.get().getCurrentUid(), userInfo.getUid()).subscribe();
|
||||
}
|
||||
|
||||
mUserInfoFragment.onGetUserInfo(userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void requestRoomInfo(UserInfo userInfo) {
|
||||
AvRoomModel.get().requestRoomInfoByUser(String.valueOf(userInfo.getUid()))
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(roomInfo -> onGetRoomInfo(roomInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 自选头饰 -> 贵族头饰 -> 无
|
||||
*/
|
||||
private void setHeadWare(HeadWearInfo headWearInfo, NobleInfo nobleInfo) {
|
||||
mBinding.ivAvatarHeadWear.setImageDrawable(null);
|
||||
mBinding.ivAvatarHeadWear.setVisibility(View.GONE);
|
||||
|
||||
if (headWearInfo != null) {
|
||||
mBinding.ivAvatarHeadWear.setVisibility(View.VISIBLE);
|
||||
NobleUtil.loadHeadWear(headWearInfo.getPic(), mBinding.ivAvatarHeadWear);
|
||||
return;
|
||||
}
|
||||
|
||||
if (nobleInfo != null) {
|
||||
mBinding.ivAvatarHeadWear.setVisibility(View.VISIBLE);
|
||||
NobleUtil.loadResource(nobleInfo.getHeadWear(), mBinding.ivAvatarHeadWear);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void setUserLevel(UserLevelVo userLevelVo) {
|
||||
mBinding.ivUserCharm.setVisibility(View.GONE);
|
||||
mBinding.ivUserLevel.setVisibility(View.GONE);
|
||||
if (userLevelVo != null) {
|
||||
String userLevelUrl = userLevelVo.getExperUrl();
|
||||
String userCharmUrl = userLevelVo.getCharmUrl();
|
||||
if (!TextUtils.isEmpty(userLevelUrl)) {
|
||||
mBinding.ivUserLevel.setVisibility(View.VISIBLE);
|
||||
ImageLoadUtils.loadImage(this, userLevelUrl, mBinding.ivUserLevel);
|
||||
}
|
||||
if (!TextUtils.isEmpty(userCharmUrl)) {
|
||||
mBinding.ivUserCharm.setVisibility(View.VISIBLE);
|
||||
ImageLoadUtils.loadImage(this, userCharmUrl, mBinding.ivUserCharm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setBgByLevel(boolean isNoble) {
|
||||
this.isNoble = isNoble;
|
||||
mBinding.ivUserNobleLevel.setVisibility(isNoble ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) mBinding.ivUserNobleLevel.getLayoutParams();
|
||||
layoutParams.width = isNoble ? SizeUtils.dp2px(this, 17f) : 0;
|
||||
layoutParams.height = isNoble ? SizeUtils.dp2px(this, 17f) : 0;
|
||||
|
||||
int nobleTextColor = ContextCompat.getColor(this, R.color.white_op_30);
|
||||
mBinding.tvConstellation.setTextColor(isNoble ? nobleTextColor : Color.WHITE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollChanged(NestedScrollView view, int x, int y, int oldx, int oldy) {
|
||||
if (flag == 0 && oldy > 300) {
|
||||
flag = 1;
|
||||
boolean isNoble = (userInfo != null && userInfo.getNobleInfo() != null);
|
||||
mBinding.ivEdit.setImageResource(
|
||||
(isNoble) ? R.drawable.icon_user_info_edit : R.drawable.icon_edit_black);
|
||||
} else if (flag == 1 && oldy <= 300) {
|
||||
flag = 0;
|
||||
mBinding.ivEdit.setImageResource(R.drawable.icon_user_info_edit);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void click(int position, UserPhoto userPhoto, boolean isOwner) {
|
||||
if (isOwner) {
|
||||
if (position > 0) {
|
||||
showUserPhoto(position - 1);
|
||||
} else {
|
||||
UIHelper.showModifyPhotosAct(this, userId);
|
||||
}
|
||||
} else {
|
||||
//创建一个集合拿来做用户所有照片信息
|
||||
showUserPhoto(position);
|
||||
}
|
||||
}
|
||||
|
||||
private void showUserPhoto(int position) {
|
||||
//创建一个集合拿来做用户所有照片信息
|
||||
ArrayList<UserPhoto> userPhotos = new ArrayList<>();
|
||||
List<UserPhoto> realmList = userInfo.getPrivatePhoto();
|
||||
for (UserPhoto photo : realmList) {
|
||||
UserPhoto newPhoto = new UserPhoto();
|
||||
newPhoto.setPid(photo.getPid());
|
||||
newPhoto.setPhotoUrl(photo.getPhotoUrl());
|
||||
userPhotos.add(newPhoto);
|
||||
}
|
||||
Intent intent = new Intent(mActivity, ShowPhotoActivity.class);
|
||||
intent.putExtra("position", position);
|
||||
intent.putExtra("photoList", userPhotos);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void editClick(int identityState) {
|
||||
if (identityState == IdentityState.OWN) {
|
||||
UIHelper.showUserInfoModifyAct(this, REQUEST_CODE_UPDATE_VOICE, userId);
|
||||
} else if (identityState == IdentityState.OTHER) {
|
||||
if (userInfo != null) {
|
||||
String account = String.valueOf(userInfo.getUid());
|
||||
boolean inMyBlackList = NimFriendModel.get().isInMyBlackList(account);
|
||||
List<ButtonItem> buttonItems = new ArrayList<>();
|
||||
if (!inMyBlackList) {
|
||||
ButtonItem blackListItem = ButtonItemFactory.createAddToBlackListItem(
|
||||
getDialogManager(), account);
|
||||
buttonItems.add(blackListItem);
|
||||
}
|
||||
ButtonItem reportItem = ButtonItemFactory.createReportItem(context, userInfo.getUid(), XChatConstants.REPORT_TYPE_PERSONAL);
|
||||
buttonItems.add(reportItem);
|
||||
new CommonPopupDialog(this, "", buttonItems, "取消", false).show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void avatarClick(int identityState) {
|
||||
if (identityState == IdentityState.OWN) {
|
||||
UIHelper.showUserInfoModifyAct(this, REQUEST_CODE_UPDATE_VOICE, userId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_user_back:
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.imageView:
|
||||
avatarClick(identityState);
|
||||
break;
|
||||
|
||||
case R.id.iv_edit:
|
||||
editClick(identityState);
|
||||
break;
|
||||
case R.id.tv_attention_count:
|
||||
case R.id.tv_user_attention_text:
|
||||
Intent intent = new Intent(mActivity, FansListActivity.class);
|
||||
intent.putExtra(FansListActivity.IS_ATTENT, true);
|
||||
startActivity(intent);
|
||||
break;
|
||||
|
||||
case R.id.tv_fans_count:
|
||||
case R.id.tv_user_fan_text:
|
||||
startActivity(new Intent(mActivity, FansListActivity.class));
|
||||
break;
|
||||
|
||||
case R.id.ll_user_room:
|
||||
if (mRoomInfo != null) {
|
||||
LogUtil.i(Companion.TAG, "进入的房间: " + mRoomInfo.getUid());
|
||||
AVRoomActivity.start(this, mRoomInfo.getUid(), mRoomInfo.getType());
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.send_msg_layout:
|
||||
NimUserInfo nimUserInfo = NimUserInfoCache.getInstance().getUserInfo(String.valueOf(userId));
|
||||
if (nimUserInfo != null) {
|
||||
NimP2PMessageActivity.start(this, String.valueOf(userId));
|
||||
} else {
|
||||
NimUserInfoCache.getInstance().getUserInfoFromRemote(String.valueOf(userId), new RequestCallbackWrapper<NimUserInfo>() {
|
||||
@Override
|
||||
public void onResult(int code, NimUserInfo result, Throwable exception) {
|
||||
if (code == 200) {
|
||||
NimP2PMessageActivity.start(mActivity, String.valueOf(userId));
|
||||
} else {
|
||||
toast("网络异常,请重试");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.attention_layout:
|
||||
if (userInfo == null) {
|
||||
toast("用户信息为空。");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mIslike) {
|
||||
boolean isMyFriend = IMFriendModel.get().isMyFriend(String.valueOf(userInfo.getUid()));
|
||||
String tip = (isMyFriend) ? "取消关注将不再是好友关系,确定取消关注?" : "确定取消关注?";
|
||||
getDialogManager().showOkCancelDialog(tip, true, new DialogManager.OkCancelDialogListener() {
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
getDialogManager().dismissDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOk() {
|
||||
getDialogManager().dismissDialog();
|
||||
getDialogManager().showProgressDialog(mActivity, getString(R.string.waiting_text));
|
||||
PraiseModel.get().praise(userInfo.getUid(), false).subscribe();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.guest_page_follow, "客态页-关注");
|
||||
getDialogManager().showProgressDialog(mActivity, getString(R.string.waiting_text));
|
||||
PraiseModel.get().praise(userInfo.getUid(), true).subscribe();
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.ll_where:
|
||||
getDialogManager().showProgressDialog(this, "请稍后...");
|
||||
AvRoomModel.get()
|
||||
.getUserRoom(userId)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe((roomResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
onGetUserRoomFail(throwable.getMessage());
|
||||
} else if (roomResult != null && roomResult.isSuccess()) {
|
||||
onGetUserRoom(roomResult.getData());
|
||||
} else if (roomResult != null && !roomResult.isSuccess()) {
|
||||
onGetUserRoomFail(roomResult.getError());
|
||||
} else {
|
||||
onGetUserRoomFail("未知错误");
|
||||
}
|
||||
});
|
||||
// /**************** 测试代码 **************/
|
||||
// AVRoomActivity.start(this, 91, mRoomInfo!!.type)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void onGetRoomInfo(RoomInfo roomInfo) {
|
||||
if (roomInfo == null) {
|
||||
//该用户还未开房间
|
||||
setUserRoomVisible(false);
|
||||
return;
|
||||
}
|
||||
//已经存在的activity
|
||||
if (mRoomInfo != null && mRoomInfo.getRoomId() == roomInfo.getRoomId()) {
|
||||
mRoomInfo = roomInfo;
|
||||
} else if (mRoomInfo == null) {
|
||||
//打开新的activity的时候
|
||||
mRoomInfo = roomInfo;
|
||||
}
|
||||
setUserRoomVisible(roomInfo.isValid() && identityState != IdentityState.OWN);
|
||||
}
|
||||
|
||||
public void onGetUserRoom(RoomInfo roomInfo) {
|
||||
getDialogManager().dismissDialog();
|
||||
RoomInfo current = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo != null && roomInfo.getUid() > 0) {
|
||||
if (current != null) {
|
||||
if (current.getUid() == roomInfo.getUid()) {
|
||||
toast("已经和对方在同一个房间");
|
||||
return;
|
||||
}
|
||||
}
|
||||
AVRoomActivity.start(this, roomInfo.getUid(), roomInfo.getType());
|
||||
} else {
|
||||
toast("对方不在房间内");
|
||||
}
|
||||
}
|
||||
|
||||
public void onGetUserRoomFail(String msg) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(msg);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onIsLiked(IsLikedEvent event) {
|
||||
setLikedText(event.isLiked);
|
||||
}
|
||||
|
||||
private void setLikedText(boolean isliked) {
|
||||
mIslike = isliked;
|
||||
attentionLayout.setCompoundDrawablesWithIntrinsicBounds(
|
||||
(!isliked) ? mAttenDrawable : mAttenedDrawable, null, null, null);
|
||||
attentionLayout.setCompoundDrawablePadding((isliked) ? 0 : SizeUtils.dp2px(this, 5f));
|
||||
attentionLayout.setText(getString((isliked) ? R.string.already_attention : R.string.attention));
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onPraise(PraiseEvent event) {
|
||||
if (event.getLikedUid() != userId ||
|
||||
userId == AuthModel.get().getCurrentUid()) {
|
||||
return;
|
||||
}
|
||||
if (event.isFailed()) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(event.getError());
|
||||
return;
|
||||
}
|
||||
getDialogManager().dismissDialog();
|
||||
toast(event.isPraise() ? R.string.fan_success : R.string.cancel_fan_success);
|
||||
setLikedText(event.isPraise());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
|
||||
if (mBinding.userInfoSvgaCar.isAnimating()) {
|
||||
mBinding.userInfoSvgaCar.clearAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (resultCode == RESULT_OK) {
|
||||
if (requestCode == REQUEST_CODE_UPDATE_VOICE) {
|
||||
String audioFileUrl = data.getStringExtra(RecordingVoiceActivity.AUDIO_FILE);
|
||||
int audioDuration = data.getIntExtra(RecordingVoiceActivity.AUDIO_DURA, 0);
|
||||
if (mUserInfoFragment != null) {
|
||||
mUserInfoFragment.refreshVoiceDataView(audioFileUrl, audioDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setOfficialMask(String name, String icon) {
|
||||
if (!TextUtils.isEmpty(name) && !TextUtils.isEmpty(icon)) {
|
||||
mBinding.inOfficialMask.setVisibility(View.VISIBLE);
|
||||
|
||||
if (tvOfficialMask != null && ivOfficialMask != null) {
|
||||
tvOfficialMask.setText(name);
|
||||
NobleUtil.loadResource(icon, ivOfficialMask);
|
||||
}
|
||||
|
||||
} else {
|
||||
mBinding.inOfficialMask.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* static静态代码
|
||||
*/
|
||||
|
||||
public final static class Companion {
|
||||
public final static String TAG = UserInfoOldActivity.class.getSimpleName();
|
||||
|
||||
static final int FROM_TYPE_NORMAL = 1;
|
||||
static final int FROM_TYPE_FAMILY = 2;
|
||||
|
||||
public static void start(Context context, long userId) {
|
||||
Intent intent = new Intent(context, UserInfoOldActivity.class);
|
||||
intent.putExtra("userId", userId);
|
||||
int from = FROM_TYPE_NORMAL;
|
||||
if (context instanceof FamilyHomeActivity
|
||||
|| context instanceof FamilyMemberListActivity
|
||||
|| context instanceof FamilyMemberSearchActivity) {
|
||||
//这里限制循环访问, 例如:家族->个人主页->家族->个人主页->....
|
||||
from = FROM_TYPE_FAMILY;
|
||||
}
|
||||
intent.putExtra("from", from);
|
||||
context.startActivity(intent);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -212,12 +212,12 @@ public class JewelActivity extends BaseActivity {
|
||||
public void initData() {
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null) {
|
||||
setDiamondNum(walletInfo.diamondNum);
|
||||
setDiamondNum(walletInfo.diamonds);
|
||||
}
|
||||
PayModel.get().getWalletInfo(AuthModel.get().getCurrentUid())
|
||||
.subscribe(info -> {
|
||||
if (info != null) {
|
||||
setDiamondNum(info.diamondNum);
|
||||
setDiamondNum(info.diamonds);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -226,7 +226,7 @@ public class JewelActivity extends BaseActivity {
|
||||
public void onGetWalletInfo(GetWalletInfoEvent event) {
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null) {
|
||||
setDiamondNum(walletInfo.diamondNum);
|
||||
setDiamondNum(walletInfo.diamonds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ public class JewelActivity extends BaseActivity {
|
||||
public void onWalletInfoUpdate(UpdateWalletInfoEvent event) {
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null)
|
||||
setDiamondNum(walletInfo.diamondNum);
|
||||
setDiamondNum(walletInfo.diamonds);
|
||||
}
|
||||
|
||||
private void setDiamondNum(double diamondNum) {
|
||||
|
@@ -155,12 +155,12 @@ public class JewelFragment extends BaseFragment {
|
||||
public void initiate() {
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null) {
|
||||
setDiamondNum(walletInfo.diamondNum);
|
||||
setDiamondNum(walletInfo.diamonds);
|
||||
}
|
||||
PayModel.get().getWalletInfo(AuthModel.get().getCurrentUid())
|
||||
.subscribe(info -> {
|
||||
if (info != null) {
|
||||
setDiamondNum(info.diamondNum);
|
||||
setDiamondNum(info.diamonds);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class JewelFragment extends BaseFragment {
|
||||
public void onGetWalletInfo(GetWalletInfoEvent event) {
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null) {
|
||||
setDiamondNum(walletInfo.diamondNum);
|
||||
setDiamondNum(walletInfo.diamonds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ public class JewelFragment extends BaseFragment {
|
||||
public void onWalletInfoUpdate(UpdateWalletInfoEvent event) {
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null)
|
||||
setDiamondNum(walletInfo.diamondNum);
|
||||
setDiamondNum(walletInfo.diamonds);
|
||||
}
|
||||
|
||||
private void setDiamondNum(double diamondNum) {
|
||||
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 16 KiB |
@@ -4,5 +4,5 @@
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
|
||||
<corners android:radius="8dp" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
@@ -257,14 +257,34 @@
|
||||
android:text="确认充值"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/charge_agreement"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_999999"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_agreement"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/agreement"
|
||||
android:textColor="@color/appColor"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@@ -50,6 +50,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_avatar"
|
||||
android:layout_width="@dimen/dp_drag_layout_avatar_size"
|
||||
@@ -79,6 +80,7 @@
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_drag_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
@@ -22,7 +22,7 @@
|
||||
android:layout_marginTop="@dimen/dp_23"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="71dp"
|
||||
android:layout_height="71dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_pm_top" />
|
||||
|
||||
<TextView
|
||||
@@ -41,6 +41,7 @@
|
||||
android:textColor="@color/color_333333"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -346,6 +346,7 @@
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:text="@string/privacy_setting"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_F9F9F9"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
@@ -44,332 +45,6 @@
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="101.5dp"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_duration"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/bg_user_info_audio"
|
||||
android:gravity="center"
|
||||
android:minWidth="79dp"
|
||||
android:paddingEnd="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:drawableLeft="@drawable/ic_user_info_play"
|
||||
tools:text="10”" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginEnd="6.5dp"
|
||||
android:layout_marginBottom="6.5dp">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="67dp"
|
||||
android:layout_gravity="center"
|
||||
tools:src="@drawable/default_user_head" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_avatar_head_wear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
tools:src="@mipmap/ic_user_avatar_level_king" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/ll_id"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:drawablePadding="@dimen/space_normal"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:drawableRight="@drawable/ic_gender_male"
|
||||
tools:text="King天地为asdasdasdasdsadsadsad" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/ll_level"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_official"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@mipmap/ic_user_official_13dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@mipmap/ic_user_new_13dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_good_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@mipmap/ic_pretty_account_13dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_erban_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:textColor="@color/color_F5F5F5"
|
||||
android:textSize="13sp"
|
||||
tools:text="ID:7958626" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:drawableStart="@drawable/ic_user_info_address"
|
||||
android:textColor="#fff5f5f5"
|
||||
android:textSize="12sp"
|
||||
tools:text="广东 广州"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_level"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/ll_fans_attention"
|
||||
android:layout_marginBottom="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user_noble_level"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
tools:src="@mipmap/ic_user_level_king" />
|
||||
|
||||
<include
|
||||
android:id="@+id/in_official_mask"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
layout="@layout/layout_official_mask"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_level"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="visible"
|
||||
tools:src="@mipmap/ic_user_level" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_charm"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="visible"
|
||||
tools:src="@drawable/ic_user_charm_level" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_constellation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/shape_58559d"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
tools:text="金牛座" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_fans_attention"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/v_bottom_divider"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_attention_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
tools:text="9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_attention_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/attention"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line_fan"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fans_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
tools:text="19" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_fan_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/fan"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line_two"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_where"
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:src="@drawable/icon_user_where_new" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="找到TA"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line_three"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_user_room"
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:src="@drawable/icon_user_room_new" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="TA的房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_bottom_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/bg_view_half_radiu" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -419,11 +94,140 @@
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_corner_shadow_12"
|
||||
android:padding="@dimen/dp_15"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:drawablePadding="@dimen/space_normal"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
tools:drawableRight="@drawable/ic_gender_male"
|
||||
tools:text="King天地为asdasdasdasdsadsadsad"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_level"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nick"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_level"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="visible"
|
||||
tools:src="@mipmap/ic_user_level" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_charm"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="visible"
|
||||
tools:src="@drawable/ic_user_charm_level" />
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/in_official_mask"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
layout="@layout/layout_official_mask"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_constellation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/shape_58559d"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
tools:text="金牛座" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_level"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_erban_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="11sp"
|
||||
tools:text="ID:7958626" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fans_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="13sp"
|
||||
tools:text="19" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_fan_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:text="@string/fan"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="11sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
@@ -434,7 +238,6 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
@@ -445,12 +248,19 @@
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/vp_user_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="66星球
请刷新页面,如果一直出现这个界面可能是你浏览器版本过低

true
" />
|
||||
</androidx.viewpager.widget.ViewPager>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/vs_bottom_layout"
|
||||
@@ -460,13 +270,7 @@
|
||||
android:layout="@layout/user_info_bottom_layout"
|
||||
app:layout_behavior="com.yizhuan.erban.ui.user.ScrollAwareBehavior" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/user_info_svga_car"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="346dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:visibility="gone"
|
||||
app:autoPlay="true" />
|
||||
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
473
app/src/main/res/layout/activity_user_info_old.xml
Normal file
@@ -0,0 +1,473 @@
|
||||
<?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.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/abl_user_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
app:contentScrim="@color/white"
|
||||
app:expandedTitleMarginEnd="64dp"
|
||||
app:expandedTitleMarginStart="48dp"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="256dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginTop="48dp"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="101.5dp"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_duration"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/bg_user_info_audio"
|
||||
android:gravity="center"
|
||||
android:minWidth="79dp"
|
||||
android:paddingEnd="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:drawableLeft="@drawable/ic_user_info_play"
|
||||
tools:text="10”" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginEnd="6.5dp"
|
||||
android:layout_marginBottom="6.5dp">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="67dp"
|
||||
android:layout_gravity="center"
|
||||
tools:src="@drawable/default_user_head" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_avatar_head_wear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
tools:src="@mipmap/ic_user_avatar_level_king" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/ll_id"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:drawablePadding="@dimen/space_normal"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:drawableRight="@drawable/ic_gender_male"
|
||||
tools:text="King天地为asdasdasdasdsadsadsad" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/ll_level"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_official"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@mipmap/ic_user_official_13dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@mipmap/ic_user_new_13dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_good_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@mipmap/ic_pretty_account_13dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_erban_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:textColor="@color/color_F5F5F5"
|
||||
android:textSize="13sp"
|
||||
tools:text="ID:7958626" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:drawableStart="@drawable/ic_user_info_address"
|
||||
android:textColor="#fff5f5f5"
|
||||
android:textSize="12sp"
|
||||
tools:text="广东 广州"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_level"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/ll_fans_attention"
|
||||
android:layout_marginBottom="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user_noble_level"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
tools:src="@mipmap/ic_user_level_king" />
|
||||
|
||||
<include
|
||||
android:id="@+id/in_official_mask"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
layout="@layout/layout_official_mask"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_level"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="visible"
|
||||
tools:src="@mipmap/ic_user_level" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_charm"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="visible"
|
||||
tools:src="@drawable/ic_user_charm_level" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_constellation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/shape_58559d"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
tools:text="金牛座" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_fans_attention"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/v_bottom_divider"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_attention_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
tools:text="9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_attention_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/attention"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line_fan"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fans_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19sp"
|
||||
tools:text="19" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_fan_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/fan"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line_two"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_where"
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:src="@drawable/icon_user_where_new" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="找到TA"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line_three"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_user_room"
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:src="@drawable/icon_user_room_new" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="TA的房间"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_bottom_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/bg_view_half_radiu" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/tb_user_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:visibility="visible"
|
||||
app:contentInsetStart="0dp"
|
||||
app:layout_collapseMode="pin">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/icon_user_back" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_info_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16sp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_edit"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/icon_home_page_more" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/bottom_view_layout"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_user_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/vp_user_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/vs_bottom_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="74dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout="@layout/user_info_bottom_layout"
|
||||
app:layout_behavior="com.yizhuan.erban.ui.user.ScrollAwareBehavior" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/user_info_svga_car"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="346dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:visibility="gone"
|
||||
app:autoPlay="true" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
@@ -10,16 +10,15 @@
|
||||
android:background="@drawable/shape_white_corner_8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="71dp"
|
||||
android:layout_height="71dp"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/icon_pm_top" />
|
||||
|
||||
@@ -29,6 +28,7 @@
|
||||
android:text="青少年保护"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:textColor="@color/color_333333"
|
||||
/>
|
||||
<TextView
|
||||
@@ -52,7 +52,7 @@
|
||||
android:paddingEnd="@dimen/dp_31"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/bg_common_confirm_normal_22r"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
@@ -66,7 +66,7 @@
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="55dp"
|
||||
android:minHeight="48dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@@ -77,13 +77,14 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"/>
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_8"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_follow_room"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -93,7 +94,7 @@
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
/>
|
||||
@@ -101,7 +102,7 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_room_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center"
|
||||
android:text="更多房间"
|
||||
android:onClick="@{click}"
|
||||
@@ -114,10 +115,10 @@
|
||||
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
<com.yizhuan.erban.ui.widget.ContentWrapViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="270dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_indicator"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -132,6 +133,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
>
|
||||
|
||||
<com.jude.rollviewpager.RollPagerView
|
||||
|
@@ -10,7 +10,7 @@
|
||||
android:paddingTop="2dp"
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
/>
|
||||
|
||||
|
@@ -6,9 +6,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:layout_width="108dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginTop="1.5dp"
|
||||
android:layout_marginStart="@dimen/margin_home_tab_gride"
|
||||
android:layout_marginEnd="@dimen/margin_home_tab_gride"
|
||||
android:layout_marginBottom="@dimen/margin_home_tab_gride"
|
||||
android:background="@drawable/bg_corner_shadow_12"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -24,26 +24,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:riv_corner_radius="@dimen/dp_12"
|
||||
android:scaleType="fitCenter"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_erban_grid_empty" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:text="虚位以待"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/color_A6A6A6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</com.yizhuan.erban.ui.widget.SquareLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@@ -6,9 +6,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:layout_width="108dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginTop="1.5dp"
|
||||
android:layout_marginStart="@dimen/margin_home_tab_gride"
|
||||
android:layout_marginEnd="@dimen/margin_home_tab_gride"
|
||||
android:layout_marginBottom="@dimen/margin_home_tab_gride"
|
||||
android:background="@drawable/bg_corner_shadow_12"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -91,7 +91,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
tools:text="房间名称"
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 64 KiB |
@@ -214,4 +214,5 @@
|
||||
<dimen name="login_btn_padding">75dp</dimen>
|
||||
<dimen name="dp_100">100dp</dimen>
|
||||
|
||||
<dimen name="margin_home_tab_gride">1.5dp</dimen>
|
||||
</resources>
|
||||
|
@@ -145,7 +145,7 @@
|
||||
|
||||
|
||||
<!--我的页面-->
|
||||
<string name="me_user_id">66星球号:%d</string>
|
||||
<string name="me_user_id">66号:%d</string>
|
||||
<string name="my_attention">我的关注</string>
|
||||
<string name="my_fan">我的粉丝</string>
|
||||
|
||||
@@ -877,6 +877,8 @@
|
||||
<string name="diamond">钻石</string>
|
||||
<string name="join">加入</string>
|
||||
<string name="pm_detail">《66星球护苗计划》</string>
|
||||
<string name="charge_agreement">已阅读并同意</string>
|
||||
<string name="agreement">《用户充值协议》</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
@@ -226,6 +226,15 @@ public class UriProvider {
|
||||
return JAVA_WEB_URL.concat("/accompany/index.html#/MyIncome");
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户充值协议
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getRechargeAgreementUrl() {
|
||||
return JAVA_WEB_URL.concat("/accompany/modules/rule/rechargeAgreement.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 66星球专属,101技能认证页面
|
||||
*
|
||||
|
@@ -13,9 +13,9 @@ import android.os.Parcelable;
|
||||
public class WalletInfo implements Parcelable {
|
||||
public long uid;
|
||||
/** 总金币(贵族+普通)数量 */
|
||||
public double goldNum;
|
||||
public double golds;
|
||||
/** 钻石数量 */
|
||||
public double diamondNum;
|
||||
public double diamonds;
|
||||
/** 预扣款(押金) */
|
||||
public double depositNum;
|
||||
public int amount;
|
||||
@@ -34,8 +34,8 @@ public class WalletInfo implements Parcelable {
|
||||
|
||||
protected WalletInfo(Parcel in) {
|
||||
uid = in.readLong();
|
||||
goldNum = in.readDouble();
|
||||
diamondNum = in.readDouble();
|
||||
golds = in.readDouble();
|
||||
diamonds = in.readDouble();
|
||||
depositNum = in.readDouble();
|
||||
amount = in.readInt();
|
||||
chargeGoldNum = in.readDouble();
|
||||
@@ -45,8 +45,8 @@ public class WalletInfo implements Parcelable {
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeLong(uid);
|
||||
dest.writeDouble(goldNum);
|
||||
dest.writeDouble(diamondNum);
|
||||
dest.writeDouble(golds);
|
||||
dest.writeDouble(diamonds);
|
||||
dest.writeDouble(depositNum);
|
||||
dest.writeInt(amount);
|
||||
dest.writeDouble(chargeGoldNum);
|
||||
@@ -71,11 +71,11 @@ public class WalletInfo implements Parcelable {
|
||||
};
|
||||
|
||||
public double getDiamondNum() {
|
||||
return diamondNum;
|
||||
return diamonds;
|
||||
}
|
||||
|
||||
public void setDiamondNum(double diamondNum) {
|
||||
this.diamondNum = diamondNum;
|
||||
this.diamonds = diamondNum;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,11 +88,11 @@ public class WalletInfo implements Parcelable {
|
||||
}
|
||||
|
||||
public double getGoldNum() {
|
||||
return goldNum;
|
||||
return golds;
|
||||
}
|
||||
|
||||
public void setGoldNum(double goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
this.golds = goldNum;
|
||||
}
|
||||
|
||||
public double getDepositNum() {
|
||||
@@ -115,8 +115,8 @@ public class WalletInfo implements Parcelable {
|
||||
public String toString() {
|
||||
return "WalletInfo{" +
|
||||
"uid=" + uid +
|
||||
", goldNum=" + goldNum +
|
||||
", diamondNum=" + diamondNum +
|
||||
", goldNum=" + golds +
|
||||
", diamondNum=" + diamonds +
|
||||
", depositNum=" + depositNum +
|
||||
", amount=" + amount +
|
||||
'}';
|
||||
|
@@ -5,9 +5,11 @@ import androidx.annotation.Nullable;
|
||||
import com.yizhuan.xchat_android_core.base.IModel;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomHistoryInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftAchievementInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.NewUserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftWallInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserDetailInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserGameInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserRandomConfig;
|
||||
@@ -60,12 +62,20 @@ public interface IUserModel extends IModel {
|
||||
|
||||
/**
|
||||
* 根据uid 从服务器获取用户详细信息。
|
||||
*
|
||||
*旧的
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Single<UserInfo> getUserInfoFromServer(long userId);
|
||||
|
||||
/**
|
||||
* 根据uid 从服务器获取用户详细信息。
|
||||
*66新的
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Single<UserDetailInfo> getUserInfoDetail(long userId);
|
||||
|
||||
/**
|
||||
* 根据 批量 Uid 去我们后台获取用户的具体信息
|
||||
*
|
||||
|
@@ -15,12 +15,14 @@ import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.bean.response.result.GiftWallListResult;
|
||||
import com.yizhuan.xchat_android_core.bean.response.result.UserListResult;
|
||||
import com.yizhuan.xchat_android_core.bean.response.result.UserResult;
|
||||
import com.yizhuan.xchat_android_core.community.CommunityConstant;
|
||||
import com.yizhuan.xchat_android_core.level.event.CharmLevelUpEvent;
|
||||
import com.yizhuan.xchat_android_core.level.event.LevelUpEvent;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleUtil;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftAchievementInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftWallInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.NewUserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserDetailInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserGameInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserRandomConfig;
|
||||
@@ -287,6 +289,18 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<UserDetailInfo> getUserInfoDetail(long uid) {
|
||||
return api.getUserInfoDetail(String.valueOf(uid))
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.flatMap(userDetailInfo -> {
|
||||
UserDetailInfo userInfo = userDetailInfo;
|
||||
if (null == userInfo) {
|
||||
return Single.error(new Exception("服务器返回的userInfo字段为空"));
|
||||
}
|
||||
return Single.just(userInfo);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据 云信的Uid 去我们后台获取用户的具体信息
|
||||
@@ -622,6 +636,7 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
.compose(RxHelper.singleMainResult());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Single<String> useOrDelete(long id, int status) {
|
||||
return api.useOrDeleteTag(id, status)
|
||||
@@ -762,6 +777,9 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
@GET("/user/get")
|
||||
Single<UserResult> requestUserInfo(@Query("uid") String uid);
|
||||
|
||||
@GET("/user/detail/get")
|
||||
Single<UserDetailInfo> getUserInfoDetail(@Query("uid") String uid);
|
||||
|
||||
|
||||
/**
|
||||
* @param key
|
||||
|
@@ -0,0 +1,416 @@
|
||||
package com.yizhuan.xchat_android_core.user.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class UserDetailInfo implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* code : 200
|
||||
* message : success
|
||||
* data : {"uid":935001,"nick":"我是一只小萌新","erbanNo":3894073,"fansNum":1,"userLevelVo":{"experAmount":0,"charmAmount":0,"experUrl":"http://image.doudouyue.com/wealth_01.png","charmUrl":"http://image.doudouyue.com/charm_01.png","experLevelName":"Lv1","charmLevelName":"Lv1","experLevelGrp":"","charmLevelGrp":"","experLevelSeq":1,"charmLevelSeq":1},"userGiftWall":[],"dynamicInfo":[{"uid":935001,"worldId":-1,"content":"哈哈哈哈","likeCount":3,"commentCount":0,"dynamicId":1323,"publishTime":1587613571000,"playCount":0,"type":0,"status":1,"isLike":true,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"测试哦","likeCount":0,"commentCount":0,"dynamicId":1290,"publishTime":1587113734000,"playCount":0,"type":0,"status":0,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"哈哈哈哈","likeCount":1,"commentCount":0,"dynamicId":1260,"publishTime":1587031053000,"playCount":0,"type":0,"status":1,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"哈哈","likeCount":0,"commentCount":0,"dynamicId":1246,"publishTime":1587019900000,"playCount":0,"type":0,"status":0,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"测试","likeCount":0,"commentCount":0,"dynamicId":1234,"publishTime":1586947335000,"playCount":0,"type":0,"status":0,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"}],"privatePhoto":[{"photoUrl":"https://img.erbanyy.com/qingxun_default_avatar.png","seqNo":0},{"pid":1300,"photoUrl":"http://image.doudouyuyin.com/FpaSiFuVl7o0IDV5mWhwsuJoPOO_?imageslim","seqNo":1,"createTime":1587986501000},{"pid":1299,"photoUrl":"http://image.doudouyuyin.com/FlehFmWF3B-u4p5Pl96D-VkH8gYo?imageslim","seqNo":1,"createTime":1587986493000},{"pid":1298,"photoUrl":"http://image.doudouyuyin.com/FgS7jdfiky4712SuV4fb4Cxpe1tV?imageslim","seqNo":1,"createTime":1587986484000}]}
|
||||
*/
|
||||
|
||||
private int code;
|
||||
private String message;
|
||||
private DataBean data;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public DataBean getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataBean data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DataBean {
|
||||
/**
|
||||
* uid : 935001
|
||||
* nick : 我是一只小萌新
|
||||
* erbanNo : 3894073
|
||||
* fansNum : 1
|
||||
* userLevelVo : {"experAmount":0,"charmAmount":0,"experUrl":"http://image.doudouyue.com/wealth_01.png","charmUrl":"http://image.doudouyue.com/charm_01.png","experLevelName":"Lv1","charmLevelName":"Lv1","experLevelGrp":"","charmLevelGrp":"","experLevelSeq":1,"charmLevelSeq":1}
|
||||
* userGiftWall : []
|
||||
* dynamicInfo : [{"uid":935001,"worldId":-1,"content":"哈哈哈哈","likeCount":3,"commentCount":0,"dynamicId":1323,"publishTime":1587613571000,"playCount":0,"type":0,"status":1,"isLike":true,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"测试哦","likeCount":0,"commentCount":0,"dynamicId":1290,"publishTime":1587113734000,"playCount":0,"type":0,"status":0,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"哈哈哈哈","likeCount":1,"commentCount":0,"dynamicId":1260,"publishTime":1587031053000,"playCount":0,"type":0,"status":1,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"哈哈","likeCount":0,"commentCount":0,"dynamicId":1246,"publishTime":1587019900000,"playCount":0,"type":0,"status":0,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"},{"uid":935001,"worldId":-1,"content":"测试","likeCount":0,"commentCount":0,"dynamicId":1234,"publishTime":1586947335000,"playCount":0,"type":0,"status":0,"isLike":false,"nick":"我是一只小萌新","avatar":"https://img.erbanyy.com/qingxun_default_avatar.png"}]
|
||||
* privatePhoto : [{"photoUrl":"https://img.erbanyy.com/qingxun_default_avatar.png","seqNo":0},{"pid":1300,"photoUrl":"http://image.doudouyuyin.com/FpaSiFuVl7o0IDV5mWhwsuJoPOO_?imageslim","seqNo":1,"createTime":1587986501000},{"pid":1299,"photoUrl":"http://image.doudouyuyin.com/FlehFmWF3B-u4p5Pl96D-VkH8gYo?imageslim","seqNo":1,"createTime":1587986493000},{"pid":1298,"photoUrl":"http://image.doudouyuyin.com/FgS7jdfiky4712SuV4fb4Cxpe1tV?imageslim","seqNo":1,"createTime":1587986484000}]
|
||||
*/
|
||||
|
||||
private int uid;
|
||||
private String nick;
|
||||
private int erbanNo;
|
||||
private int fansNum;
|
||||
private UserLevelVoBean userLevelVo;
|
||||
private List<?> userGiftWall;
|
||||
private List<DynamicInfoBean> dynamicInfo;
|
||||
private List<PrivatePhotoBean> privatePhoto;
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getNick() {
|
||||
return nick;
|
||||
}
|
||||
|
||||
public void setNick(String nick) {
|
||||
this.nick = nick;
|
||||
}
|
||||
|
||||
public int getErbanNo() {
|
||||
return erbanNo;
|
||||
}
|
||||
|
||||
public void setErbanNo(int erbanNo) {
|
||||
this.erbanNo = erbanNo;
|
||||
}
|
||||
|
||||
public int getFansNum() {
|
||||
return fansNum;
|
||||
}
|
||||
|
||||
public void setFansNum(int fansNum) {
|
||||
this.fansNum = fansNum;
|
||||
}
|
||||
|
||||
public UserLevelVoBean getUserLevelVo() {
|
||||
return userLevelVo;
|
||||
}
|
||||
|
||||
public void setUserLevelVo(UserLevelVoBean userLevelVo) {
|
||||
this.userLevelVo = userLevelVo;
|
||||
}
|
||||
|
||||
public List<?> getUserGiftWall() {
|
||||
return userGiftWall;
|
||||
}
|
||||
|
||||
public void setUserGiftWall(List<?> userGiftWall) {
|
||||
this.userGiftWall = userGiftWall;
|
||||
}
|
||||
|
||||
public List<DynamicInfoBean> getDynamicInfo() {
|
||||
return dynamicInfo;
|
||||
}
|
||||
|
||||
public void setDynamicInfo(List<DynamicInfoBean> dynamicInfo) {
|
||||
this.dynamicInfo = dynamicInfo;
|
||||
}
|
||||
|
||||
public List<PrivatePhotoBean> getPrivatePhoto() {
|
||||
return privatePhoto;
|
||||
}
|
||||
|
||||
public void setPrivatePhoto(List<PrivatePhotoBean> privatePhoto) {
|
||||
this.privatePhoto = privatePhoto;
|
||||
}
|
||||
|
||||
public static class UserLevelVoBean {
|
||||
/**
|
||||
* experAmount : 0
|
||||
* charmAmount : 0
|
||||
* experUrl : http://image.doudouyue.com/wealth_01.png
|
||||
* charmUrl : http://image.doudouyue.com/charm_01.png
|
||||
* experLevelName : Lv1
|
||||
* charmLevelName : Lv1
|
||||
* experLevelGrp :
|
||||
* charmLevelGrp :
|
||||
* experLevelSeq : 1
|
||||
* charmLevelSeq : 1
|
||||
*/
|
||||
|
||||
private int experAmount;
|
||||
private int charmAmount;
|
||||
private String experUrl;
|
||||
private String charmUrl;
|
||||
private String experLevelName;
|
||||
private String charmLevelName;
|
||||
private String experLevelGrp;
|
||||
private String charmLevelGrp;
|
||||
private int experLevelSeq;
|
||||
private int charmLevelSeq;
|
||||
|
||||
public int getExperAmount() {
|
||||
return experAmount;
|
||||
}
|
||||
|
||||
public void setExperAmount(int experAmount) {
|
||||
this.experAmount = experAmount;
|
||||
}
|
||||
|
||||
public int getCharmAmount() {
|
||||
return charmAmount;
|
||||
}
|
||||
|
||||
public void setCharmAmount(int charmAmount) {
|
||||
this.charmAmount = charmAmount;
|
||||
}
|
||||
|
||||
public String getExperUrl() {
|
||||
return experUrl;
|
||||
}
|
||||
|
||||
public void setExperUrl(String experUrl) {
|
||||
this.experUrl = experUrl;
|
||||
}
|
||||
|
||||
public String getCharmUrl() {
|
||||
return charmUrl;
|
||||
}
|
||||
|
||||
public void setCharmUrl(String charmUrl) {
|
||||
this.charmUrl = charmUrl;
|
||||
}
|
||||
|
||||
public String getExperLevelName() {
|
||||
return experLevelName;
|
||||
}
|
||||
|
||||
public void setExperLevelName(String experLevelName) {
|
||||
this.experLevelName = experLevelName;
|
||||
}
|
||||
|
||||
public String getCharmLevelName() {
|
||||
return charmLevelName;
|
||||
}
|
||||
|
||||
public void setCharmLevelName(String charmLevelName) {
|
||||
this.charmLevelName = charmLevelName;
|
||||
}
|
||||
|
||||
public String getExperLevelGrp() {
|
||||
return experLevelGrp;
|
||||
}
|
||||
|
||||
public void setExperLevelGrp(String experLevelGrp) {
|
||||
this.experLevelGrp = experLevelGrp;
|
||||
}
|
||||
|
||||
public String getCharmLevelGrp() {
|
||||
return charmLevelGrp;
|
||||
}
|
||||
|
||||
public void setCharmLevelGrp(String charmLevelGrp) {
|
||||
this.charmLevelGrp = charmLevelGrp;
|
||||
}
|
||||
|
||||
public int getExperLevelSeq() {
|
||||
return experLevelSeq;
|
||||
}
|
||||
|
||||
public void setExperLevelSeq(int experLevelSeq) {
|
||||
this.experLevelSeq = experLevelSeq;
|
||||
}
|
||||
|
||||
public int getCharmLevelSeq() {
|
||||
return charmLevelSeq;
|
||||
}
|
||||
|
||||
public void setCharmLevelSeq(int charmLevelSeq) {
|
||||
this.charmLevelSeq = charmLevelSeq;
|
||||
}
|
||||
}
|
||||
|
||||
public static class DynamicInfoBean {
|
||||
/**
|
||||
* uid : 935001
|
||||
* worldId : -1
|
||||
* content : 哈哈哈哈
|
||||
* likeCount : 3
|
||||
* commentCount : 0
|
||||
* dynamicId : 1323
|
||||
* publishTime : 1587613571000
|
||||
* playCount : 0
|
||||
* type : 0
|
||||
* status : 1
|
||||
* isLike : true
|
||||
* nick : 我是一只小萌新
|
||||
* avatar : https://img.erbanyy.com/qingxun_default_avatar.png
|
||||
*/
|
||||
|
||||
private int uid;
|
||||
private int worldId;
|
||||
private String content;
|
||||
private int likeCount;
|
||||
private int commentCount;
|
||||
private int dynamicId;
|
||||
private long publishTime;
|
||||
private int playCount;
|
||||
private int type;
|
||||
private int status;
|
||||
private boolean isLike;
|
||||
private String nick;
|
||||
private String avatar;
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getWorldId() {
|
||||
return worldId;
|
||||
}
|
||||
|
||||
public void setWorldId(int worldId) {
|
||||
this.worldId = worldId;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public int getLikeCount() {
|
||||
return likeCount;
|
||||
}
|
||||
|
||||
public void setLikeCount(int likeCount) {
|
||||
this.likeCount = likeCount;
|
||||
}
|
||||
|
||||
public int getCommentCount() {
|
||||
return commentCount;
|
||||
}
|
||||
|
||||
public void setCommentCount(int commentCount) {
|
||||
this.commentCount = commentCount;
|
||||
}
|
||||
|
||||
public int getDynamicId() {
|
||||
return dynamicId;
|
||||
}
|
||||
|
||||
public void setDynamicId(int dynamicId) {
|
||||
this.dynamicId = dynamicId;
|
||||
}
|
||||
|
||||
public long getPublishTime() {
|
||||
return publishTime;
|
||||
}
|
||||
|
||||
public void setPublishTime(long publishTime) {
|
||||
this.publishTime = publishTime;
|
||||
}
|
||||
|
||||
public int getPlayCount() {
|
||||
return playCount;
|
||||
}
|
||||
|
||||
public void setPlayCount(int playCount) {
|
||||
this.playCount = playCount;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public boolean isIsLike() {
|
||||
return isLike;
|
||||
}
|
||||
|
||||
public void setIsLike(boolean isLike) {
|
||||
this.isLike = isLike;
|
||||
}
|
||||
|
||||
public String getNick() {
|
||||
return nick;
|
||||
}
|
||||
|
||||
public void setNick(String nick) {
|
||||
this.nick = nick;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PrivatePhotoBean {
|
||||
/**
|
||||
* photoUrl : https://img.erbanyy.com/qingxun_default_avatar.png
|
||||
* seqNo : 0
|
||||
* pid : 1300
|
||||
* createTime : 1587986501000
|
||||
*/
|
||||
|
||||
private String photoUrl;
|
||||
private int seqNo;
|
||||
private int pid;
|
||||
private long createTime;
|
||||
|
||||
public String getPhotoUrl() {
|
||||
return photoUrl;
|
||||
}
|
||||
|
||||
public void setPhotoUrl(String photoUrl) {
|
||||
this.photoUrl = photoUrl;
|
||||
}
|
||||
|
||||
public int getSeqNo() {
|
||||
return seqNo;
|
||||
}
|
||||
|
||||
public void setSeqNo(int seqNo) {
|
||||
this.seqNo = seqNo;
|
||||
}
|
||||
|
||||
public int getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(int pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|