This commit is contained in:
Martin 2024-08-29 13:59:11 +08:00
parent f03b66364b
commit 10adb60303
13 changed files with 424 additions and 632 deletions

View File

@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.bean.ConfigBean; import com.yunbao.common.bean.ConfigBean;
import com.yunbao.common.bean.FansMedalBean; import com.yunbao.common.bean.FansMedalBean;
import com.yunbao.common.bean.LiveGiftBean;
import com.yunbao.common.bean.NewCommunityType; import com.yunbao.common.bean.NewCommunityType;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.UserItemBean; import com.yunbao.common.bean.UserItemBean;
@ -537,38 +538,32 @@ public class CommonAppConfig {
* 个人中心功能列表 * 个人中心功能列表
*/ */
public List<UserItemBean> getUserItemList() { public List<UserItemBean> getUserItemList() {
if (mUserItemList == null || mUserItemList.size() == 0) {
String userBeanJson = SpUtil.getInstance().getStringValue(SpUtil.USER_INFO); String userBeanJson = SpUtil.getInstance().getStringValue(SpUtil.USER_INFO);
if (!TextUtils.isEmpty(userBeanJson)) { if (!TextUtils.isEmpty(userBeanJson)) {
JSONObject obj = JSON.parseObject(userBeanJson); JSONObject obj = JSON.parseObject(userBeanJson);
if (obj != null) { if (obj != null) {
setUserItemList(obj.getString("list")); setUserItemList(obj.getString("pdl_list"));
} }
} }
return mUserItemList;
}
/**
* 个人中心功能列表
*/
public List<UserItemBean> getUserItemNewList() {
String userBeanJson = SpUtil.getInstance().getStringValue(SpUtil.USER_INFO);
if (!TextUtils.isEmpty(userBeanJson)) {
JSONObject obj = JSON.parseObject(userBeanJson);
if (obj != null) {
setUserItemList(obj.getString("pdl_settings"));
}
} }
return mUserItemList; return mUserItemList;
} }
public void setUserItemList(String listString) { public void setUserItemList(String listString) {
UserItemBean[][] arr = JSON.parseObject(listString, UserItemBean[][].class); mUserItemList = JSON.parseArray(listString, UserItemBean.class);
if (arr != null && arr.length > 0) {
List<UserItemBean> newList = new ArrayList<>();
for (int i = 0, length1 = arr.length; i < length1; i++) {
for (int j = 0, length2 = arr[i].length; j < length2; j++) {
UserItemBean bean = arr[i][j];
if (j == length2 - 1) {
if (i < length1 - 1) {
bean.setGroupLast(true);
} else {
bean.setAllLast(true);
}
}
newList.add(bean);
}
}
mUserItemList = newList;
}
} }

View File

@ -0,0 +1,55 @@
package com.yunbao.common.views;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
/**
* Created by cxf on 2018/1/27.
* RecyclerView顶部渐变的itemDecoration
*/
public class DividerItemDecoration extends RecyclerView.ItemDecoration {
private Drawable mDivider;
public DividerItemDecoration(Context context, int dividerHeight, int dividerColor) {
// 创建一个带有颜色和高度的Drawable作为分割线
mDivider = new ColorDrawable(dividerColor);
// 如果你想让分割线有一定的内边距比如左右边距可以使用LayerDrawable或自定义Drawable
// 这里简单起见我们只设置高度
mDivider.setBounds(0, 0, 0, dividerHeight);
}
@Override
public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) {
drawVertical(c, parent);
}
private void drawVertical(Canvas c, RecyclerView parent) {
final int left = parent.getPaddingLeft();
final int right = parent.getWidth() - parent.getPaddingRight();
final int childCount = parent.getChildCount();
for (int i = 0; i < childCount - 1; i++) {
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
final int top = child.getBottom() + params.bottomMargin;
final int bottom = top + mDivider.getIntrinsicHeight();
mDivider.setBounds(left, top, right, bottom);
mDivider.draw(c);
}
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
if (mDivider == null) return;
outRect.set(0, 0, 0, mDivider.getIntrinsicHeight());
}
}

View File

@ -27,30 +27,6 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@mipmap/beauty_jingbai" /> android:src="@mipmap/beauty_jingbai" />
<RelativeLayout
android:id="@+id/rc_conversation_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true">
<ImageView
android:id="@+id/rc_conversation_unread_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/rc_unread_count_bg_normal" />
<TextView
android:id="@+id/rc_conversation_unread_count"
style="@style/TextStyle.Alignment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="15"
android:textColor="@color/rc_white_color"
android:textSize="@dimen/rc_font_auxiliary_size" />
</RelativeLayout>
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
@ -191,6 +167,39 @@
android:background="@color/rc_divider_color" android:background="@color/rc_divider_color"
app:layout_constraintStart_toStartOf="@id/rc_conversation_title_layout" app:layout_constraintStart_toStartOf="@id/rc_conversation_title_layout"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout
android:id="@+id/rc_conversation_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="5dp"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints">
<ImageView
android:id="@+id/rc_conversation_unread_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/rc_unread_count_bg_normal" />
<TextView
android:id="@+id/rc_conversation_unread_count"
style="@style/TextStyle.Alignment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="15"
android:textColor="@color/rc_white_color"
android:textSize="@dimen/rc_font_auxiliary_size" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -78,4 +78,6 @@
<color name="gray_f6f7fb">#F6F7FB</color> <color name="gray_f6f7fb">#F6F7FB</color>
<color name="gray_F4F4F4">#F4F4F4</color> <color name="gray_F4F4F4">#F4F4F4</color>
<color name="gray_8A8A8A">#FFEFEFEF</color>
</resources> </resources>

