update
This commit is contained in:
parent
06a2621e0f
commit
d34e30c291
@ -172,6 +172,9 @@
|
||||
<activity
|
||||
android:name=".activity.EndCallActivity"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".activity.MyFriendListActivity"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
|
||||
<activity
|
||||
|
@ -96,7 +96,7 @@ public class AppContext extends CommonAppContext {
|
||||
RongConfigCenter.conversationConfig().addMessageProvider(new MessageChatReceiveGiftItemProvider(getApplicationContext()));
|
||||
RongConfigCenter.conversationConfig().addMessageProvider(new MessageChatAutoItemProvider(getApplicationContext()));
|
||||
|
||||
String appKey = "pvxdm17jpd3hr";
|
||||
String appKey = "lmxuhwagl7s1d";
|
||||
boolean enablePush = true;
|
||||
RongIM.init(this, appKey, enablePush);
|
||||
RongIM.setConnectionStatusListener(new RongIMClient.ConnectionStatusListener() {
|
||||
|
@ -191,6 +191,7 @@ public class MainActivity extends AbsOTOActivity {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
checkUserInfoIsSet();
|
||||
initFirstLoginTips();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,114 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.adapter.MyFriendListAdapter;
|
||||
import com.shayu.onetoone.bean.HomeItemBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imkit.widget.refresh.SmartRefreshLayout;
|
||||
import io.rong.imkit.widget.refresh.api.RefreshLayout;
|
||||
import io.rong.imkit.widget.refresh.listener.OnLoadMoreListener;
|
||||
import io.rong.imkit.widget.refresh.listener.OnRefreshListener;
|
||||
import io.rong.imkit.widget.refresh.wrapper.RongRefreshHeader;
|
||||
|
||||
@Route(path = RouteManager.ACTIVITY_MY_FRIEND_LIST)
|
||||
public class MyFriendListActivity extends AbsOTOActivity {
|
||||
public static final int TYPE_FRIEND = 0;
|
||||
public static final int TYPE_FANS = 1;
|
||||
public static final int TYPE_FOLLOW = 2;
|
||||
private int type;
|
||||
int page = 1;
|
||||
MyFriendListAdapter adapter;
|
||||
SmartRefreshLayout mRefreshLayout;
|
||||
SwipeRecyclerView recyclerView;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_my_follow;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main(Bundle savedInstanceState) {
|
||||
Bundle extras = getIntent().getExtras();
|
||||
type = extras.getInt("type", TYPE_FRIEND);
|
||||
mRefreshLayout = findViewById(R.id.swipeRefreshLayout);
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
adapter = new MyFriendListAdapter(mContext);
|
||||
recyclerView.setAdapter(adapter);
|
||||
mRefreshLayout.setNestedScrollingEnabled(false);
|
||||
mRefreshLayout.setRefreshHeader(new RongRefreshHeader(mContext));
|
||||
mRefreshLayout.setRefreshFooter(new RongRefreshHeader(mContext));
|
||||
mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
initData();
|
||||
}
|
||||
});
|
||||
mRefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
initData();
|
||||
}
|
||||
});
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
if (type == TYPE_FANS) {
|
||||
OTONetManager.getInstance(mContext).getFans(page, new MyNetData());
|
||||
} else if (type == TYPE_FOLLOW) {
|
||||
OTONetManager.getInstance(mContext).getFollows(page, new MyNetData());
|
||||
} else if (type == TYPE_FRIEND) {
|
||||
OTONetManager.getInstance(mContext).getFriends(page, new MyNetData());
|
||||
}
|
||||
}
|
||||
|
||||
private class MyNetData implements HttpCallback<List<HomeItemBean>> {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<HomeItemBean> data) {
|
||||
String title = "";
|
||||
mRefreshLayout.finishRefresh();
|
||||
mRefreshLayout.finishLoadMore();
|
||||
switch (type) {
|
||||
case TYPE_FANS:
|
||||
title = WordUtil.getNewString(R.string.activity_my_friend_list_fans);
|
||||
break;
|
||||
case TYPE_FOLLOW:
|
||||
title = WordUtil.getNewString(R.string.activity_my_friend_list_follow);
|
||||
break;
|
||||
case TYPE_FRIEND:
|
||||
title = WordUtil.getNewString(R.string.activity_my_friend_list_friend);
|
||||
break;
|
||||
}
|
||||
if (data.isEmpty()) {
|
||||
setTitle(title + "(" + adapter.getItemCount() + WordUtil.getNewString(R.string.activity_my_friend_list_people)+")");
|
||||
recyclerView.loadMoreFinish(true, false);
|
||||
return;
|
||||
}
|
||||
recyclerView.loadMoreFinish(false, true);
|
||||
if (page == 1) {
|
||||
adapter.setList(data);
|
||||
} else {
|
||||
adapter.addList(data);
|
||||
}
|
||||
page++;
|
||||
setTitle(title + "(" + adapter.getItemCount() + WordUtil.getNewString(R.string.activity_my_friend_list_people)+")");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -30,9 +30,12 @@ import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.MyFriendListActivity;
|
||||
import com.shayu.onetoone.activity.setting.SettingActivity;
|
||||
import com.shayu.onetoone.adapter.MainMeAdapter;
|
||||
import com.shayu.onetoone.bean.PeopleNum;
|
||||
import com.shayu.onetoone.bean.SlideBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.MainHttpConsts;
|
||||
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||
@ -94,6 +97,10 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
private LinearLayout lt_advertisement;
|
||||
private View redPoint;
|
||||
|
||||
private TextView followNum, fansNum, friendNum;
|
||||
private View followLayout, fansLayout, friendLayout;
|
||||
private ImageView sex;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle
|
||||
savedInstanceState) {
|
||||
@ -123,6 +130,31 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
RouteManager.forwardEditProfileActivity();
|
||||
}
|
||||
});
|
||||
fansNum = itemView.findViewById(R.id.fans);
|
||||
fansLayout = itemView.findViewById(R.id.fans_layout);
|
||||
followNum = itemView.findViewById(R.id.follow);
|
||||
followLayout = itemView.findViewById(R.id.follow_layout);
|
||||
friendNum = itemView.findViewById(R.id.friend);
|
||||
friendLayout = itemView.findViewById(R.id.friend_layout);
|
||||
sex = itemView.findViewById(R.id.sex);
|
||||
|
||||
fansLayout.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("type", MyFriendListActivity.TYPE_FANS);
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MY_FRIEND_LIST, bundle);
|
||||
});
|
||||
followLayout.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("type", MyFriendListActivity.TYPE_FOLLOW);
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MY_FRIEND_LIST, bundle);
|
||||
});
|
||||
friendLayout.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("type", MyFriendListActivity.TYPE_FRIEND);
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MY_FRIEND_LIST, bundle);
|
||||
});
|
||||
|
||||
|
||||
user_noble_ico = (ImageView) itemView.findViewById(R.id.user_noble_ico);
|
||||
mLevelAnchor = (ImageView) itemView.findViewById(R.id.level_anchor);
|
||||
mLevel = (ImageView) itemView.findViewById(R.id.level);
|
||||
@ -178,6 +210,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
}
|
||||
});
|
||||
loadData();
|
||||
initPeopleNum();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -278,6 +311,11 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
}
|
||||
}
|
||||
}
|
||||
if (u.getSex() == 1) {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_man);
|
||||
} else {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
showBanner();
|
||||
ImgLoader.displayAvatar(mContext, u.getAvatar(), mAvatar);
|
||||
mName.setText(u.getUserNiceName());
|
||||
@ -615,5 +653,21 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
}
|
||||
}
|
||||
|
||||
void initPeopleNum() {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getPeopleNum(new com.yunbao.common.http.base.HttpCallback<PeopleNum>() {
|
||||
@Override
|
||||
public void onSuccess(PeopleNum data) {
|
||||
fansNum.setText(data.getFans() + "");
|
||||
followNum.setText(data.getFollow() + "");
|
||||
friendNum.setText(data.getFriend() + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,126 @@
|
||||
package com.shayu.onetoone.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.HomeItemBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MyFriendListAdapter extends RecyclerView.Adapter<MyFriendListAdapter.ViewHolder> {
|
||||
List<HomeItemBean> list;
|
||||
Context context;
|
||||
|
||||
public MyFriendListAdapter(Context context) {
|
||||
this.context = context;
|
||||
list=new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setList(List<HomeItemBean> list) {
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(LayoutInflater.from(context).inflate(R.layout.item_my_follow, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
holder.setDate(list.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public void addList(List<HomeItemBean> data) {
|
||||
this.list.addAll(data);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private RoundedImageView avatar;
|
||||
private ImageView sex;
|
||||
private TextView uname;
|
||||
private TextView starUp;
|
||||
private Button submit;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
avatar = itemView.findViewById(R.id.avatar);
|
||||
sex = itemView.findViewById(R.id.sex);
|
||||
uname = itemView.findViewById(R.id.uname);
|
||||
starUp = itemView.findViewById(R.id.star_up);
|
||||
submit = itemView.findViewById(R.id.submit);
|
||||
}
|
||||
|
||||
void setDate(HomeItemBean bean, int position) {
|
||||
ImgLoader.display(context, bean.getAvatar(), avatar);
|
||||
uname.setText(bean.getUser_nicename());
|
||||
starUp.setText(bean.getStar() + "·" + bean.getStar_name());
|
||||
if (bean.getSex() == 1) {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_man);
|
||||
} else {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
//isAttention 0 未关注 1被关注 2已关注 3互相关注
|
||||
submit.setEnabled(true);
|
||||
switch (bean.getIsAttention()) {
|
||||
case 1:
|
||||
submit.setText(R.string.activity_my_friend_list_item_1);
|
||||
break;
|
||||
case 2:
|
||||
submit.setText(R.string.activity_my_friend_list_item_2);
|
||||
submit.setEnabled(false);
|
||||
break;
|
||||
case 3:
|
||||
submit.setText(R.string.activity_my_friend_list_item_3);
|
||||
submit.setEnabled(false);
|
||||
break;
|
||||
default:
|
||||
submit.setText(R.string.activity_my_friend_list_item_0);
|
||||
}
|
||||
submit.setOnClickListener(v -> follow(bean.getId() + "", submit));
|
||||
|
||||
}
|
||||
|
||||
private void follow(String targetId, Button follow) {
|
||||
OTONetManager.getInstance(context)
|
||||
.follow(targetId, new HttpCallback<FollowBean>() {
|
||||
@Override
|
||||
public void onSuccess(FollowBean data) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.system_tip_success));
|
||||
follow.setEnabled(false);
|
||||
follow.setText(R.string.activity_my_friend_list_item_2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -39,10 +39,19 @@ public class HomeItemBean extends BaseModel {
|
||||
private int age;
|
||||
private int level;
|
||||
private int is_accost;
|
||||
private int isAttention;//isAttention 0 未关注 1被关注 2已关注 3互相关注
|
||||
|
||||
public HomeItemBean() {
|
||||
}
|
||||
|
||||
public int getIsAttention() {
|
||||
return isAttention;
|
||||
}
|
||||
|
||||
public void setIsAttention(int isAttention) {
|
||||
this.isAttention = isAttention;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.shayu.onetoone.bean;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class PeopleNum extends BaseModel {
|
||||
int fans;
|
||||
int follow;
|
||||
int friend;
|
||||
|
||||
public PeopleNum() {
|
||||
}
|
||||
|
||||
public int getFans() {
|
||||
return fans;
|
||||
}
|
||||
|
||||
public void setFans(int fans) {
|
||||
this.fans = fans;
|
||||
}
|
||||
|
||||
public int getFollow() {
|
||||
return follow;
|
||||
}
|
||||
|
||||
public void setFollow(int follow) {
|
||||
this.follow = follow;
|
||||
}
|
||||
|
||||
public int getFriend() {
|
||||
return friend;
|
||||
}
|
||||
|
||||
public void setFriend(int friend) {
|
||||
this.friend = friend;
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@ import com.shayu.onetoone.bean.MatchingInfoBean;
|
||||
import com.shayu.onetoone.bean.MatchingItemSizeBean;
|
||||
import com.shayu.onetoone.bean.MessageConsumeConfigBean;
|
||||
import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
import com.shayu.onetoone.bean.PeopleNum;
|
||||
import com.shayu.onetoone.bean.PurseBean;
|
||||
import com.shayu.onetoone.bean.SendConsumeBean;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
@ -1303,4 +1304,55 @@ public class OTONetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getFollows(int page,HttpCallback<List<HomeItemBean>> callback) {
|
||||
API.get().otoApi(mContext).
|
||||
getFollows(page+"")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
} else {
|
||||
callback.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getFans(int page,HttpCallback<List<HomeItemBean>> callback) {
|
||||
API.get().otoApi(mContext).
|
||||
getFans(page+"")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
} else {
|
||||
callback.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getPeopleNum(HttpCallback<PeopleNum> callback) {
|
||||
API.get().otoApi(mContext).
|
||||
getPeopleNum()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
} else {
|
||||
callback.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public class RouteManager {
|
||||
public static final String ACTIVITY_CALL_AUDIO = "/activity/CallVAudioActivity";
|
||||
public static final String PATH_EDITPROFILE = "/main/EditProfileActivity";
|
||||
public static final String ACTIVITY_MATCHING = "/activity/MatchingActivity";
|
||||
public static final String ACTIVITY_MY_FRIEND_LIST = "/activity/MyFriendListActivity";
|
||||
|
||||
//设置基本资料
|
||||
public static final String ACTIVITY_COMPLETE = "/activity/CompleteActivity";
|
||||
|
@ -18,6 +18,7 @@ import com.shayu.onetoone.bean.MatchingInfoBean;
|
||||
import com.shayu.onetoone.bean.MatchingItemSizeBean;
|
||||
import com.shayu.onetoone.bean.MessageConsumeConfigBean;
|
||||
import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
import com.shayu.onetoone.bean.PeopleNum;
|
||||
import com.shayu.onetoone.bean.PurseBean;
|
||||
import com.shayu.onetoone.bean.SendConsumeBean;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
@ -344,6 +345,13 @@ public interface OneToOneApi {
|
||||
|
||||
@GET("/api/public/?service=Friendappuser.friend")
|
||||
Observable<ResponseModel<List<HomeItemBean>>> getFriends(@Query("p")String p);
|
||||
@GET("/api/public/?service=Friendappuser.follow")
|
||||
Observable<ResponseModel<List<HomeItemBean>>> getFollows(@Query("p")String p);
|
||||
@GET("/api/public/?service=Friendappuser.fans")
|
||||
Observable<ResponseModel<List<HomeItemBean>>> getFans(@Query("p")String p);
|
||||
|
||||
@GET("/api/public/?service=Friendappuser.peopleNum")
|
||||
Observable<ResponseModel<PeopleNum>> getPeopleNum();
|
||||
}
|
||||
|
||||
|
||||
|
5
OneToOne/src/main/res/drawable/bg_my_follow_btn.xml
Normal file
5
OneToOne/src/main/res/drawable/bg_my_follow_btn.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true" android:drawable="@drawable/bg_rect_round_tag_btn2"/>
|
||||
<item android:state_enabled="false" android:drawable="@drawable/bg_rect_round_tag_btn3"/>
|
||||
</selector>
|
10
OneToOne/src/main/res/drawable/bg_rect_round_tag_btn2.xml
Normal file
10
OneToOne/src/main/res/drawable/bg_rect_round_tag_btn2.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#A279E4" />
|
||||
<corners android:radius="5dp" />
|
||||
<stroke android:width="1dp" android:color="#A279E4" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="65dp" android:height="30dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ffd0d0d0" />
|
||||
<corners android:topLeftRadius="5dp" android:topRightRadius="5dp" android:bottomLeftRadius="5dp" android:bottomRightRadius="5dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -12,7 +12,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="@dimen/activity_top"
|
||||
android:padding="10dp"
|
||||
android:text="@string/layout_choose_label_tip1"
|
||||
android:textColor="@color/black2"
|
||||
|
37
OneToOne/src/main/res/layout/activity_my_follow.xml
Normal file
37
OneToOne/src/main/res/layout/activity_my_follow.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/view_activity_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="71dp"
|
||||
android:layout_marginTop="@dimen/activity_top"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<io.rong.imkit.widget.refresh.SmartRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/include"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include">
|
||||
|
||||
<com.yanzhenjie.recyclerview.SwipeRecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_my_follow" />
|
||||
|
||||
</io.rong.imkit.widget.refresh.SmartRefreshLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -3,6 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/gray2"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="10dp">
|
||||
@ -69,6 +70,14 @@
|
||||
android:scaleType="centerCrop"
|
||||
app:autoPlay="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sex"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
app:srcCompat="@mipmap/ic_message_tab_man" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -236,16 +245,90 @@
|
||||
android:src="@mipmap/home_btn_edit" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_friend_layout"
|
||||
android:layout_below="@id/lt_me_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:id="@+id/friend_layout"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/friend"
|
||||
tools:text="1"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<TextView
|
||||
android:text="@string/activity_my_friend_friend"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/follow_layout"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/follow"
|
||||
tools:text="1"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<TextView
|
||||
android:text="@string/activity_my_friend_follow"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/fans_layout"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/fans"
|
||||
tools:text="1"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<TextView
|
||||
android:text="@string/activity_my_friend_fans"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_below="@id/lt_friend_layout"
|
||||
android:layout_height="114dp"
|
||||
android:layout_below="@id/lt_me_top"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/bg_me_data"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
68
OneToOne/src/main/res/layout/item_my_follow.xml
Normal file
68
OneToOne/src/main/res/layout/item_my_follow.xml
Normal file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginBottom="13dp"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/m_chu_xia"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true" />
|
||||
<ImageView
|
||||
android:id="@+id/sex"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/avatar"
|
||||
app:layout_constraintEnd_toEndOf="@id/avatar"
|
||||
app:srcCompat="@mipmap/ic_message_tab_woman" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/star_up"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:background="@drawable/bg_home_recommend_star_sign"
|
||||
android:padding="2dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="#FF37C4"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/uname"
|
||||
tools:text="21·水瓶座" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:enabled="false"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/bg_my_follow_btn"
|
||||
android:text="@string/layout_choose_label_tip4"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -247,4 +247,17 @@
|
||||
|
||||
<string name="layout_v_greet_config_add_tips1">添加更多</string>
|
||||
<string name="layout_v_custom_tips1">保存</string>
|
||||
<string name="activity_my_friend_list_fans">被關註</string>
|
||||
<string name="activity_my_friend_list_follow">關注</string>
|
||||
<string name="activity_my_friend_list_friend">互動關註</string>
|
||||
<string name="activity_my_friend_list_people">人</string>
|
||||
|
||||
<string name="activity_my_friend_list_item_0">未關註</string>
|
||||
<string name="activity_my_friend_list_item_1">回關</string>
|
||||
<string name="activity_my_friend_list_item_2">已關注</string>
|
||||
<string name="activity_my_friend_list_item_3">相互關注</string>
|
||||
|
||||
<string name="activity_my_friend_fans">粉絲</string>
|
||||
<string name="activity_my_friend_follow">關注</string>
|
||||
<string name="activity_my_friend_friend">好友</string>
|
||||
</resources>
|
@ -247,4 +247,17 @@
|
||||
|
||||
<string name="layout_v_greet_config_add_tips1">添加更多</string>
|
||||
<string name="layout_v_custom_tips1">保存</string>
|
||||
<string name="activity_my_friend_list_fans">被關註</string>
|
||||
<string name="activity_my_friend_list_follow">關注</string>
|
||||
<string name="activity_my_friend_list_friend">互動關註</string>
|
||||
<string name="activity_my_friend_list_people">人</string>
|
||||
|
||||
<string name="activity_my_friend_list_item_0">未關註</string>
|
||||
<string name="activity_my_friend_list_item_1">回關</string>
|
||||
<string name="activity_my_friend_list_item_2">已關注</string>
|
||||
<string name="activity_my_friend_list_item_3">相互關注</string>
|
||||
|
||||
<string name="activity_my_friend_fans">粉絲</string>
|
||||
<string name="activity_my_friend_follow">關注</string>
|
||||
<string name="activity_my_friend_friend">好友</string>
|
||||
</resources>
|
@ -249,4 +249,17 @@
|
||||
|
||||
<string name="layout_v_greet_config_add_tips1">添加更多</string>
|
||||
<string name="layout_v_custom_tips1">保存</string>
|
||||
<string name="activity_my_friend_list_fans">被關註</string>
|
||||
<string name="activity_my_friend_list_follow">關注</string>
|
||||
<string name="activity_my_friend_list_friend">互動關註</string>
|
||||
<string name="activity_my_friend_list_people">人</string>
|
||||
|
||||
<string name="activity_my_friend_list_item_0">未關註</string>
|
||||
<string name="activity_my_friend_list_item_1">回關</string>
|
||||
<string name="activity_my_friend_list_item_2">已關注</string>
|
||||
<string name="activity_my_friend_list_item_3">相互關注</string>
|
||||
|
||||
<string name="activity_my_friend_fans">粉絲</string>
|
||||
<string name="activity_my_friend_follow">關注</string>
|
||||
<string name="activity_my_friend_friend">好友</string>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user