update
This commit is contained in:
parent
095574296f
commit
5ee72410b7
@ -139,7 +139,7 @@
|
||||
android:name=".activity.WebViewActivity"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".activity.message.SystemMessageActivity"
|
||||
android:name=".activity.HomepageRankingActivity"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
<provider
|
||||
|
@ -40,8 +40,9 @@ public abstract class AbsOTOActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
onCreate();
|
||||
setStatusBar();
|
||||
if(onCreate()) {
|
||||
setStatusBar();
|
||||
}
|
||||
setContentView(getLayoutId());
|
||||
mContext = this;
|
||||
main(savedInstanceState);
|
||||
@ -65,7 +66,7 @@ public abstract class AbsOTOActivity extends AppCompatActivity {
|
||||
|
||||
protected abstract void main(Bundle savedInstanceState);
|
||||
|
||||
protected void onCreate(){}
|
||||
protected boolean onCreate(){ return true;}
|
||||
|
||||
/**
|
||||
* 设置标题
|
||||
|
@ -0,0 +1,86 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.angcyo.tablayout.DslTabLayout;
|
||||
import com.angcyo.tablayout.delegate2.ViewPager2Delegate;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.fragments.home.HomeRankFragment;
|
||||
import com.shayu.onetoone.listener.OnAppbarListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HomepageRankingActivity extends AbsOTOActivity {
|
||||
ViewPager2 viewPager;
|
||||
DslTabLayout dslTabLayout;
|
||||
RadioButton mDay, mWeek;
|
||||
private RadioGroup radioGroup;
|
||||
List<HomeRankFragment> fragments = new ArrayList<>();
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_main_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main(Bundle savedInstanceState) {
|
||||
mDay = findViewById(R.id.btn_day);
|
||||
mWeek = findViewById(R.id.btn_week);
|
||||
viewPager = findViewById(R.id.view_pager);
|
||||
dslTabLayout = findViewById(R.id.dslTabLayout);
|
||||
radioGroup = findViewById(R.id.radioGroup);
|
||||
|
||||
ViewPager2Delegate.Companion.install(viewPager, dslTabLayout, false);
|
||||
|
||||
fragments.add(new HomeRankFragment(HomeRankFragment.TYPE_CHARM));//魅力
|
||||
fragments.add(new HomeRankFragment(HomeRankFragment.TYPE_WEALTH)); //财富
|
||||
viewPager.setAdapter(new FragmentStateAdapter(this) {
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
fragments.get(position).setAppbarListener(new OnAppbarListener() {
|
||||
@Override
|
||||
public void onShow(boolean isShow) {
|
||||
if (isShow) {
|
||||
radioGroup.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
radioGroup.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
return fragments.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return fragments.size();
|
||||
}
|
||||
});
|
||||
mDay.setOnClickListener(v -> {
|
||||
setRadioColor(mDay, mWeek);
|
||||
});
|
||||
mWeek.setOnClickListener(v -> {
|
||||
setRadioColor(mWeek, mDay);
|
||||
});
|
||||
}
|
||||
|
||||
private void setRadioColor(RadioButton select, RadioButton unSelect) {
|
||||
select.setTextColor(Color.parseColor("#FFFFFF"));
|
||||
unSelect.setTextColor(Color.parseColor("#666666"));
|
||||
select.setBackgroundResource(R.drawable.bg_home_rank_day_select);
|
||||
unSelect.setBackgroundResource(R.drawable.bg_home_rank_day);
|
||||
}
|
||||
}
|
@ -0,0 +1,174 @@
|
||||
package com.shayu.onetoone.activity.fragments.home;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
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 com.google.android.material.appbar.AppBarLayout;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.fragments.BaseFragment;
|
||||
import com.shayu.onetoone.adapter.HomeRecommendListAdapter;
|
||||
import com.shayu.onetoone.bean.HomeRankBean;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.listener.OnAppbarListener;
|
||||
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.custom.MyRadioButton;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import pl.droidsonroids.gif.GifImageView;
|
||||
|
||||
public class HomeRankFragment extends BaseFragment {
|
||||
public static final int TYPE_CHARM = 0;
|
||||
public static final int TYPE_WEALTH = 1;
|
||||
private AppBarLayout rootView;
|
||||
private OnAppbarListener appbarListener;
|
||||
private SwipeRecyclerView mRecyclerView;
|
||||
HomeRecommendListAdapter adapter;
|
||||
private int type;
|
||||
|
||||
public HomeRankFragment(int type) {
|
||||
super();
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public void setAppbarListener(OnAppbarListener appbarListener) {
|
||||
this.appbarListener = appbarListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
rootView = findViewById(R.id.rootView);
|
||||
mRecyclerView = findViewById(R.id.recyclerView);
|
||||
adapter = new HomeRecommendListAdapter(getContext());
|
||||
mRecyclerView.setAdapter(adapter);
|
||||
|
||||
rootView.addOnOffsetChangedListener(new AppBarLayout.BaseOnOffsetChangedListener() {
|
||||
@Override
|
||||
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
|
||||
if (appbarListener != null) {
|
||||
if (verticalOffset == 0) {
|
||||
appbarListener.onShow(true);
|
||||
} else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange()) {
|
||||
appbarListener.onShow(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_home_ranking, container, false);
|
||||
}
|
||||
private void initData(){
|
||||
|
||||
}
|
||||
|
||||
class HeadView {
|
||||
View mItem1;
|
||||
View mItem2;
|
||||
View mItem3;
|
||||
GifImageView liveing1;
|
||||
GifImageView liveing2;
|
||||
GifImageView liveing3;
|
||||
ImageView mAvatar1;
|
||||
ImageView mAvatar2;
|
||||
ImageView mAvatar3;
|
||||
TextView mName1;
|
||||
TextView mName2;
|
||||
TextView mName3;
|
||||
TextView mVotes1;
|
||||
TextView mVotes2;
|
||||
TextView mVotes3;
|
||||
ImageView mSex1;
|
||||
ImageView mSex2;
|
||||
ImageView mSex3;
|
||||
ImageView diamond1;
|
||||
ImageView diamond2;
|
||||
ImageView diamond3;
|
||||
Button mBtnFollow1;
|
||||
Button mBtnFollow2;
|
||||
Button mBtnFollow3;
|
||||
SVGAImageView svga1;
|
||||
SVGAImageView svga2;
|
||||
SVGAImageView svga3;
|
||||
|
||||
public HeadView(View itemView) {
|
||||
mItem1 = itemView.findViewById(R.id.item_1);
|
||||
mItem2 = itemView.findViewById(R.id.item_2);
|
||||
mItem3 = itemView.findViewById(R.id.item_3);
|
||||
liveing1 = itemView.findViewById(R.id.liveing1);
|
||||
liveing2 = itemView.findViewById(R.id.liveing2);
|
||||
liveing3 = itemView.findViewById(R.id.liveing3);
|
||||
mAvatar1 = itemView.findViewById(R.id.avatar_1);
|
||||
mAvatar2 = itemView.findViewById(R.id.avatar_2);
|
||||
mAvatar3 = itemView.findViewById(R.id.avatar_3);
|
||||
mName1 = itemView.findViewById(R.id.name_1);
|
||||
mName2 = itemView.findViewById(R.id.name_2);
|
||||
mName3 = itemView.findViewById(R.id.name_3);
|
||||
mVotes1 = itemView.findViewById(R.id.votes_1);
|
||||
mVotes2 = itemView.findViewById(R.id.votes_2);
|
||||
mVotes3 = itemView.findViewById(R.id.votes_3);
|
||||
mSex1 = itemView.findViewById(R.id.sex_1);
|
||||
mSex2 = itemView.findViewById(R.id.sex_2);
|
||||
mSex3 = itemView.findViewById(R.id.sex_3);
|
||||
diamond1 = itemView.findViewById(R.id.diamond1);
|
||||
diamond2 = itemView.findViewById(R.id.diamond2);
|
||||
diamond3 = itemView.findViewById(R.id.diamond3);
|
||||
mBtnFollow1 = itemView.findViewById(R.id.btn_follow_1);
|
||||
mBtnFollow2 = itemView.findViewById(R.id.btn_follow_2);
|
||||
mBtnFollow3 = itemView.findViewById(R.id.btn_follow_3);
|
||||
svga1 = itemView.findViewById(R.id.svga1);
|
||||
svga2 = itemView.findViewById(R.id.svga2);
|
||||
svga3 = itemView.findViewById(R.id.svga3);
|
||||
}
|
||||
void setData(HomeRankBean user, int position){
|
||||
getItem(position,mName1,mName2,mName3).setText(user.getUserNicename());
|
||||
getItem(position,mVotes1,mVotes2,mVotes3).setText(user.getMoney());
|
||||
if(user.isFollow()){
|
||||
getItem(position,mBtnFollow1,mBtnFollow2,mBtnFollow3).setVisibility(View.GONE);
|
||||
}else{
|
||||
getItem(position,mBtnFollow1,mBtnFollow2,mBtnFollow3).setVisibility(View.VISIBLE);
|
||||
}
|
||||
if(user.getSex()==1) {
|
||||
getItem(position, mSex1, mSex2, mSex3).setImageResource(R.mipmap.ic_message_tab_man);
|
||||
}else{
|
||||
getItem(position, mSex1, mSex2, mSex3).setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
switch (position){
|
||||
case 0:
|
||||
svga1.setImageResource(R.mipmap.ic_home_rank_top_1);
|
||||
break;
|
||||
case 1:
|
||||
svga2.setImageResource(R.mipmap.ic_home_rank_top_2);
|
||||
break;
|
||||
case 2:
|
||||
svga3.setImageResource(R.mipmap.ic_home_rank_top_3);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
private <T> T getItem(int position, T... views) {
|
||||
return views[position];
|
||||
}
|
||||
|
||||
private void setVisibility(int type, int position, View... views) {
|
||||
if (position == -1) {
|
||||
for (View view : views) {
|
||||
view.setVisibility(type);
|
||||
}
|
||||
} else {
|
||||
views[position].setVisibility(type);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.shayu.onetoone.activity.fragments.home;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -9,6 +10,7 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.fragments.BaseFragment;
|
||||
import com.shayu.onetoone.activity.HomepageRankingActivity;
|
||||
import com.shayu.onetoone.adapter.HomeRecommendListAdapter;
|
||||
import com.shayu.onetoone.bean.HomeItemBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
@ -33,8 +35,8 @@ public class RecommendFragment extends BaseFragment {
|
||||
public void initView(View itemView) {
|
||||
recyclerView = itemView.findViewById(R.id.recyclerView);
|
||||
mRefreshLayout = itemView.findViewById(R.id.swipeRefreshLayout);
|
||||
top=itemView.findViewById(R.id.btn_top_list);
|
||||
adapter=new HomeRecommendListAdapter(getContext());
|
||||
top = itemView.findViewById(R.id.btn_top_list);
|
||||
adapter = new HomeRecommendListAdapter(getContext());
|
||||
recyclerView.setAdapter(adapter);
|
||||
mRefreshLayout.setNestedScrollingEnabled(false);
|
||||
mRefreshLayout.setRefreshHeader(new RongRefreshHeader(this.getContext()));
|
||||
@ -50,7 +52,8 @@ public class RecommendFragment extends BaseFragment {
|
||||
}
|
||||
});
|
||||
top.setOnClickListener(view -> {
|
||||
recyclerView.scrollToPosition(0);
|
||||
// recyclerView.scrollToPosition(0);
|
||||
startActivity(new Intent(getContext(), HomepageRankingActivity.class));
|
||||
});
|
||||
initData();
|
||||
}
|
||||
@ -62,7 +65,8 @@ public class RecommendFragment extends BaseFragment {
|
||||
private void onConversationListRefresh(RefreshLayout refreshLayout) {
|
||||
initData();
|
||||
}
|
||||
private void initData(){
|
||||
|
||||
private void initData() {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getHomeRecommend(new HttpCallback<List<HomeItemBean>>() {
|
||||
@Override
|
||||
|
@ -1,6 +1,10 @@
|
||||
package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
@ -20,10 +24,12 @@ import com.lxj.xpopup.interfaces.OnSelectListener;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.adapter.MsgChatMessageListAdapter;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.MessageChatAuthContent;
|
||||
import com.shayu.onetoone.bean.MessageChatTipsContent;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.dialog.BottomListDialog;
|
||||
import com.shayu.onetoone.dialog.MsgChatClickDialog;
|
||||
import com.shayu.onetoone.dialog.TipsDialog;
|
||||
import com.shayu.onetoone.listener.OnCallStatusListener;
|
||||
import com.shayu.onetoone.listener.OnDialogClickListener;
|
||||
@ -393,7 +399,19 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
targetId = getIntent().getStringExtra("targetId");
|
||||
updateUserInfo();
|
||||
follow.setOnClickListener(v -> {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.follow(targetId, new HttpCallback<FollowBean>() {
|
||||
@Override
|
||||
public void onSuccess(FollowBean data) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.system_tip_success));
|
||||
follow.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -421,6 +439,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
default:
|
||||
status.setImageResource(R.mipmap.ic_message_msg_status_offline);
|
||||
}
|
||||
if (data.getUser().isFollow()) {
|
||||
follow.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -432,21 +453,66 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
|
||||
@Override
|
||||
public boolean onViewLongClick(int clickType, UiMessage data) {
|
||||
View position = mLinearLayoutManager.findViewByPosition(((MsgChatMessageListAdapter)mAdapter).getPosition(data.getMessageId()));
|
||||
View position = mLinearLayoutManager.findViewByPosition(((MsgChatMessageListAdapter) mAdapter).getPosition(data.getMessageId()));
|
||||
boolean isMy = data.getMessage().getMessageDirection() == Message.MessageDirection.SEND;
|
||||
boolean isTextMessage = data.getMessage().getContent() instanceof TextMessage;
|
||||
String[] list;
|
||||
if (isTextMessage) {
|
||||
if (isMy) {
|
||||
list = new String[]{"複製", "刪除"};
|
||||
} else {
|
||||
list = new String[]{"複製"};
|
||||
}
|
||||
} else {
|
||||
if (isMy) {
|
||||
list = new String[]{"刪除"};
|
||||
} else {
|
||||
list = null;
|
||||
}
|
||||
}
|
||||
if (list == null) {
|
||||
return true;
|
||||
}
|
||||
new XPopup.Builder(getContext())
|
||||
.atView(position) // 依附于所点击的View,内部会自动判断在上方或者下方显示
|
||||
.asAttachList(new String[]{"分享", "编辑", "不带icon"},
|
||||
new int[]{R.mipmap.ic_launcher, R.mipmap.ic_launcher},
|
||||
new OnSelectListener() {
|
||||
.atView(position.findViewById(R.id.rc_content))
|
||||
.hasShadowBg(false)
|
||||
.positionByWindowCenter(true)
|
||||
.asCustom(new MsgChatClickDialog(getActivity())
|
||||
.setList(Arrays.asList(list))
|
||||
.setOnItemClickListener(new OnItemClickListener<String>() {
|
||||
@Override
|
||||
public void onSelect(int position, String text) {
|
||||
ToastUtil.show("click " + text);
|
||||
public void onItemClick(String bean, int position) {
|
||||
if (bean.equals("複製")) {
|
||||
copyText(data);
|
||||
} else {
|
||||
delete(data);
|
||||
}
|
||||
}
|
||||
})
|
||||
}))
|
||||
.show();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void copyText(UiMessage uiMessage) {
|
||||
ClipboardManager cm = (ClipboardManager) getContext().getSystemService(CLIPBOARD_SERVICE);
|
||||
ClipData clipData = ClipData.newPlainText("text", uiMessage.getContentSpannable());
|
||||
cm.setPrimaryClip(clipData);
|
||||
}
|
||||
|
||||
private void delete(UiMessage uiMessage) {
|
||||
IMCenter.getInstance().deleteMessages(Conversation.ConversationType.PRIVATE, targetId, new int[]{uiMessage.getMessageId()}, new RongIMClient.ResultCallback<Boolean>() {
|
||||
@Override
|
||||
public void onSuccess(Boolean aBoolean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(RongIMClient.ErrorCode e) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageListAdapter onResolveAdapter() {
|
||||
return new MsgChatMessageListAdapter(this);
|
||||
|
@ -38,11 +38,6 @@ import io.rong.imkit.conversation.ConversationFragment;
|
||||
public class ChatActivity extends AbsOTOActivity {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
|
@ -39,12 +39,12 @@ public class HomeRecommendListAdapter extends RecyclerView.Adapter<HomeRecommend
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
holder.setData(list.get(position), position);
|
||||
// holder.setData(list.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
return 10;
|
||||
}
|
||||
|
||||
public void setList(List<HomeItemBean> data) {
|
||||
|
@ -1,15 +1,24 @@
|
||||
package com.shayu.onetoone.adapter;
|
||||
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import io.rong.imkit.conversation.MessageListAdapter;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imkit.widget.adapter.IViewProviderListener;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
|
||||
public class MsgChatMessageListAdapter extends MessageListAdapter {
|
||||
public MsgChatMessageListAdapter(IViewProviderListener<UiMessage> listener) {
|
||||
super(listener);
|
||||
}
|
||||
//onCreateMessageContentViewH
|
||||
|
||||
public void onLongClick(int messageId) {
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return super.onCreateViewHolder(parent, viewType);
|
||||
}
|
||||
|
||||
public int getPosition(int messageId) {
|
||||
|
@ -2,6 +2,7 @@ package com.shayu.onetoone.adapter;
|
||||
|
||||
import android.text.SpannableString;
|
||||
|
||||
import com.shayu.onetoone.bean.MessageChatGiftContent;
|
||||
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -63,6 +64,9 @@ public class MsgMessageRecyclerViewAdapter extends ConversationListAdapter {
|
||||
continue;
|
||||
}
|
||||
if (datum.mCore.getConversationType() == Conversation.ConversationType.PRIVATE || datum.mCore.getConversationType() == Conversation.ConversationType.SYSTEM) {
|
||||
if(datum.mCore.getLatestMessage() instanceof MessageChatGiftContent){
|
||||
datum.mConversationContent=new SpannableString("[禮物]");
|
||||
}
|
||||
if (datum.mCore.isTop()) {
|
||||
top.add(datum);
|
||||
} else {
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.shayu.onetoone.bean;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class FollowBean extends BaseModel {
|
||||
private String isattent;
|
||||
private int fans_status;
|
||||
|
||||
public FollowBean() {
|
||||
}
|
||||
|
||||
public String getIsattent() {
|
||||
return isattent;
|
||||
}
|
||||
|
||||
public void setIsattent(String isattent) {
|
||||
this.isattent = isattent;
|
||||
}
|
||||
|
||||
public int getFans_status() {
|
||||
return fans_status;
|
||||
}
|
||||
|
||||
public void setFans_status(int fans_status) {
|
||||
this.fans_status = fans_status;
|
||||
}
|
||||
}
|
202
OneToOne/src/main/java/com/shayu/onetoone/bean/HomeRankBean.java
Normal file
202
OneToOne/src/main/java/com/shayu/onetoone/bean/HomeRankBean.java
Normal file
@ -0,0 +1,202 @@
|
||||
package com.shayu.onetoone.bean;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class HomeRankBean extends BaseModel {
|
||||
private String id;
|
||||
private String uid;
|
||||
private String money;
|
||||
private int type;
|
||||
private int ymd;
|
||||
private int yw;
|
||||
private int ym;
|
||||
private long updateTime;
|
||||
private long createTime;
|
||||
private int isAttention;//0 未关注 1被关注 2已关注 3互相关注
|
||||
private int islive;
|
||||
private String avatar;
|
||||
private String avatarThumb;
|
||||
private String userNicename;
|
||||
private int sex;
|
||||
private int level;
|
||||
private int charmLevel;
|
||||
private int wealthLevel;
|
||||
private String icon;
|
||||
private String charmIcon;
|
||||
private String wealthIcon;
|
||||
|
||||
public HomeRankBean() {
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(String money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getYmd() {
|
||||
return ymd;
|
||||
}
|
||||
|
||||
public void setYmd(int ymd) {
|
||||
this.ymd = ymd;
|
||||
}
|
||||
|
||||
public int getYw() {
|
||||
return yw;
|
||||
}
|
||||
|
||||
public void setYw(int yw) {
|
||||
this.yw = yw;
|
||||
}
|
||||
|
||||
public int getYm() {
|
||||
return ym;
|
||||
}
|
||||
|
||||
public void setYm(int ym) {
|
||||
this.ym = ym;
|
||||
}
|
||||
|
||||
public long getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(long updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public int getIsAttention() {
|
||||
return isAttention;
|
||||
}
|
||||
|
||||
public void setIsAttention(int isAttention) {
|
||||
this.isAttention = isAttention;
|
||||
}
|
||||
|
||||
public int getIslive() {
|
||||
return islive;
|
||||
}
|
||||
|
||||
public void setIslive(int islive) {
|
||||
this.islive = islive;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getAvatarThumb() {
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
public void setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public void setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(int sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getCharmLevel() {
|
||||
return charmLevel;
|
||||
}
|
||||
|
||||
public void setCharmLevel(int charmLevel) {
|
||||
this.charmLevel = charmLevel;
|
||||
}
|
||||
|
||||
public int getWealthLevel() {
|
||||
return wealthLevel;
|
||||
}
|
||||
|
||||
public void setWealthLevel(int wealthLevel) {
|
||||
this.wealthLevel = wealthLevel;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getCharmIcon() {
|
||||
return charmIcon;
|
||||
}
|
||||
|
||||
public void setCharmIcon(String charmIcon) {
|
||||
this.charmIcon = charmIcon;
|
||||
}
|
||||
|
||||
public String getWealthIcon() {
|
||||
return wealthIcon;
|
||||
}
|
||||
|
||||
public void setWealthIcon(String wealthIcon) {
|
||||
this.wealthIcon = wealthIcon;
|
||||
}
|
||||
|
||||
public boolean isFollow() {
|
||||
return isAttention == 2 || isAttention == 3;
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.shayu.onetoone.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.AttachPopupView;
|
||||
import com.lxj.xpopup.core.BubbleAttachPopupView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.event.MessageMsgBusEvent;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 聊天界面长按气泡菜单
|
||||
*/
|
||||
public class MsgChatClickDialog extends AttachPopupView implements View.OnClickListener {
|
||||
LinearLayout rootView;
|
||||
List<String> list;
|
||||
OnItemClickListener<String> onItemClickListener;
|
||||
|
||||
public MsgChatClickDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public MsgChatClickDialog setList(List<String> list) {
|
||||
this.list = list;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MsgChatClickDialog setOnItemClickListener(OnItemClickListener<String> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dialog_msg_chat_click;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isShowUpToTarget() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
isShowUp = true;
|
||||
rootView = findViewById(R.id.rootView);
|
||||
rootView.setGravity(Gravity.CENTER);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT);
|
||||
params.gravity = Gravity.CENTER;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
String item = list.get(i);
|
||||
TextView textView = new TextView(getContext());
|
||||
textView.setText(item);
|
||||
textView.setGravity(Gravity.CENTER);
|
||||
textView.setTag(i);
|
||||
textView.setTextColor(Color.WHITE);
|
||||
textView.setLayoutParams(params);
|
||||
textView.setOnClickListener(this);
|
||||
rootView.addView(textView,params);
|
||||
|
||||
TextView tmp = new TextView(getContext());
|
||||
tmp.setLayoutParams(params);
|
||||
tmp.setText(" | ");
|
||||
tmp.setGravity(Gravity.CENTER);
|
||||
tmp.setTextColor(Color.WHITE);
|
||||
rootView.addView(tmp,params);
|
||||
}
|
||||
rootView.removeViewAt(rootView.getChildCount()-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(((TextView) v).getText().toString(), (Integer) v.getTag());
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.shayu.onetoone.listener;
|
||||
|
||||
public interface OnAppbarListener {
|
||||
void onShow(boolean isShow);
|
||||
}
|
@ -6,6 +6,7 @@ import android.util.Log;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.GiftBean;
|
||||
import com.shayu.onetoone.bean.GreetBean;
|
||||
import com.shayu.onetoone.bean.HomeItemBean;
|
||||
@ -629,6 +630,27 @@ public class OTONetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void follow(String toUid, HttpCallback<FollowBean> callback) {
|
||||
|
||||
API.get().otoApi(mContext)
|
||||
.follow(toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe((Consumer<ResponseModel<List<FollowBean>>>) model -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(model.getData().getInfo().get(0));
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
Log.e(TAG, "accept: ", throwable);
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
private MultipartBody.Part createUploadFile(File file) {
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.shayu.onetoone.network;
|
||||
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.GiftBean;
|
||||
import com.shayu.onetoone.bean.GreetBean;
|
||||
import com.shayu.onetoone.bean.HomeItemBean;
|
||||
@ -137,6 +138,9 @@ public interface OneToOneApi {
|
||||
Observable<ResponseModel<List<GiftBean>>> getGiftList();
|
||||
@GET("/api/public/?service=Friendappmoney.info")
|
||||
Observable<ResponseModel<PurseBean>> getPurseInfo();
|
||||
@GET("/api/public/?service=User.setAttents")
|
||||
Observable<ResponseModel<List<FollowBean>>> follow(@Query("touid")String toUid);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,8 +61,10 @@ public class MessageChatReceiveGiftItemProvider extends BaseMessageItemProvider<
|
||||
if (messageChatGiftContent.getSendUid().equals(IMLoginManager.get(mContext).getUserInfo().getId() + "")) {
|
||||
params.gravity = Gravity.END;
|
||||
uiMessage.setMessageDirection(Message.MessageDirection.SEND);
|
||||
holder.setText(R.id.title,"送给TA");
|
||||
} else {
|
||||
uiMessage.setMessageDirection(Message.MessageDirection.RECEIVE);
|
||||
holder.setText(R.id.title,"送给你");
|
||||
params.gravity = Gravity.START;
|
||||
}
|
||||
try {
|
||||
|
9
OneToOne/src/main/res/drawable/background_dbdbdb.xml
Normal file
9
OneToOne/src/main/res/drawable/background_dbdbdb.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="20dp" />
|
||||
<solid android:color="#dbdbdb" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
21
OneToOne/src/main/res/drawable/background_white_up.xml
Normal file
21
OneToOne/src/main/res/drawable/background_white_up.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- rectangle表示为矩形 -->
|
||||
|
||||
<!-- 填充的颜色 -->
|
||||
<solid android:color="@color/white" />
|
||||
|
||||
<!-- 边框的颜色和粗细 -->
|
||||
<stroke
|
||||
android:width="0dp"
|
||||
android:color="@color/white" />
|
||||
|
||||
<!-- android:radius 圆角的半径 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="25dp"
|
||||
android:topRightRadius="25dp" />
|
||||
|
||||
</shape>
|
9
OneToOne/src/main/res/drawable/bg_home_rank_day.xml
Normal file
9
OneToOne/src/main/res/drawable/bg_home_rank_day.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="25dp" />
|
||||
<solid android:color="#FFFFFF" />
|
||||
</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="58dp" android:height="24dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#ff9b61f0" android:endColor="#ffbc6ef0" android:angle="45" />
|
||||
<corners android:topLeftRadius="12dp" android:topRightRadius="12dp" android:bottomLeftRadius="12dp" android:bottomRightRadius="12dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
98
OneToOne/src/main/res/layout/activity_main_list.xml
Normal file
98
OneToOne/src/main/res/layout/activity_main_list.xml
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.angcyo.tablayout.DslTabLayout
|
||||
android:id="@+id/dslTabLayout"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="42dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tab_deselect_color="@color/white"
|
||||
app:tab_enable_gradient_scale="true"
|
||||
app:tab_enable_text_bold="true"
|
||||
app:tab_indicator_drawable="@mipmap/ic_home_rank_tab_indicator"
|
||||
app:tab_indicator_height="6dp"
|
||||
app:tab_indicator_style="STYLE_BOTTOM"
|
||||
app:tab_indicator_width="17dp"
|
||||
app:tab_item_is_equ_width="true"
|
||||
app:tab_select_color="@color/white"
|
||||
app:tab_text_max_size="18sp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="魅力榜"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="财富榜"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
</com.angcyo.tablayout.DslTabLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radioGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_home_rank_day"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dslTabLayout">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/btn_day"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/bg_home_rank_day_select"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/main_list_day"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/btn_week"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/bg_list_btn"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:text="@string/main_list_week"
|
||||
android:textColor="#666666"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
12
OneToOne/src/main/res/layout/dialog_msg_chat_click.xml
Normal file
12
OneToOne/src/main/res/layout/dialog_msg_chat_click.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/rootView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:background="@mipmap/bg_chat_click"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
458
OneToOne/src/main/res/layout/fragment_home_ranking.xml
Normal file
458
OneToOne/src/main/res/layout/fragment_home_ranking.xml
Normal file
@ -0,0 +1,458 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/root_layout"
|
||||
android:background="@mipmap/bg_glamour_top"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/rootView"
|
||||
android:background="#00FFFFFF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:minHeight="100dp"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
||||
app:toolbarId="@+id/toolbar">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bg_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="421dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/item_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/item_2"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_3"
|
||||
app:layout_constraintStart_toEndOf="@+id/item_2">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar_1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga1"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/liveing1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:src="@mipmap/icon_user_home_living"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxEms="4"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sex_1"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/diamond1"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/diamond"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/votes_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/btn_follow_1"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="23dp"
|
||||
android:background="@drawable/bg_message_msg_bar_follow"
|
||||
android:text="关注"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:visibility="invisible"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/more"
|
||||
app:layout_constraintTop_toTopOf="@+id/btn_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/item_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="152dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_1"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar_2"
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="#B6B6B6"
|
||||
app:riv_border_width="2dp"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/liveing2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:src="@mipmap/icon_user_home_living"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxEms="4"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sex_2"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/diamond2"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/diamond"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/votes_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_follow_2"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="23dp"
|
||||
android:background="@drawable/bg_message_msg_bar_follow"
|
||||
android:text="关注"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:visibility="invisible"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/more"
|
||||
app:layout_constraintTop_toTopOf="@+id/btn_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/item_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/item_1">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar_3"
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="#B6B6B6"
|
||||
app:riv_border_width="2dp"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="66dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/liveing3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:src="@mipmap/icon_user_home_living"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxEms="4"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sex_3"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/diamond3"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@mipmap/diamond"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/votes_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_follow_3"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="23dp"
|
||||
android:background="@drawable/bg_message_msg_bar_follow"
|
||||
android:text="关注"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:visibility="invisible"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/more"
|
||||
app:layout_constraintTop_toTopOf="@+id/btn_back" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<io.rong.imkit.widget.refresh.SmartRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
android:background="@drawable/background_white_up"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="-5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.yanzhenjie.recyclerview.SwipeRecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:itemCount="5"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:spanCount="2"
|
||||
tools:listitem="@layout/item_home_recommend" />
|
||||
</io.rong.imkit.widget.refresh.SmartRefreshLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
161
OneToOne/src/main/res/layout/rc_message_item.xml
Normal file
161
OneToOne/src/main/res/layout/rc_message_item.xml
Normal file
@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rc_cl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/rc_margin_size_10"
|
||||
android:paddingBottom="@dimen/rc_margin_size_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rc_time"
|
||||
style="@style/TextStyle.Alignment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="12dp"
|
||||
android:textColor="@color/rc_secondary_color"
|
||||
android:textSize="@dimen/rc_font_describe_size"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="7月29日 12:30" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rc_selected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/rc_margin_size_8"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/rc_selector_selected"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ll_content" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/rc_left_portrait"
|
||||
android:layout_width="@dimen/rc_message_portrait_size"
|
||||
android:layout_height="@dimen/rc_message_portrait_size"
|
||||
android:layout_marginStart="@dimen/rc_margin_size_4"
|
||||
app:riv_oval="true"
|
||||
android:src="@color/rc_secondary_color"
|
||||
app:layout_constraintStart_toEndOf="@id/rc_selected"
|
||||
app:layout_constraintTop_toTopOf="@id/ll_content"
|
||||
app:layout_goneMarginStart="@dimen/rc_margin_size_12" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/rc_right_portrait"
|
||||
android:layout_width="@dimen/rc_message_portrait_size"
|
||||
app:riv_oval="true"
|
||||
android:layout_height="@dimen/rc_message_portrait_size"
|
||||
android:layout_marginEnd="@dimen/rc_margin_size_12"
|
||||
android:src="@color/rc_secondary_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ll_content"
|
||||
app:layout_goneMarginTop="@dimen/rc_margin_size_20" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/rc_margin_size_8"
|
||||
android:layout_marginEnd="@dimen/rc_margin_size_8"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toStartOf="@id/rc_right_portrait"
|
||||
app:layout_constraintStart_toEndOf="@id/rc_left_portrait"
|
||||
app:layout_constraintTop_toBottomOf="@id/rc_time">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rc_title"
|
||||
style="@style/TextStyle.Alignment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/rc_secondary_color"
|
||||
android:textSize="@dimen/rc_font_text_third_size" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rc_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/rc_progress"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:indeterminateDrawable="@drawable/rc_progress_sending_style"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rc_warning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/rc_ic_warning"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rc_read_receipt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/rc_read_receipt"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rc_read_receipt_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginEnd="4dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rc_read_receipt_request"
|
||||
style="@style/TextStyle.Alignment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:drawableStart="@drawable/rc_read_receipt_request_button"
|
||||
android:textColor="@color/rc_read_receipt_status"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rc_read_receipt_status"
|
||||
style="@style/TextStyle.Alignment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/rc_read_receipt_status"
|
||||
android:textColor="@color/rc_read_receipt_status"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/rc_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/rc_v_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
BIN
OneToOne/src/main/res/mipmap-xxhdpi/bg_chat_click.9.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/bg_chat_click.9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/bg_glamour_top.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/bg_glamour_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 662 KiB |
Binary file not shown.
After Width: | Height: | Size: 636 B |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_home_rank_top_1.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_home_rank_top_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_home_rank_top_2.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_home_rank_top_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_home_rank_top_3.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_home_rank_top_3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
@ -21,4 +21,7 @@
|
||||
<!--显示区域以外是否使用黑色半透明背景-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
<style name="TransparentTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
</style>
|
||||
</resources>
|
@ -258,7 +258,21 @@ public class IMLoginModel extends BaseModel {
|
||||
@SerializedName("need_bind")
|
||||
int needBind;
|
||||
@SerializedName("online")
|
||||
private String online ;
|
||||
private String online;
|
||||
@SerializedName("isAttention")
|
||||
private int isAttention;//0 未关注 1被关注 2已关注 3互相关注
|
||||
|
||||
public int getIsAttention() {
|
||||
return isAttention;
|
||||
}
|
||||
|
||||
public void setIsAttention(int isAttention) {
|
||||
this.isAttention = isAttention;
|
||||
}
|
||||
|
||||
public boolean isFollow() {
|
||||
return isAttention == 2 || isAttention == 3;
|
||||
}
|
||||
|
||||
public String getOnline() {
|
||||
return online;
|
||||
|
Loading…
x
Reference in New Issue
Block a user