View File

@ -0,0 +1,130 @@
package com.yunbao.main.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.bean.UserItemBean;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
import java.util.List;
/**
* Created by cxf on 2018/9/28.
*/
public class MainMeBottomAdapter extends RecyclerView.Adapter<MainMeBottomAdapter.Vh> {
private static final int NORMAL = 0;
private static final int GROUP_LAST = 1;
private static final int ALL_LAST = 2;
private Context mContext;
private List<UserItemBean> mList;
private LayoutInflater mInflater;
private OnItemClickListener<UserItemBean> mOnItemClickListener;
public MainMeBottomAdapter(Context context, List<UserItemBean> list) {
mContext = context;
mList = list;
mInflater = LayoutInflater.from(context);
}
public void setOnItemClickListener(OnItemClickListener<UserItemBean> onItemClickListener) {
mOnItemClickListener = onItemClickListener;
}
@Override
public int getItemViewType(int position) {
UserItemBean bean = mList.get(position);
if (bean.isGroupLast()) {
return GROUP_LAST;
} else if (bean.isAllLast()) {
return ALL_LAST;
} else {
return NORMAL;
}
}
public void setList(List<UserItemBean> list) {
if (list == null) {
return;
}
boolean changed = false;
if (mList.size() != list.size()) {
changed = true;
} else {
for (int i = 0, size = mList.size(); i < size; i++) {
if (!mList.get(i).equals(list.get(i))) {
changed = true;
break;
}
}
}
if (changed) {
mList = list;
notifyDataSetChanged();
}
}
@NonNull
@Override
public Vh onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
int res = 0;
// if (viewType == GROUP_LAST) {
// res = R.layout.item_main_me_1;//竖向单列表
// } else if (viewType == ALL_LAST) {
res = R.layout.item_main_me_3;//横向4列
// } else {
// res = R.layout.item_main_me_0;
// }
return new Vh(mInflater.inflate(res, parent, false));
}
@Override
public void onBindViewHolder(@NonNull Vh vh, int position) {
vh.setData(mList.get(position));
}
@Override
public int getItemCount() {
return mList.size();
}
class Vh extends RecyclerView.ViewHolder {
ImageView mThumb;
TextView mName;
public Vh(View itemView) {
super(itemView);
mThumb = (ImageView) itemView.findViewById(R.id.thumb);
mName = (TextView) itemView.findViewById(R.id.name);
ViewClicksAntiShake.clicksAntiShake(itemView, () -> {
Object tag = itemView.getTag();
if (tag != null) {
UserItemBean bean = (UserItemBean) tag;
if (mOnItemClickListener != null) {
mOnItemClickListener.onItemClick(bean, 0);
}
}
});
}
void setData(UserItemBean bean) {
itemView.setTag(bean);
ImgLoader.display(mContext, bean.getThumb(), mThumb);
mName.setText(bean.getName());
}
}
}

View File

@ -51,7 +51,7 @@ public class MainHttpUtil {
.params("pushid", "") .params("pushid", "")
.params("lastlogindevice", "Android") .params("lastlogindevice", "Android")
.params("uuid_Device", uuid) .params("uuid_Device", uuid)
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh() ? "chinese" : "english")
.execute(callback); .execute(callback);
} }
@ -85,7 +85,7 @@ public class MainHttpUtil {
* 第三方登录---增加参数推广码,手机唯一标识 * 第三方登录---增加参数推广码,手机唯一标识
*/ */
public static void loginByThird(String UserID,String openid, String promoCode, String uuidDevice, String nicename, String avatar, String type, HttpCallback callback) { public static void loginByThird(String UserID, String openid, String promoCode, String uuidDevice, String nicename, String avatar, String type, HttpCallback callback) {
String sign = MD5Util.getMD5("openid=" + openid + "&" + SALT); String sign = MD5Util.getMD5("openid=" + openid + "&" + SALT);
String appSource = "2"; String appSource = "2";
if (CommonAppConfig.IS_GOOGLE_PLAY == 0) { if (CommonAppConfig.IS_GOOGLE_PLAY == 0) {
@ -106,7 +106,7 @@ public class MainHttpUtil {
.params("sign", sign) .params("sign", sign)
.params("lastlogindevice", "Android") .params("lastlogindevice", "Android")
.params("pushid", "") .params("pushid", "")
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh() ? "chinese" : "english")
.execute(callback); .execute(callback);
} }
@ -255,6 +255,7 @@ public class MainHttpUtil {
*/ */
public static void getBaseInfo(String uid, String token, final CommonCallback<UserBean> commonCallback) { public static void getBaseInfo(String uid, String token, final CommonCallback<UserBean> commonCallback) {
HttpClient.getInstance().get("User.getBaseInfos", MainHttpConsts.GET_BASE_INFO) HttpClient.getInstance().get("User.getBaseInfos", MainHttpConsts.GET_BASE_INFO)
.params("is_pdl", "1")
.execute(new HttpCallback() { .execute(new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
@ -265,7 +266,7 @@ public class MainHttpUtil {
bean.setMedalName(obj.getString("medal_name")); bean.setMedalName(obj.getString("medal_name"));
bean.setMedalLevel(obj.getIntValue("medal_level")); bean.setMedalLevel(obj.getIntValue("medal_level"));
CommonAppConfig.getInstance().setUserBean(bean); CommonAppConfig.getInstance().setUserBean(bean);
CommonAppConfig.getInstance().setUserItemList(obj.getString("list")); CommonAppConfig.getInstance().setUserItemList(obj.getString("pdl_list"));
SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, info[0]); SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, info[0]);
if (commonCallback != null) { if (commonCallback != null) {
commonCallback.callback(bean); commonCallback.callback(bean);
@ -338,7 +339,7 @@ public class MainHttpUtil {
public static void getSettingList(HttpCallback callback) { public static void getSettingList(HttpCallback callback) {
HttpClient.getInstance().get("User.getPerSetting", MainHttpConsts.GET_SETTING_LIST) HttpClient.getInstance().get("User.getPerSetting", MainHttpConsts.GET_SETTING_LIST)
.params("version", VersionUtil.getVersion()) .params("version", VersionUtil.getVersion())
.params("package_name","panduo") .params("package_name", "panduo")
.execute(callback); .execute(callback);
} }
@ -352,10 +353,11 @@ public class MainHttpUtil {
.params("p", p) .params("p", p)
.execute(callback); .execute(callback);
} }
/** /**
* 搜索 * 搜索
*/ */
public static void searchnew(String fan_key, String jian_key,int type, int p, HttpCallback callback) { public static void searchnew(String fan_key, String jian_key, int type, int p, HttpCallback callback) {
HttpClient.getInstance().get("", MainHttpConsts.SEARCH) HttpClient.getInstance().get("", MainHttpConsts.SEARCH)
.params("jian_key", jian_key) .params("jian_key", jian_key)
.params("fan_key", fan_key) .params("fan_key", fan_key)
@ -514,7 +516,7 @@ public class MainHttpUtil {
.params("mobile", mobile) .params("mobile", mobile)
.params("sign", sign) .params("sign", sign)
.params("source", "1") .params("source", "1")
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh() ? "chinese" : "english")
.execute(callback); .execute(callback);
} }
@ -537,7 +539,7 @@ public class MainHttpUtil {
.params("MacAddress", macUitl.getNewMac()) .params("MacAddress", macUitl.getNewMac())
.params("Imei", uuid) .params("Imei", uuid)
.params("source", "1") .params("source", "1")
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh() ? "chinese" : "english")
.execute(callback); .execute(callback);
} }
@ -585,7 +587,7 @@ public class MainHttpUtil {
/** /**
* 手机注册接口---增加参数推广码,手机唯一标识,国家代码 * 手机注册接口---增加参数推广码,手机唯一标识,国家代码
*/ */
public static void register(String UserID,String invitecode, String user_login, String promo_code, String uuidDevice, int countryCode, String pass, String pass2, String code, HttpCallback callback) { public static void register(String UserID, String invitecode, String user_login, String promo_code, String uuidDevice, int countryCode, String pass, String pass2, String code, HttpCallback callback) {
String appSource = "2"; String appSource = "2";
if (CommonAppConfig.IS_GOOGLE_PLAY == 0) { if (CommonAppConfig.IS_GOOGLE_PLAY == 0) {
appSource = "2"; appSource = "2";
@ -608,7 +610,7 @@ public class MainHttpUtil {
.params("code", code) .params("code", code)
.params("source", DEVICE) .params("source", DEVICE)
.params("invitation_code", invitecode) .params("invitation_code", invitecode)
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh() ? "chinese" : "english")
.execute(callback); .execute(callback);
} }
@ -621,7 +623,7 @@ public class MainHttpUtil {
.params("user_pass", pass) .params("user_pass", pass)
.params("user_pass2", pass2) .params("user_pass2", pass2)
.params("code", code) .params("code", code)
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh() ? "chinese" : "english")
.execute(callback); .execute(callback);
} }
@ -647,7 +649,7 @@ public class MainHttpUtil {
.params("mobile", mobile) .params("mobile", mobile)
.params("country_code", country_code) .params("country_code", country_code)
.params("source", "1") .params("source", "1")
.params("langue", WordUtil.isNewZh()?"chinese":"english") .params("langue", WordUtil.isNewZh() ? "chinese" : "english")
.execute(callback); .execute(callback);
} }
@ -702,7 +704,6 @@ public class MainHttpUtil {
} }
/** /**
* 是否是主播 * 是否是主播
*/ */
@ -742,9 +743,10 @@ public class MainHttpUtil {
HttpClient.getInstance().get("User.isInstructor", MainHttpConsts.ISINSTRUCTOR) HttpClient.getInstance().get("User.isInstructor", MainHttpConsts.ISINSTRUCTOR)
.execute(callback); .execute(callback);
} }
//
public static void setMessageReadAll(){ //
HttpClient.getInstance().get("User.getUserInstructor","") public static void setMessageReadAll() {
HttpClient.getInstance().get("User.getUserInstructor", "")
.execute(new HttpCallback() { .execute(new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
@ -752,10 +754,11 @@ public class MainHttpUtil {
} }
}); });
} }
/** /**
* 获取设备号有没有注册过 * 获取设备号有没有注册过
*/ */
public static void getDeviceLoginType( HttpCallback callback) { public static void getDeviceLoginType(HttpCallback callback) {
HttpClient.getInstance().get("Login.getDeviceLoginType", "Login.getDeviceLoginType") HttpClient.getInstance().get("Login.getDeviceLoginType", "Login.getDeviceLoginType")
.params("uuid_Device", DeviceUtils.getUniqueDeviceId()) .params("uuid_Device", DeviceUtils.getUniqueDeviceId())
.execute(callback); .execute(callback);

View File

@ -18,6 +18,7 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
@ -51,6 +52,7 @@ import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.AbsMainViewHolder;
import com.yunbao.common.views.DividerItemDecoration;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.activity.LiveRecordActivity; import com.yunbao.live.activity.LiveRecordActivity;
import com.yunbao.live.activity.RoomManageActivity; import com.yunbao.live.activity.RoomManageActivity;
@ -70,6 +72,7 @@ import com.yunbao.main.activity.SettingActivity;
import com.yunbao.main.activity.ThreeDistributActivity; import com.yunbao.main.activity.ThreeDistributActivity;
import com.yunbao.main.activity.ZhuangBanActivity; import com.yunbao.main.activity.ZhuangBanActivity;
import com.yunbao.main.adapter.MainMeAdapter; import com.yunbao.main.adapter.MainMeAdapter;
import com.yunbao.main.adapter.MainMeBottomAdapter;
import com.yunbao.main.http.MainHttpConsts; import com.yunbao.main.http.MainHttpConsts;
import com.yunbao.main.http.MainHttpUtil; import com.yunbao.main.http.MainHttpUtil;
@ -101,7 +104,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
private TextView mFans; private TextView mFans;
private boolean mPaused; private boolean mPaused;
private RecyclerView mRecyclerView; private RecyclerView mRecyclerView;
private RecyclerView bottomRecyclerView;
private MainMeAdapter mAdapter; private MainMeAdapter mAdapter;
private MainMeBottomAdapter mainMeBottomAdapter;
private TextView signature; private TextView signature;
private TextView coin, gold, star_coin;//金豆,钻石,星币 private TextView coin, gold, star_coin;//金豆,钻石,星币
private TextView btnCopy; private TextView btnCopy;
@ -193,6 +198,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView); mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
mRecyclerView.setHasFixedSize(true); mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 4, GridLayoutManager.VERTICAL, false)); mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 4, GridLayoutManager.VERTICAL, false));
banner_me.setOutlineProvider(new ViewOutlineProvider() { banner_me.setOutlineProvider(new ViewOutlineProvider() {
@Override @Override
public void getOutline(View view, Outline outline) { public void getOutline(View view, Outline outline) {
@ -206,6 +212,11 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
mContext.startActivity(new Intent(mContext, EditProfileActivity.class)); mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
} }
}); });
bottomRecyclerView = findViewById(R.id.bottomRecyclerView);
bottomRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
bottomRecyclerView.addItemDecoration(new DividerItemDecoration(mContext,1,mContext.getColor(R.color.gray_8A8A8A)));
} }
@Override @Override
@ -289,15 +300,16 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
@Override @Override
public void callback(UserBean bean) { public void callback(UserBean bean) {
List<UserItemBean> list = CommonAppConfig.getInstance().getUserItemList(); List<UserItemBean> list = CommonAppConfig.getInstance().getUserItemList();
List<UserItemBean> newList = CommonAppConfig.getInstance().getUserItemNewList();
if (bean != null) { if (bean != null) {
showData(bean, list); showData(bean, list,newList);
} }
} }
}; };
private List<SlideBean> mBannerListNew = new ArrayList<>(); private List<SlideBean> mBannerListNew = new ArrayList<>();
private void showData(UserBean u, List<UserItemBean> list) { private void showData(UserBean u, List<UserItemBean> list,List<UserItemBean> newList) {
mBannerList.clear(); mBannerList.clear();
mBannerListNew.clear(); mBannerListNew.clear();
if (!StringUtil.isEmpty(u.getSlide())) { if (!StringUtil.isEmpty(u.getSlide())) {
@ -364,7 +376,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
good_nub_ico.setImageResource(R.mipmap.usercard_good_nub); good_nub_ico.setImageResource(R.mipmap.usercard_good_nub);
ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic); //ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);
//主播等级 //主播等级
tv_level.setOnClickListener(new View.OnClickListener() { tv_level.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -427,6 +439,14 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
} else { } else {
mAdapter.setList(listNow); mAdapter.setList(listNow);
} }
if (mainMeBottomAdapter == null) {
mainMeBottomAdapter = new MainMeBottomAdapter(mContext, newList);
mainMeBottomAdapter.setOnItemClickListener(this);
bottomRecyclerView.setAdapter(mainMeBottomAdapter);
} else {
mainMeBottomAdapter.setList(newList);
}
} }
if (beanKefu != null) { if (beanKefu != null) {
} }
@ -472,6 +492,20 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
case 17: case 17:
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY); RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
break; break;
case 66:
MobclickAgent.onEvent(mContext, "my_noble", "个人中心点贵族");
Constants.isTitle = true;
UserBean u = CommonAppConfig.getInstance().getUserBean();
String url1 = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
ZhuangBanActivity.forward(mContext, url1, false);
break;
case 67:
MobclickAgent.onEvent(mContext, "my_guard_btn", "我的-守护点击次数及人数");
Constants.isTitle = true;
String url2 = CommonAppConfig.HOST + "/h5/Guard/index.html?token=" + CommonAppConfig.getInstance().getToken()
+ "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
ZhuangBanActivity.forward(mContext, url2, false);
break;
} }
} else { } else {
//21 在线客服 //21 在线客服
@ -638,7 +672,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
lt_advertisement.setVisibility(View.GONE); lt_advertisement.setVisibility(View.GONE);
return; return;
} }
lt_advertisement.setVisibility(View.VISIBLE); /*lt_advertisement.setVisibility(View.VISIBLE);
if (mBannerList.size() == 1) { if (mBannerList.size() == 1) {
banner_me.setAutoPlay(false) banner_me.setAutoPlay(false)
.setPages(mBannerList, new CustomMyViewHolder()) .setPages(mBannerList, new CustomMyViewHolder())
@ -685,18 +719,18 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
map_ekv.put("link", url); map_ekv.put("link", url);
MobclickAgent.onEvent(mContext, "my_banner", map_ekv); MobclickAgent.onEvent(mContext, "my_banner", map_ekv);
/*if(bean.getSlide_id().equals("95")){ *//*if(bean.getSlide_id().equals("95")){
RouteUtil.forwardCustomerService(url); RouteUtil.forwardCustomerService(url);
}else { }else {
ZhuangBanActivity.forward(mContext, url, false); ZhuangBanActivity.forward(mContext, url, false);
}*/ }*//*
} }
} }
} }
} }
}) })
.start(); .start();
} }*/
} }
} }

View File

@ -1,502 +0,0 @@
package com.yunbao.main.views;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.opensource.svgaplayer.SVGADrawable;
import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.bean.GoogleBean;
import com.yunbao.common.bean.NewLevelModel;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.UserItemBean;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsMainViewHolder;
import com.yunbao.live.activity.LiveRecordActivity;
import com.yunbao.live.activity.RoomManageActivity;
import com.yunbao.live.activity.WebViewActivityMedal;
import com.yunbao.live.utils.LiveTextRender;
import com.yunbao.main.R;
import com.yunbao.main.activity.EditProfileActivity;
import com.yunbao.main.activity.FansActivity;
import com.yunbao.main.activity.FollowActivity;
import com.yunbao.main.activity.MyProfitActivity;
import com.yunbao.main.activity.MyVideoActivity;
import com.yunbao.main.activity.MyWalletActivity;
import com.yunbao.main.activity.RewardActivity;
import com.yunbao.main.activity.SettingActivity;
import com.yunbao.main.activity.ThreeDistributActivity;
import com.yunbao.main.activity.ZhuangBanActivity;
import com.yunbao.main.adapter.MainMeAdapter;
import com.yunbao.main.http.MainHttpConsts;
import com.yunbao.main.http.MainHttpUtil;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* Created by cxf on 2018/9/22.
* 我的
*/
public class MainMeViewHolder1 extends AbsMainViewHolder implements OnItemClickListener<UserItemBean>, View.OnClickListener {
private ImageView mAvatar, mSex, mLevelAnchor, mLevel;
private TextView mName, tv_level, mID;
private ImageView img_kefu, img_setting;
private RelativeLayout rt_kefu, rt_setting;
private boolean mPaused;
private RecyclerView mRecyclerView;
private MainMeAdapter mAdapter;
private TextView signature;
private TextView coin, gold;//金豆,钻石
private TextView btnCopy;
private SVGAImageView gift_svga;
private View v_noble;
// private LinearLayout btnUserNoble;
private ImageView user_noble_ico, good_nub_ico;
private TextView user_noble_text, leave;
private UserItemBean beanStetting = null, beanKefu = null;
private boolean firstInto = true;
public MainMeViewHolder1(Context context, ViewGroup parentView) {
super(context, parentView);
}
@Override
protected int getLayoutId() {
return R.layout.view_main_me1;
}
@Override
public void init() {
mAvatar = (ImageView) findViewById(R.id.avatar);
mAvatar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 0);
}
});
mName = (TextView) findViewById(R.id.name);
gift_svga = (SVGAImageView) findViewById(com.yunbao.live.R.id.gift_svga);
gift_svga.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 0);
}
});
user_noble_ico = (ImageView) findViewById(R.id.user_noble_ico);
// mSex = (ImageView) findViewById(R.id.sex);
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
mLevel = (ImageView) findViewById(R.id.level);
tv_level = (TextView) findViewById(R.id.tv_level);
good_nub_ico = (ImageView) findViewById(R.id.good_nub_ico);
mID = (TextView) findViewById(R.id.id_val);
// mFollow = (TextView) findViewById(R.id.btn_follow);
// mFans = (TextView) findViewById(R.id.btn_fans);
signature = (TextView) findViewById(R.id.signature);
coin = (TextView) findViewById(R.id.coin);
gold = (TextView) findViewById(R.id.gold);
btnCopy = (TextView) findViewById(R.id.btn_copy);
// btnUserNoble = (LinearLayout) findViewById(R.id.btn_user_noble);
user_noble_text = (TextView) findViewById(R.id.user_noble_text);
leave = (TextView) findViewById(R.id.leave);
img_kefu = (ImageView) findViewById(R.id.img_kefu);
img_setting = (ImageView) findViewById(R.id.img_setting);
rt_kefu = (RelativeLayout) findViewById(R.id.rt_kefu);
rt_setting = (RelativeLayout) findViewById(R.id.rt_setting);
v_noble = (View) findViewById(R.id.v_noble);
// mFollow.setOnClickListener(this);
// mFans.setOnClickListener(this);
findViewById(R.id.btn_edit).setOnClickListener(this);
// findViewById(R.id.btn_msg).setOnClickListener(this);
findViewById(R.id.btn_wallet).setOnClickListener(this);
findViewById(R.id.btn_coin).setOnClickListener(this);
findViewById(R.id.btn_gold).setOnClickListener(this);
findViewById(R.id.rt_kefu).setOnClickListener(this);
findViewById(R.id.rt_setting).setOnClickListener(this);
findViewById(R.id.v_noble).setOnClickListener(this);
//主播等级
mLevelAnchor.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Level&a=index" + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0") + "&for";
WebViewActivity.forward(mContext, url, false);
}
});
//用户等级
mLevel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Level&a=index" + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
WebViewActivity.forward(mContext, url, false);
}
});
// btnUserNoble.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// UserBean u = CommonAppConfig.getInstance().getUserBean();
// String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
// ZhuangBanActivity.forward(mContext, url, false);
// }
// });
btnCopy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ClipboardManager cm = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE);
cm.setText(mID.getText() + "");
Toast.makeText(mContext, "複製成功", Toast.LENGTH_SHORT).show();
}
});
// findViewById(R.id.btn_detail).setOnClickListener(this);
// findViewById(R.id.btn_shop).setOnClickListener(this);
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
mRecyclerView.setHasFixedSize(true);
// mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 4, GridLayoutManager.VERTICAL, false));
// EventBus.getDefault().register(this);
}
@Override
public void onPause() {
super.onPause();
mPaused = true;
}
@Override
public void onResume() {
super.onResume();
if (isShowed() && mPaused) {
loadData();
}
mPaused = false;
// EventBus.getDefault().unregister(this);
}
@Override
public void onDestroy() {
super.onDestroy();
MainHttpUtil.cancel(MainHttpConsts.GET_BASE_INFO);
}
@Override
public void loadData() {
if (isFirstLoadData()) {
CommonAppConfig appConfig = CommonAppConfig.getInstance();
UserBean u = appConfig.getUserBean();
List<UserItemBean> list = appConfig.getUserItemList();
if (u != null && list != null) {
showData(u, list);
}
}
MainHttpUtil.getGoogle(mCallback1);
MainHttpUtil.getBaseInfo(mCallback);
}
//获取谷歌
//谷歌支付是否打开 1是打开 0 关闭
String Is_hide = "1";
private CommonCallback<GoogleBean> mCallback1 = new CommonCallback<GoogleBean>() {
@Override
public void callback(GoogleBean bean) {
if (bean != null) {
Is_hide = bean.getIs_hide();
}
}
};
private CommonCallback<UserBean> mCallback = new CommonCallback<UserBean>() {
@Override
public void callback(UserBean bean) {
List<UserItemBean> list = CommonAppConfig.getInstance().getUserItemList();
if (bean != null) {
showData(bean, list);
}
}
};
private void showData(UserBean u, List<UserItemBean> list) {
ImgLoader.displayAvatar(mContext, u.getAvatar(), mAvatar);
// mTtileView.setText(u.getUserNiceName());
mName.setText(u.getUserNiceName());
user_noble_text.setText(u.getNoble_name());
// mSex.setImageResource(CommonIconUtil.getSexIcon(u.getSex()));
coin.setText(u.getYuanbao());
gold.setText(u.getCoin());
signature.setText(u.getSignature());
CommonAppConfig appConfig = CommonAppConfig.getInstance();
if (u.getDress().getAvatar_frame() != null) {
if (u.getDress().getAvatar_frame().contains("svga")) {
try {
new SVGAParser(mContext).parse(new URL(u.getDress().getAvatar_frame()), new SVGAParser.ParseCompletion() {
@Override
public void onComplete(SVGAVideoEntity videoItem) {
SVGADrawable drawable = new SVGADrawable(videoItem);
gift_svga.setImageDrawable(drawable);
SVGAViewUtils.playEndClear(gift_svga);
}
@Override
public void onError() {
}
});
} catch (MalformedURLException e) {
e.printStackTrace();
}
} else {
ImgLoader.display(mContext, u.getDress().getAvatar_frame(), gift_svga);
}
}
if (u.getDress().getMedal() != null) {
Log.e("tag", u.getDress().getMedal());
ImgLoader.display(mContext, u.getDress().getMedal(), user_noble_ico);
} else {
user_noble_ico.setImageResource(R.mipmap.df_nobe);
}
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
int anchorLevel = 0;
anchorLevel = u.getLevelAnchor();
String imgUrl = "";
for (NewLevelModel newLevelModel : models) {
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
imgUrl = newLevelModel.getThumb();
}
}
leave.setText(String.valueOf(u.getLevelAnchor()));
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
new LiveTextRender().getLevelImage(mContext, u.getLevel(), new ImgLoader.DrawableCallback() {
@Override
public void onLoadSuccess(Drawable drawable) {
ImgLoader.display2(mContext, drawable, mLevel);
}
@Override
public void onLoadFailed() {
}
});
//修改靓号图标 个人中心
if (u.getGoodnum() != null && !u.getGoodnum().equals("")) {
good_nub_ico.setVisibility(View.VISIBLE);
mID.setText(" " + u.getGoodnum());
} else {
good_nub_ico.setVisibility(View.GONE);
mID.setText(u.getLiangNameTip());
}
// mFollow.setText("" + u.getFollows());
// mFans.setText("" + u.getFans());
if (list != null && list.size() > 0) {
List<UserItemBean> listNow = new ArrayList<>();
for (UserItemBean userItemBean : list) {
if (userItemBean.getId() != 21 && userItemBean.getId() != 13) {
listNow.add(userItemBean);
} else if (userItemBean.getId() == 21) {
beanKefu = userItemBean;
} else if (userItemBean.getId() == 13) {
beanStetting = userItemBean;
}
}
if (mAdapter == null) {
mAdapter = new MainMeAdapter(mContext, listNow);
mAdapter.setOnItemClickListener(this);
mRecyclerView.setAdapter(mAdapter);
} else {
mAdapter.setList(listNow);
}
}
if (beanKefu != null) {
ImgLoader.display(mContext, beanKefu.getThumb(), img_kefu);
}
if (beanStetting != null) {
ImgLoader.display(mContext, beanStetting.getThumb(), img_setting);
}
Constants.myUid = u.getGoodnum();
Constants.myAvatar = u.getAvatar();
}
@Override
public void onItemClick(UserItemBean bean, int position) {
String url = bean.getHref();
if (TextUtils.isEmpty(url)) {
switch (bean.getId()) {
case 1:
forwardProfit();
break;
case 2:
forwardCoin();
break;
case 13:
// forwardSetting();
break;
case 19:
forwardMyVideo();
break;
case 20:
forwardRoomManage();
break;
}
} else {
//21 在线客服
Log.i("tag", bean.getId() + "");
if (bean.getId() == 8) {//三级分销
ThreeDistributActivity.forward(mContext, bean.getName(), url);
} else {
if (bean.getId() == 31) {
//跳转网页版粉丝徽章
WebViewActivityMedal.forward(mContext, url);
} else if (bean.getId() == 5) {
ZhuangBanActivity.forward(mContext, CommonAppConfig.HOST + "/h5/Personality.html");
//獎勵中心
} else if (bean.getId() == 23) {
Log.i("tsa", url);
RewardActivity.forward(mContext, url);
} else {
WebViewActivity.forward(mContext, url, false);
}
}
}
}
@Override
public void onClick(View v) {
int i = v.getId();
if (i == R.id.btn_edit) {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
}
// else if (i == R.id.btn_follow) {
// forwardFollow();
// }
else if (i == R.id.btn_fans) {
forwardFans();
// } else if (i == R.id.btn_msg) {
// ChatActivity.forward(mContext);
} else if (i == R.id.btn_wallet) {
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0));
} else if (i == R.id.btn_coin) {
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 2));
} else if (i == R.id.btn_gold) {
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0));
} else if (i == R.id.rt_kefu) {
WebViewActivity.forward(mContext, beanKefu.getHref(), false);
} else if (i == R.id.rt_setting) {
forwardSetting();
} else if (i == R.id.v_noble) {
UserBean u = CommonAppConfig.getInstance().getUserBean();
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
ZhuangBanActivity.forward(mContext, url, false);
}
}
/**
* 编辑个人资料
*/
private void forwardEditProfile() {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
}
/**
* 我的关注
*/
private void forwardFollow() {
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0);
}
/**
* 我的粉丝
*/
private void forwardFans() {
FansActivity.forward(mContext, CommonAppConfig.getInstance().getUid());
}
/**
* 直播记录
*/
private void forwardLiveRecord() {
LiveRecordActivity.forward(mContext, CommonAppConfig.getInstance().getUserBean());
}
/**
* 我的收益
*/
private void forwardProfit() {
mContext.startActivity(new Intent(mContext, MyProfitActivity.class));
}
/**
* 我的钻石
*/
private void forwardCoin() {
RouteUtil.forwardMyCoin(mContext);
}
/**
* 设置
*/
private void forwardSetting() {
mContext.startActivity(new Intent(mContext, SettingActivity.class));
}
/**
* 我的视频
*/
private void forwardMyVideo() {
mContext.startActivity(new Intent(mContext, MyVideoActivity.class));
}
/**
* 房间管理
*/
private void forwardRoomManage() {
mContext.startActivity(new Intent(mContext, RoomManageActivity.class));
}
}

View File

@ -9,8 +9,8 @@
<ImageView <ImageView
android:id="@+id/thumb" android:id="@+id/thumb"
android:layout_width="24dp" android:layout_width="32dp"
android:layout_height="24dp" /> android:layout_height="32dp" />
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
@ -20,7 +20,7 @@
android:text="" android:text=""
android:singleLine="true" android:singleLine="true"
android:ellipsize="end" android:ellipsize="end"
android:textColor="@color/textColor" android:textColor="#FF333333"
android:textSize="12sp" /> android:textSize="12sp" />
</LinearLayout> </LinearLayout>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/thumb"
android:layout_width="20dp"
android:layout_height="20dp" />
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="我的勋章"
android:singleLine="true"
android:ellipsize="end"
android:layout_marginStart="8dp"
android:textColor="#FF777777"
android:textSize="12sp" />
<ImageView
android:layout_width="20dp"
android:padding="2dp"
android:src="@mipmap/icon_right_new"
android:layout_height="20dp"/>
</LinearLayout>

View File

@ -19,17 +19,15 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="37dp" android:layout_height="45dp"
android:layout_marginTop="28dp" android:layout_marginTop="22dp"
app:layout_scrollFlags="scroll|enterAlways"> app:layout_scrollFlags="scroll|enterAlways">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="37dp" android:layout_height="45dp"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@id/btn_search" android:layout_toLeftOf="@id/btn_search"
tools:ignore="NotSibling"> tools:ignore="NotSibling">

View File

@ -163,7 +163,7 @@
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:text="这个人很懒,什么也没留下。" android:text="这个人很懒,什么也没留下。"
android:textColor="@color/gray_cccccc" android:textColor="#FF777777"
android:textSize="11sp" /> android:textSize="11sp" />
<LinearLayout <LinearLayout
@ -194,7 +194,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/gray_B1B1B1" android:textColor="@color/gray_B1B1B1"
android:textSize="12sp" /> android:textSize="11sp" />
</LinearLayout> </LinearLayout>
<TextView <TextView
@ -244,13 +244,13 @@
android:gravity="center|left" android:gravity="center|left"
android:text="" android:text=""
android:textColor="@color/gray_B1B1B1" android:textColor="@color/gray_B1B1B1"
android:textSize="13sp" /> android:textSize="11sp" />
<ImageView <ImageView
android:layout_width="11dp" android:layout_width="10dp"
android:layout_height="11dp" android:layout_height="10dp"
android:layout_marginLeft="3dp" android:layout_marginLeft="5dp"
android:background="@mipmap/icon_arrow_right" android:background="@mipmap/icon_right_new"
android:visibility="visible" /> android:visibility="visible" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -323,8 +323,9 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/diamond" android:text="@string/diamond"
android:textColor="@color/gray1" android:textColor="#FF333333"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@ -333,7 +334,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="" android:text=""
android:textColor="@color/textColor" android:textColor="#FF333333"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
@ -374,7 +375,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/coins" android:text="@string/coins"
android:textColor="@color/gray1" android:layout_marginStart="5dp"
android:textColor="#FF333333"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@ -383,7 +385,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="" android:text=""
android:textColor="@color/textColor" android:textColor="#FF333333"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
@ -424,7 +426,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/golden_bean" android:text="@string/golden_bean"
android:textColor="@color/gray1" android:layout_marginStart="5dp"
android:textColor="#FF333333"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@ -433,7 +436,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="" android:text=""
android:textColor="@color/textColor" android:textColor="#FF333333"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
@ -630,7 +633,6 @@
android:id="@+id/lt_guard" android:id="@+id/lt_guard"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="81dp" android:layout_height="81dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:layout_weight="1" android:layout_weight="1"
@ -711,7 +713,29 @@
android:paddingRight="6dp" android:paddingRight="6dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
android:background="@drawable/bg_me_data">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/bottomRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="9dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="9dp"
android:focusable="false"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:paddingLeft="6dp"
android:paddingRight="6dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@mipmap/bg_activity_message" android:background="#FFF7F8FA"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="35dp"> android:paddingTop="35dp">
<!-- android:background="@mipmap/bg_activity_message" --> <!-- android:background="@mipmap/bg_activity_message" -->
@ -41,7 +41,6 @@
</LinearLayout> </LinearLayout>
<EditText <EditText
android:id="@+id/search" android:id="@+id/search"
android:layout_width="0dp" android:layout_width="0dp"
@ -87,6 +86,7 @@
<LinearLayout <LinearLayout
android:background="#FFF7F8FA"
android:id="@+id/top_layout" android:id="@+id/top_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -95,23 +95,23 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="50dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
<ImageView <ImageView
android:id="@+id/img_news_notice" android:id="@+id/img_news_notice"
android:layout_width="40dp" android:layout_width="42dp"
android:layout_height="40dp" android:layout_height="42dp"
android:src="@mipmap/ic_msg_notice" /> android:src="@mipmap/ic_msg_notice" />
<TextView <TextView
android:id="@+id/tv_news_notice" android:id="@+id/tv_news_notice"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:text="@string/activity_msg_news_notice" android:text="@string/activity_msg_news_notice"
@ -137,26 +137,32 @@
</LinearLayout> </LinearLayout>
<View
android:layout_marginStart="60dp"
android:layout_width="match_parent"
android:layout_marginEnd="22dp"
android:background="#FFEFEFEF"
android:layout_height="1dp"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="50dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:id="@+id/img_news_interaction" android:id="@+id/img_news_interaction"
android:layout_width="40dp" android:layout_width="42dp"
android:layout_height="40dp" android:layout_height="42dp"
android:src="@mipmap/ic_msg_interaction" /> android:src="@mipmap/ic_msg_interaction" />
<TextView <TextView
android:id="@+id/tv_news_interaction" android:id="@+id/tv_news_interaction"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:text="@string/activity_msg_newts_interaction" android:text="@string/activity_msg_newts_interaction"
@ -180,27 +186,31 @@
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
<View
android:layout_marginStart="60dp"
android:layout_width="match_parent"
android:background="#FFEFEFEF"
android:layout_marginEnd="22dp"
android:layout_height="1dp"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="50dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:id="@+id/img_system_messages" android:id="@+id/img_system_messages"
android:layout_width="40dp" android:layout_width="42dp"
android:layout_height="40dp" android:layout_height="42dp"
android:src="@mipmap/ic_msg_message" /> android:src="@mipmap/ic_msg_message" />
<TextView <TextView
android:id="@+id/tv_system_messages" android:id="@+id/tv_system_messages"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:text="@string/activity_msg_system_message" android:text="@string/activity_msg_system_message"
@ -224,27 +234,31 @@
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
<View
android:layout_marginStart="60dp"
android:layout_width="match_parent"
android:background="#FFEFEFEF"
android:layout_marginEnd="22dp"
android:layout_height="1dp"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="50dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:id="@+id/img_news_online" android:id="@+id/img_news_online"
android:layout_width="40dp" android:layout_width="42dp"
android:layout_height="40dp" android:layout_height="42dp"
android:src="@mipmap/ic_msg_service" /> android:src="@mipmap/ic_msg_service" />
<TextView <TextView
android:id="@+id/tv_news_online" android:id="@+id/tv_news_online"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"
android:text="@string/activity_msg_news_online" android:text="@string/activity_msg_news_online"
@ -268,19 +282,14 @@
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
<View
android:layout_marginStart="60dp"
android:layout_width="match_parent"
android:layout_marginEnd="22dp"
android:background="#FFEFEFEF"
android:layout_height="1dp"/>
</LinearLayout> </LinearLayout>
<View
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="5dp"
android:background="#FFE9F6" />
<net.lucode.hackware.magicindicator.MagicIndicator <net.lucode.hackware.magicindicator.MagicIndicator
android:id="@+id/indicator" android:id="@+id/indicator"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -288,6 +297,7 @@
android:visibility="gone" /> android:visibility="gone" />
<LinearLayout <LinearLayout
android:background="@color/white"
android:id="@+id/tabLayouts" android:id="@+id/tabLayouts"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="40dp"
@ -470,8 +480,9 @@
<androidx.viewpager2.widget.ViewPager2 <androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager" android:id="@+id/viewPager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:background="@color/white"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="10dp" android:paddingTop="10dp"
android:layout_marginBottom="50dp" android:layout_marginBottom="50dp"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />