首页消息tab改版
@@ -1061,7 +1061,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".miniworld.activity.MiniWorldMainActivity"
|
android:name=".miniworld.activity.MiniWorldMainActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity android:name=".ui.im.friend.ActFriendList" />
|
|
||||||
|
|
||||||
<!-- 银行卡列表 -->
|
<!-- 银行卡列表 -->
|
||||||
<activity
|
<activity
|
||||||
@@ -1303,6 +1302,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name="com.tongdaxing.erban.upgrade.view.UpdateDialogActivity"
|
android:name="com.tongdaxing.erban.upgrade.view.UpdateDialogActivity"
|
||||||
android:theme="@style/UpdateDialog" />
|
android:theme="@style/UpdateDialog" />
|
||||||
|
<activity
|
||||||
|
android:name=".home.activity.RelationListActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
@@ -26,6 +26,7 @@ import androidx.fragment.app.FragmentTransaction;
|
|||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
import com.mango.moshen.home.fragment.PmModeFragment;
|
import com.mango.moshen.home.fragment.PmModeFragment;
|
||||||
|
import com.mango.moshen.ui.im.recent.RecentListFragment;
|
||||||
import com.mango.moshen.ui.patriarch.PmModeChangeEvent;
|
import com.mango.moshen.ui.patriarch.PmModeChangeEvent;
|
||||||
import com.mango.moshen.utils.UserUtils;
|
import com.mango.moshen.utils.UserUtils;
|
||||||
import com.netease.nim.uikit.StatusBarUtil;
|
import com.netease.nim.uikit.StatusBarUtil;
|
||||||
@@ -59,7 +60,6 @@ import com.mango.moshen.family.view.activity.FamilyHomeActivity;
|
|||||||
import com.mango.moshen.home.HomeViewModel;
|
import com.mango.moshen.home.HomeViewModel;
|
||||||
import com.mango.moshen.home.dialog.NewUserHelloDialog;
|
import com.mango.moshen.home.dialog.NewUserHelloDialog;
|
||||||
import com.mango.moshen.home.dialog.ProtocolUpdateDialog;
|
import com.mango.moshen.home.dialog.ProtocolUpdateDialog;
|
||||||
import com.mango.moshen.home.fragment.ContactsListFragment;
|
|
||||||
import com.mango.moshen.home.fragment.HomeFragment;
|
import com.mango.moshen.home.fragment.HomeFragment;
|
||||||
import com.mango.moshen.home.fragment.MeFragment;
|
import com.mango.moshen.home.fragment.MeFragment;
|
||||||
import com.mango.moshen.home.presenter.MainPresenter;
|
import com.mango.moshen.home.presenter.MainPresenter;
|
||||||
@@ -178,7 +178,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
|||||||
|
|
||||||
{
|
{
|
||||||
fragmentArray.put(MainTabType.TAB_TYPE_HOME, new HomeFragment());
|
fragmentArray.put(MainTabType.TAB_TYPE_HOME, new HomeFragment());
|
||||||
fragmentArray.put(MainTabType.TAB_TYPE_MSG, new ContactsListFragment());
|
fragmentArray.put(MainTabType.TAB_TYPE_MSG, new RecentListFragment());
|
||||||
fragmentArray.put(MainTabType.TAB_TYPE_SQUARE, new SquareFragment());
|
fragmentArray.put(MainTabType.TAB_TYPE_SQUARE, new SquareFragment());
|
||||||
fragmentArray.put(MainTabType.TAB_TYPE_ME, new MeFragment());
|
fragmentArray.put(MainTabType.TAB_TYPE_ME, new MeFragment());
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,99 @@
|
|||||||
|
package com.mango.moshen.home.activity;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.mango.core.Constants;
|
||||||
|
import com.mango.moshen.R;
|
||||||
|
import com.mango.moshen.base.BaseActivity;
|
||||||
|
import com.mango.moshen.friend.action.AbstractSelectFriendAction;
|
||||||
|
import com.mango.moshen.home.adapter.ContactsIndicatorAdapter;
|
||||||
|
import com.mango.moshen.home.adapter.FragmentViewPagerAdapter;
|
||||||
|
import com.mango.moshen.home.fragment.AttentionFragment;
|
||||||
|
import com.mango.moshen.relation.cp.activity.CpInviteRecordFragment;
|
||||||
|
import com.mango.moshen.ui.im.friend.FriendListFragment;
|
||||||
|
import com.mango.moshen.ui.relation.FansListFragment;
|
||||||
|
import com.mango.moshen.ui.widget.magicindicator.MagicIndicator;
|
||||||
|
import com.mango.moshen.ui.widget.magicindicator.ViewPagerHelper;
|
||||||
|
import com.mango.moshen.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||||
|
import com.netease.nim.uikit.StatusBarUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author jack
|
||||||
|
* @Description
|
||||||
|
* @Date 2018/11/1
|
||||||
|
*/
|
||||||
|
public class RelationListActivity extends BaseActivity implements ContactsIndicatorAdapter.OnItemSelectListener {
|
||||||
|
public static final String TAG = "ContactsListFragment";
|
||||||
|
private MagicIndicator indicator;
|
||||||
|
private ViewPager viewpager;
|
||||||
|
|
||||||
|
public static void start(Context context) {
|
||||||
|
Intent starter = new Intent(context, RelationListActivity.class);
|
||||||
|
context.startActivity(starter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_relation_list);
|
||||||
|
indicator = findViewById(R.id.indicator);
|
||||||
|
viewpager = findViewById(R.id.viewpager);
|
||||||
|
initCommonNavigator();
|
||||||
|
findViewById(R.id.iv_back).setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initCommonNavigator() {
|
||||||
|
List<String> tabInfoList = new ArrayList<>();
|
||||||
|
tabInfoList.add(getString(R.string.friend));
|
||||||
|
tabInfoList.add(getString(R.string.attention));
|
||||||
|
tabInfoList.add(getString(R.string.fan));
|
||||||
|
tabInfoList.add("关系申请");
|
||||||
|
List<Fragment> mTabs = new ArrayList<>();
|
||||||
|
mTabs.add(new FriendListFragment());
|
||||||
|
mTabs.add(AttentionFragment.newInstance(AbstractSelectFriendAction.TYPE_NORMAL));
|
||||||
|
mTabs.add(FansListFragment.newInstance(Constants.FAN_MAIN_PAGE_TYPE));
|
||||||
|
mTabs.add(CpInviteRecordFragment.Companion.newInstance(true));
|
||||||
|
ContactsIndicatorAdapter mMsgIndicatorAdapter = new ContactsIndicatorAdapter(this, tabInfoList, 0);
|
||||||
|
mMsgIndicatorAdapter.setOnItemSelectListener(this);
|
||||||
|
CommonNavigator commonNavigator = new CommonNavigator(this);
|
||||||
|
commonNavigator.setAdjustMode(true);
|
||||||
|
commonNavigator.setAdapter(mMsgIndicatorAdapter);
|
||||||
|
indicator.setNavigator(commonNavigator);
|
||||||
|
// must after setNavigator
|
||||||
|
LinearLayout titleContainer = commonNavigator.getTitleContainer();
|
||||||
|
titleContainer.setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
|
||||||
|
|
||||||
|
viewpager.setAdapter(new FragmentViewPagerAdapter(getSupportFragmentManager(), mTabs));
|
||||||
|
viewpager.setOffscreenPageLimit(4);
|
||||||
|
ViewPagerHelper.bind(indicator, viewpager);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemSelect(int position) {
|
||||||
|
viewpager.setCurrentItem(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean needSteepStateBar() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setStatusBar() {
|
||||||
|
super.setStatusBar();
|
||||||
|
StatusBarUtil.transparencyBar(this);
|
||||||
|
StatusBarUtil.StatusBarLightMode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,71 +0,0 @@
|
|||||||
package com.mango.moshen.home.fragment
|
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import com.netease.nimlib.sdk.NIMClient
|
|
||||||
import com.netease.nimlib.sdk.msg.MsgService
|
|
||||||
import com.mango.moshen.R
|
|
||||||
import com.mango.moshen.base.BaseViewBindingFragment
|
|
||||||
import com.mango.moshen.common.widget.dialog.DialogManager.AbsOkDialogListener
|
|
||||||
import com.mango.moshen.databinding.FragmentContactListBinding
|
|
||||||
import com.mango.moshen.home.event.ContactTrashEvent
|
|
||||||
import com.mango.moshen.relation.cp.activity.CpInviteRecordActivity
|
|
||||||
import com.mango.moshen.ui.im.recent.RecentListFragment
|
|
||||||
import com.mango.moshen.ui.relation.AttentionListActivity
|
|
||||||
import com.mango.moshen.ui.relation.FansListActivity
|
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author jack
|
|
||||||
* @Description
|
|
||||||
* @Date 2018/11/1
|
|
||||||
*/
|
|
||||||
class ContactsListFragment : BaseViewBindingFragment<FragmentContactListBinding>() {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
const val TAG = "ContactsListFragment"
|
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(): Fragment {
|
|
||||||
return ContactsListFragment()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
|
||||||
childFragmentManager.beginTransaction()
|
|
||||||
.add(R.id.fcv, RecentListFragment.newInstance(false))
|
|
||||||
.commitAllowingStateLoss()
|
|
||||||
//标记已读消息
|
|
||||||
binding.ivContactTrash.setOnClickListener {
|
|
||||||
if (NIMClient.getService(MsgService::class.java).totalUnreadCount > 0) {
|
|
||||||
dialogManager.showOkCancelDialog(
|
|
||||||
getString(R.string.tips_clear_unread_count),
|
|
||||||
getString(R.string.tips_ok_label_clear),
|
|
||||||
getString(R.string.text_canle),
|
|
||||||
object : AbsOkDialogListener() {
|
|
||||||
override fun onOk() {
|
|
||||||
EventBus.getDefault().post(ContactTrashEvent())
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCancel() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
toast("暂无未读消息需要清理")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.tvFans.setOnClickListener {
|
|
||||||
FansListActivity.start(requireContext(), FansListActivity.TYPE_FANS)
|
|
||||||
}
|
|
||||||
binding.tvAttention.setOnClickListener {
|
|
||||||
AttentionListActivity.start(requireContext())
|
|
||||||
}
|
|
||||||
binding.tvFriend.setOnClickListener {
|
|
||||||
FansListActivity.start(requireContext(), FansListActivity.TYPE_FRIEND)
|
|
||||||
}
|
|
||||||
binding.tvRelation.setOnClickListener {
|
|
||||||
CpInviteRecordActivity.start(requireContext(), false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -2,98 +2,21 @@ package com.mango.moshen.relation.cp.activity
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Color
|
import android.os.Bundle
|
||||||
import androidx.activity.viewModels
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
|
||||||
import com.mango.moshen.R
|
import com.mango.moshen.R
|
||||||
import com.mango.moshen.base.BaseBindingActivity
|
import com.mango.moshen.base.BaseActivity
|
||||||
import com.mango.moshen.common.EmptyViewHelper
|
import com.netease.nim.uikit.StatusBarUtil
|
||||||
import com.mango.moshen.databinding.ActivityCpInviteRecordBinding
|
|
||||||
import com.mango.moshen.relation.cp.CpDataManager
|
|
||||||
import com.mango.moshen.relation.cp.CpViewHelper
|
|
||||||
import com.mango.moshen.relation.cp.adapter.InviteRecordAdapter
|
|
||||||
import com.mango.moshen.relation.cp.dialog.CpInviteReplyConfirmDialog
|
|
||||||
import com.mango.moshen.relation.cp.dialog.CpInviteReplyDialog
|
|
||||||
import com.mango.moshen.relation.cp.viewmodel.CpViewModel
|
|
||||||
import com.mango.moshen.ui.widget.dialog.CommonTipDialog
|
|
||||||
import com.mango.core.relation.cp.CpBindUnbindEvent
|
|
||||||
import com.mango.core.relation.cp.CpInviteDetailEntity
|
|
||||||
import com.mango.core.relation.cp.UserCpListEntity
|
|
||||||
import com.mango.xchat_android_library.annatation.ActLayoutRes
|
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
import org.greenrobot.eventbus.Subscribe
|
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
|
||||||
|
|
||||||
@ActLayoutRes(R.layout.activity_cp_invite_record)
|
class CpInviteRecordActivity : BaseActivity() {
|
||||||
class CpInviteRecordActivity : BaseBindingActivity<ActivityCpInviteRecordBinding>() {
|
|
||||||
private val vm: CpViewModel by viewModels()
|
|
||||||
private lateinit var adapter: InviteRecordAdapter
|
|
||||||
private val type = 1// 1-别人给我发的邀请,2-我给别人发的邀请
|
|
||||||
|
|
||||||
override fun init() {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_cp_invite_record)
|
||||||
initTitleBar("关系申请")
|
initTitleBar("关系申请")
|
||||||
initRecyclerView()
|
supportFragmentManager
|
||||||
initObserver()
|
.beginTransaction()
|
||||||
queryRecord(type)
|
.replace(R.id.fcv, CpInviteRecordFragment.newInstance(intent.getBooleanExtra("needAlert", false)))
|
||||||
}
|
.commitAllowingStateLoss()
|
||||||
|
|
||||||
private fun initObserver() {
|
|
||||||
EventBus.getDefault().register(this)
|
|
||||||
vm.userCpListData.observe(this) {
|
|
||||||
adapter.setNewData(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
vm.loadingLiveData.observe(this) {
|
|
||||||
if (it) dialogManager.showProgressDialog(this)
|
|
||||||
else dialogManager.dismissDialog()
|
|
||||||
if (mBinding.swipeRefresh.isRefreshing) {
|
|
||||||
mBinding.swipeRefresh.isRefreshing = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
vm.cpInviteDetailData.observe(this) {
|
|
||||||
showReplyDialog(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun showReplyDialog(item: CpInviteDetailEntity) {
|
|
||||||
CpInviteReplyDialog(context).apply {
|
|
||||||
cpInviteData = item
|
|
||||||
listener = object : CpInviteReplyDialog.ReplyListener {
|
|
||||||
override fun onAgree() {
|
|
||||||
showConfirmDialog(item, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onRefuse() {
|
|
||||||
showConfirmDialog(item, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTimeOut() {
|
|
||||||
queryRecord(type)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
openDialog()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun initRecyclerView() {
|
|
||||||
adapter = InviteRecordAdapter(this)
|
|
||||||
adapter.onVisitClickListener = object : InviteRecordAdapter.OnVisitClickListener {
|
|
||||||
override fun onVisitClick(item: UserCpListEntity) {
|
|
||||||
vm.getCpInviteDetail(item.cpId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
|
|
||||||
mBinding.recyclerView.layoutManager = layoutManager
|
|
||||||
adapter.emptyView = EmptyViewHelper.createEmptyView(this, "暂无数据")
|
|
||||||
adapter.bindToRecyclerView(mBinding.recyclerView)
|
|
||||||
mBinding.swipeRefresh.setOnRefreshListener {
|
|
||||||
queryRecord(type)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun queryRecord(type: Int) {
|
|
||||||
vm.getUserCpListData(type)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -104,42 +27,8 @@ class CpInviteRecordActivity : BaseBindingActivity<ActivityCpInviteRecordBinding
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showConfirmDialog(item: CpInviteDetailEntity, isAgree: Boolean) {
|
|
||||||
val shb = CpViewHelper.getColorSpan(
|
|
||||||
"是否${if (isAgree) "同意" else "拒绝"}与${item.inviteNick}成为CP?\n",
|
|
||||||
Color.parseColor("#4C5AF1"),
|
|
||||||
5, 5 + item.inviteNick.length
|
|
||||||
)
|
|
||||||
if (isAgree) {
|
|
||||||
val str = "(同意将自动拒绝其他邀请)"
|
|
||||||
val append = CpViewHelper.getSizeSpan(str, 12f, 0, str.length)
|
|
||||||
shb.append(append)
|
|
||||||
}
|
|
||||||
|
|
||||||
CpInviteReplyConfirmDialog(context).apply {
|
|
||||||
setDialogTitle(shb)
|
|
||||||
okCancelListener = object : CommonTipDialog.OnActionListener {
|
|
||||||
override fun onOk() {
|
|
||||||
vm.replyInvite(item.cpId, if (isAgree) 2 else 3)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
openDialog()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun onBindUnbindEvent(event: CpBindUnbindEvent) {
|
|
||||||
queryRecord(type)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
EventBus.getDefault().unregister(this)
|
|
||||||
CpDataManager.get().clearCpInviteInfo()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
override fun needSteepStateBar() = true
|
override fun needSteepStateBar() = true
|
||||||
|
|
||||||
override fun setStatusBar() {
|
override fun setStatusBar() {
|
||||||
super.setStatusBar()
|
super.setStatusBar()
|
||||||
StatusBarUtil.transparencyBar(this)
|
StatusBarUtil.transparencyBar(this)
|
||||||
|
@@ -0,0 +1,138 @@
|
|||||||
|
package com.mango.moshen.relation.cp.activity
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.viewModels
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.mango.core.relation.cp.CpBindUnbindEvent
|
||||||
|
import com.mango.core.relation.cp.CpInviteDetailEntity
|
||||||
|
import com.mango.core.relation.cp.UserCpListEntity
|
||||||
|
import com.mango.moshen.base.BaseViewBindingFragment
|
||||||
|
import com.mango.moshen.common.EmptyViewHelper
|
||||||
|
import com.mango.moshen.databinding.FragmentCpInviteRecordBinding
|
||||||
|
import com.mango.moshen.relation.cp.CpDataManager
|
||||||
|
import com.mango.moshen.relation.cp.CpViewHelper
|
||||||
|
import com.mango.moshen.relation.cp.adapter.InviteRecordAdapter
|
||||||
|
import com.mango.moshen.relation.cp.dialog.CpInviteReplyConfirmDialog
|
||||||
|
import com.mango.moshen.relation.cp.dialog.CpInviteReplyDialog
|
||||||
|
import com.mango.moshen.relation.cp.viewmodel.CpViewModel
|
||||||
|
import com.mango.moshen.ui.widget.dialog.CommonTipDialog
|
||||||
|
import org.greenrobot.eventbus.EventBus
|
||||||
|
import org.greenrobot.eventbus.Subscribe
|
||||||
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
|
|
||||||
|
class CpInviteRecordFragment : BaseViewBindingFragment<FragmentCpInviteRecordBinding>() {
|
||||||
|
private val vm: CpViewModel by viewModels()
|
||||||
|
private lateinit var adapter: InviteRecordAdapter
|
||||||
|
private val type = 1// 1-别人给我发的邀请,2-我给别人发的邀请
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
initRecyclerView()
|
||||||
|
initObserver()
|
||||||
|
queryRecord(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initObserver() {
|
||||||
|
EventBus.getDefault().register(this)
|
||||||
|
vm.userCpListData.observe(this) {
|
||||||
|
adapter.setNewData(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
vm.loadingLiveData.observe(this) {
|
||||||
|
if (it) dialogManager.showProgressDialog(mContext)
|
||||||
|
else dialogManager.dismissDialog()
|
||||||
|
if (binding.swipeRefresh.isRefreshing) {
|
||||||
|
binding.swipeRefresh.isRefreshing = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vm.cpInviteDetailData.observe(this) {
|
||||||
|
showReplyDialog(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showReplyDialog(item: CpInviteDetailEntity) {
|
||||||
|
CpInviteReplyDialog(mContext).apply {
|
||||||
|
cpInviteData = item
|
||||||
|
listener = object : CpInviteReplyDialog.ReplyListener {
|
||||||
|
override fun onAgree() {
|
||||||
|
showConfirmDialog(item, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onRefuse() {
|
||||||
|
showConfirmDialog(item, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTimeOut() {
|
||||||
|
queryRecord(type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
openDialog()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initRecyclerView() {
|
||||||
|
adapter = InviteRecordAdapter(mContext)
|
||||||
|
adapter.onVisitClickListener = object : InviteRecordAdapter.OnVisitClickListener {
|
||||||
|
override fun onVisitClick(item: UserCpListEntity) {
|
||||||
|
vm.getCpInviteDetail(item.cpId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val layoutManager = LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)
|
||||||
|
binding.recyclerView.layoutManager = layoutManager
|
||||||
|
adapter.emptyView = EmptyViewHelper.createEmptyView(mContext, "暂无数据")
|
||||||
|
adapter.bindToRecyclerView(binding.recyclerView)
|
||||||
|
binding.swipeRefresh.setOnRefreshListener {
|
||||||
|
queryRecord(type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun queryRecord(type: Int) {
|
||||||
|
vm.getUserCpListData(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(needAlert: Boolean): CpInviteRecordFragment {
|
||||||
|
val args = Bundle()
|
||||||
|
args.putBoolean("needAlert", needAlert)
|
||||||
|
val fragment = CpInviteRecordFragment()
|
||||||
|
fragment.arguments = args
|
||||||
|
return fragment
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showConfirmDialog(item: CpInviteDetailEntity, isAgree: Boolean) {
|
||||||
|
val shb = CpViewHelper.getColorSpan(
|
||||||
|
"是否${if (isAgree) "同意" else "拒绝"}与${item.inviteNick}成为CP?\n",
|
||||||
|
Color.parseColor("#4C5AF1"),
|
||||||
|
5, 5 + item.inviteNick.length
|
||||||
|
)
|
||||||
|
if (isAgree) {
|
||||||
|
val str = "(同意将自动拒绝其他邀请)"
|
||||||
|
val append = CpViewHelper.getSizeSpan(str, 12f, 0, str.length)
|
||||||
|
shb.append(append)
|
||||||
|
}
|
||||||
|
|
||||||
|
CpInviteReplyConfirmDialog(mContext).apply {
|
||||||
|
setDialogTitle(shb)
|
||||||
|
okCancelListener = object : CommonTipDialog.OnActionListener {
|
||||||
|
override fun onOk() {
|
||||||
|
vm.replyInvite(item.cpId, if (isAgree) 2 else 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
openDialog()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
fun onBindUnbindEvent(event: CpBindUnbindEvent) {
|
||||||
|
queryRecord(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
EventBus.getDefault().unregister(this)
|
||||||
|
CpDataManager.get().clearCpInviteInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,35 +0,0 @@
|
|||||||
package com.mango.moshen.ui.im.friend;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
|
||||||
|
|
||||||
import com.mango.moshen.R;
|
|
||||||
import com.mango.moshen.base.BaseMvpActivity;
|
|
||||||
import com.mango.moshen.base.BaseMvpPresenter;
|
|
||||||
import com.mango.moshen.home.fragment.ContactsListFragment;
|
|
||||||
import com.mango.xchat_android_library.base.IMvpBaseView;
|
|
||||||
import com.mango.xchat_android_library.base.factory.CreatePresenter;
|
|
||||||
|
|
||||||
@CreatePresenter(BaseMvpPresenter.class)
|
|
||||||
public class ActFriendList extends BaseMvpActivity<IMvpBaseView, BaseMvpPresenter<IMvpBaseView>> implements IMvpBaseView{
|
|
||||||
|
|
||||||
public static void start(Context context) {
|
|
||||||
Intent starter = new Intent(context, ActFriendList.class);
|
|
||||||
context.startActivity(starter);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
setContentView(R.layout.act_friend_list);
|
|
||||||
initTitleBar(getString(R.string.message_contact));
|
|
||||||
Fragment fragment = ContactsListFragment.newInstance();
|
|
||||||
FragmentManager manager = getSupportFragmentManager();
|
|
||||||
manager.beginTransaction().add(R.id.fl_friend_list, fragment).commit();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,43 +1,38 @@
|
|||||||
package com.mango.moshen.ui.im.recent;
|
package com.mango.moshen.ui.im.recent
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint
|
||||||
import android.os.Bundle;
|
import android.view.View
|
||||||
import android.view.View;
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import android.widget.FrameLayout;
|
import com.mango.core.auth.AuthModel
|
||||||
import android.widget.ImageView;
|
import com.mango.core.auth.event.LoginEvent
|
||||||
|
import com.mango.core.initial.InitialModel
|
||||||
import androidx.annotation.Nullable;
|
import com.mango.core.statistic.StatisticManager
|
||||||
import androidx.fragment.app.FragmentManager;
|
import com.mango.core.statistic.protocol.StatisticsProtocol
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import com.mango.core.user.AttentionModel
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import com.mango.core.user.UserModel
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import com.mango.core.user.bean.AttentionInfo
|
||||||
|
import com.mango.core.user.bean.UserInfo
|
||||||
import com.mango.core.auth.AuthModel;
|
import com.mango.core.user.event.LoadLoginUserInfoEvent
|
||||||
import com.mango.core.auth.event.LoginEvent;
|
import com.mango.core.utils.SharedPreferenceUtils
|
||||||
import com.mango.core.initial.InitialModel;
|
import com.mango.moshen.R
|
||||||
import com.mango.core.level.UserLevelVo;
|
import com.mango.moshen.avroom.activity.AVRoomActivity
|
||||||
import com.mango.core.statistic.StatisticManager;
|
import com.mango.moshen.base.BaseViewBindingFragment
|
||||||
import com.mango.core.statistic.protocol.StatisticsProtocol;
|
import com.mango.moshen.common.widget.dialog.DialogManager.AbsOkDialogListener
|
||||||
import com.mango.core.user.AttentionModel;
|
import com.mango.moshen.databinding.FragmentRecentListBinding
|
||||||
import com.mango.core.user.UserModel;
|
import com.mango.moshen.home.activity.RelationListActivity
|
||||||
import com.mango.core.user.bean.AttentionInfo;
|
import com.mango.moshen.home.event.ContactTrashEvent
|
||||||
import com.mango.core.user.event.LoadLoginUserInfoEvent;
|
import com.mango.moshen.room_chat.activity.RoomNewbieActivity
|
||||||
import com.mango.core.utils.SharedPreferenceUtils;
|
import com.mango.moshen.ui.im.avtivity.NimP2PMessageActivity
|
||||||
import com.mango.moshen.R;
|
import com.mango.moshen.ui.im.recent.adapter.AttentionInRoomAdapter
|
||||||
import com.mango.moshen.avroom.activity.AVRoomActivity;
|
import com.mango.xchat_android_library.utils.CommonUtils
|
||||||
import com.mango.moshen.base.BaseFragment;
|
import com.netease.nim.uikit.business.recent.RecentContactsCallback
|
||||||
import com.mango.moshen.room_chat.activity.NimRoomP2PMessageActivity;
|
import com.netease.nimlib.sdk.NIMClient
|
||||||
import com.mango.moshen.room_chat.activity.RoomNewbieActivity;
|
import com.netease.nimlib.sdk.msg.MsgService
|
||||||
import com.mango.moshen.ui.im.avtivity.NimP2PMessageActivity;
|
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
|
||||||
import com.mango.moshen.ui.im.recent.adapter.AttentionInRoomAdapter;
|
import com.netease.nimlib.sdk.msg.model.RecentContact
|
||||||
import com.mango.xchat_android_library.utils.CommonUtils;
|
import org.greenrobot.eventbus.EventBus
|
||||||
import com.netease.nim.uikit.business.recent.RecentContactsCallback;
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
import com.netease.nimlib.sdk.msg.model.RecentContact;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最近聊天列表
|
* 最近聊天列表
|
||||||
@@ -45,172 +40,140 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
* @author chenran
|
* @author chenran
|
||||||
* @date 2017/9/18
|
* @date 2017/9/18
|
||||||
*/
|
*/
|
||||||
public class RecentListFragment extends BaseFragment {
|
class RecentListFragment : BaseViewBindingFragment<FragmentRecentListBinding>() {
|
||||||
|
private val share_pref_is_newbie_clicked = "share_pref_is_newbie_clicked"
|
||||||
|
private lateinit var recentContactsFragment: RecentContactsFragment
|
||||||
|
private lateinit var mAttentionInRoomAdapter: AttentionInRoomAdapter
|
||||||
|
private var lastClickTime: Long = 0
|
||||||
|
|
||||||
private static final String TAG = "RecentListFragment";
|
override fun init() {
|
||||||
|
EventBus.getDefault().register(this)
|
||||||
private final String share_pref_is_newbie_clicked = "share_pref_is_newbie_clicked";
|
recentContactsFragment.setCallback(object : RecentContactsCallback {
|
||||||
|
override fun onRecentContactsLoaded() {}
|
||||||
private RecentContactsFragment recentContactsFragment;
|
override fun onUnreadCountChange(unreadCount: Int) {}
|
||||||
private boolean isInRoom;
|
override fun onItemClick(recent: RecentContact) {
|
||||||
|
if (CommonUtils.isFastDoubleClick(800)) return
|
||||||
private RecyclerView rvAttentionOnline;
|
if (recent.sessionType == SessionTypeEnum.P2P) {
|
||||||
private AttentionInRoomAdapter mAttentionInRoomAdapter;
|
NimP2PMessageActivity.start(mContext, recent.contactId)
|
||||||
private FrameLayout flNewbie;
|
}
|
||||||
private ImageView ivRedPoint;
|
}
|
||||||
private long lastClickTime;
|
})
|
||||||
|
loadAttentionList()
|
||||||
public static RecentListFragment newInstance(boolean isInRoom) {
|
|
||||||
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
args.putBoolean("isInRoom", isInRoom);
|
|
||||||
RecentListFragment fragment = new RecentListFragment();
|
|
||||||
fragment.setArguments(args);
|
|
||||||
return fragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRootLayoutId() {
|
|
||||||
return R.layout.fragment_recent_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
EventBus.getDefault().register(this);
|
|
||||||
if (getArguments() != null) {
|
|
||||||
isInRoom = getArguments().getBoolean("isInRoom", false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
@Override
|
override fun onFindViews() {
|
||||||
public void onFindViews() {
|
|
||||||
// 一起玩、关注用户在房间内列表
|
// 一起玩、关注用户在房间内列表
|
||||||
rvAttentionOnline = mView.findViewById(R.id.rv_attention_online);
|
mAttentionInRoomAdapter = AttentionInRoomAdapter()
|
||||||
mAttentionInRoomAdapter = new AttentionInRoomAdapter();
|
binding.rvAttentionOnline.adapter = mAttentionInRoomAdapter
|
||||||
rvAttentionOnline.setAdapter(mAttentionInRoomAdapter);
|
binding.rvAttentionOnline.layoutManager = LinearLayoutManager(
|
||||||
rvAttentionOnline.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
mContext,
|
||||||
mAttentionInRoomAdapter.setOnItemClickListener((adapter, view, position) -> {
|
LinearLayoutManager.HORIZONTAL,
|
||||||
AttentionInfo attentionInfo = mAttentionInRoomAdapter.getItem(position);
|
false
|
||||||
if (attentionInfo != null && attentionInfo.getUserInRoom() != null && mContext != null) {
|
)
|
||||||
|
mAttentionInRoomAdapter.setOnItemClickListener { _, _, position ->
|
||||||
|
val attentionInfo = mAttentionInRoomAdapter.getItem(position)
|
||||||
|
if (attentionInfo != null && attentionInfo.userInRoom != null && mContext != null) {
|
||||||
AVRoomActivity.startForFromType(
|
AVRoomActivity.startForFromType(
|
||||||
mContext,
|
mContext,
|
||||||
attentionInfo.getUserInRoom().getUid(),
|
attentionInfo.userInRoom.uid,
|
||||||
AVRoomActivity.FROM_TYPE_USER,
|
AVRoomActivity.FROM_TYPE_USER,
|
||||||
attentionInfo.getNick(),
|
attentionInfo.getNick(), attentionInfo.getUid().toString()
|
||||||
String.valueOf(attentionInfo.getUid()));
|
)
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
recentContactsFragment = RecentContactsFragment.newInstance(false)
|
||||||
recentContactsFragment = RecentContactsFragment.newInstance(isInRoom);
|
childFragmentManager
|
||||||
FragmentManager fragmentManager = getChildFragmentManager();
|
.beginTransaction()
|
||||||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
|
.replace(R.id.recent_container, recentContactsFragment)
|
||||||
fragmentTransaction.replace(R.id.recent_container, recentContactsFragment).commitAllowingStateLoss();
|
.commitAllowingStateLoss()
|
||||||
boolean isClicked = (boolean) SharedPreferenceUtils.get(share_pref_is_newbie_clicked, false);
|
val isClicked = SharedPreferenceUtils.get(share_pref_is_newbie_clicked, false) as Boolean
|
||||||
flNewbie = mView.findViewById(R.id.fl_newbie);
|
binding.tvRedPointFindNew.visibility = if (isClicked) View.GONE else View.VISIBLE
|
||||||
ivRedPoint = mView.findViewById(R.id.iv_red_point);
|
|
||||||
ivRedPoint.setVisibility(isClicked ? View.GONE : View.VISIBLE);
|
|
||||||
// 等级限制
|
// 等级限制
|
||||||
setFindNewbieView();
|
setFindNewbieView()
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
private void setFindNewbieView() {
|
private fun setFindNewbieView() {
|
||||||
// 等级限制
|
// 等级限制
|
||||||
UserModel.get().getCurrentUserInfo()
|
UserModel.get().currentUserInfo
|
||||||
.subscribe(userInfo -> {
|
.subscribe { userInfo: UserInfo? ->
|
||||||
if (userInfo != null) {
|
if (userInfo != null) {
|
||||||
UserLevelVo userLevelVo = userInfo.getUserLevelVo();
|
val userLevelVo = userInfo.userLevelVo
|
||||||
if (userLevelVo != null) {
|
if (userLevelVo != null) {
|
||||||
flNewbie.setVisibility(userLevelVo.charmLevelSeq >= InitialModel.get().getFindNewbieCharmLevel() ? View.VISIBLE : View.GONE);
|
binding.llFindNew.visibility =
|
||||||
}
|
if (userLevelVo.charmLevelSeq >= InitialModel.get().findNewbieCharmLevel) View.VISIBLE else View.GONE
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSetListener() {
|
|
||||||
flNewbie.setOnClickListener(v -> {
|
|
||||||
//防双击
|
|
||||||
long currTime = System.currentTimeMillis();
|
|
||||||
if (currTime - lastClickTime < 1000) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lastClickTime = currTime;
|
|
||||||
SharedPreferenceUtils.put(share_pref_is_newbie_clicked, true);// 是否第一次点击发现萌新
|
|
||||||
ivRedPoint.setVisibility(View.GONE);
|
|
||||||
RoomNewbieActivity.start(getActivity(), false);
|
|
||||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_ROOM_MESSAGE_FINDNEW_CLICK, "消息页_发现萌新");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initiate() {
|
|
||||||
recentContactsFragment.setCallback(new RecentContactsCallback() {
|
|
||||||
@Override
|
|
||||||
public void onRecentContactsLoaded() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onUnreadCountChange(int unreadCount) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onItemClick(RecentContact recent) {
|
|
||||||
if (CommonUtils.isFastDoubleClick(800)) return;
|
|
||||||
if (recent.getSessionType() == SessionTypeEnum.P2P) {
|
|
||||||
if (isInRoom) {
|
|
||||||
NimRoomP2PMessageActivity.start(mContext, recent.getContactId());
|
|
||||||
} else {
|
|
||||||
NimP2PMessageActivity.start(mContext, recent.getContactId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
loadAttentionList();
|
|
||||||
|
override fun onSetListener() {
|
||||||
|
binding.llFindNew.setOnClickListener {
|
||||||
|
//防双击
|
||||||
|
val currTime = System.currentTimeMillis()
|
||||||
|
if (currTime - lastClickTime < 1000) {
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
lastClickTime = currTime
|
||||||
|
SharedPreferenceUtils.put(share_pref_is_newbie_clicked, true) // 是否第一次点击发现萌新
|
||||||
|
binding.tvRedPointFindNew.visibility = View.GONE
|
||||||
|
RoomNewbieActivity.start(activity, false)
|
||||||
|
StatisticManager.Instance()
|
||||||
|
.onEvent(StatisticsProtocol.EVENT_ROOM_MESSAGE_FINDNEW_CLICK, "消息页_发现萌新")
|
||||||
|
}
|
||||||
|
binding.ivContactTrash.setOnClickListener {
|
||||||
|
if (NIMClient.getService(MsgService::class.java).totalUnreadCount > 0) {
|
||||||
|
dialogManager.showOkCancelDialog(
|
||||||
|
getString(R.string.tips_clear_unread_count),
|
||||||
|
getString(R.string.tips_ok_label_clear),
|
||||||
|
getString(R.string.text_canle),
|
||||||
|
object : AbsOkDialogListener() {
|
||||||
|
override fun onOk() {
|
||||||
|
EventBus.getDefault().post(ContactTrashEvent())
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
toast("暂无未读消息需要清理")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.ivRelation.setOnClickListener {
|
||||||
|
RelationListActivity.start(mContext)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onLoginUserInfoUpdateEvent(LoadLoginUserInfoEvent event) {
|
fun onLoginUserInfoUpdateEvent(event: LoadLoginUserInfoEvent?) {
|
||||||
recentContactsFragment.requestMessages(true);
|
recentContactsFragment.requestMessages(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
private void loadAttentionList() {
|
private fun loadAttentionList() {
|
||||||
AttentionModel.get().getAttentionList(
|
AttentionModel.get().getAttentionList(
|
||||||
AuthModel.get().getCurrentUid(),
|
AuthModel.get().currentUid,
|
||||||
1,
|
1,
|
||||||
200)
|
200
|
||||||
.compose(bindToLifecycle())
|
)
|
||||||
.subscribe((attentionInfos, throwable) -> {
|
.compose<List<AttentionInfo?>>(bindToLifecycle())
|
||||||
|
.subscribe { attentionInfos, _ ->
|
||||||
if (attentionInfos != null && attentionInfos.size() > 0) {
|
if (attentionInfos != null && attentionInfos.isNotEmpty()) {
|
||||||
if (rvAttentionOnline != null) {
|
binding.rvAttentionOnline.visibility = View.VISIBLE
|
||||||
rvAttentionOnline.setVisibility(View.VISIBLE);
|
mAttentionInRoomAdapter.setNewData(attentionInfos)
|
||||||
}
|
} else {
|
||||||
if (mAttentionInRoomAdapter != null) {
|
binding.rvAttentionOnline.visibility = View.GONE
|
||||||
mAttentionInRoomAdapter.setNewData(attentionInfos);
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (rvAttentionOnline != null) {
|
|
||||||
rvAttentionOnline.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onLoginEvent(LoginEvent event) {
|
fun onLoginEvent(event: LoginEvent?) {
|
||||||
//登录成功刷新消息页萌新
|
//登录成功刷新消息页萌新
|
||||||
setFindNewbieView();
|
setFindNewbieView()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
override fun onDestroyView() {
|
||||||
public void onDestroy() {
|
super.onDestroyView()
|
||||||
super.onDestroy();
|
EventBus.getDefault().unregister(this)
|
||||||
EventBus.getDefault().unregister(this);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
Before Width: | Height: | Size: 7.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_msg_communique.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_msg_contact_trash.png
Normal file
After Width: | Height: | Size: 848 B |
Before Width: | Height: | Size: 7.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_msg_find_new.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 7.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_msg_notice.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_msg_party.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_msg_tips.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
@@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<corners android:radius="@dimen/dp_100"/>
|
<corners android:radius="@dimen/dp_100" />
|
||||||
<solid android:color="#FF5B55"/>
|
<solid android:color="#FB486A" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/white" />
|
||||||
</shape>
|
</shape>
|
8
app/src/main/res/drawable/shape_5fcce4_corner_8dp.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<solid android:color="#265FCCE4" />
|
||||||
|
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
</shape>
|
@@ -1,18 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.mango.moshen.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
</com.mango.moshen.base.TitleBar>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/fl_friend_list"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@@ -8,26 +8,18 @@
|
|||||||
|
|
||||||
<com.mango.moshen.base.TitleBar
|
<com.mango.moshen.base.TitleBar
|
||||||
android:id="@+id/title_bar"
|
android:id="@+id/title_bar"
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/swipe_refresh"
|
android:id="@+id/fcv"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
android:layout_marginBottom="@dimen/dp_20"
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
app:layout_constraintTop_toBottomOf="@id/title_bar">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recycler_view"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clipToPadding="false" />
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
39
app/src/main/res/layout/activity_relation_list.xml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:src="@drawable/arrow_left" />
|
||||||
|
|
||||||
|
<com.mango.moshen.ui.widget.magicindicator.MagicIndicator
|
||||||
|
android:id="@+id/indicator"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:paddingEnd="23dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.viewpager.widget.ViewPager
|
||||||
|
android:id="@+id/viewpager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
@@ -1,88 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/bg_normal_1c1b22"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="30dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:text="消息"
|
|
||||||
android:textColor="@color/text_title_white"
|
|
||||||
android:textSize="21sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_contact_trash"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:src="@mipmap/ic_contact_trash" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="22dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_friend"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:drawableTop="@drawable/ic_msg_friend"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="好友"
|
|
||||||
android:textColor="@color/text_title_white"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_attention"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:drawableTop="@drawable/ic_msg_attention"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="关注"
|
|
||||||
android:textColor="@color/text_title_white"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_fans"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:drawableTop="@drawable/ic_msg_fans"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="粉丝"
|
|
||||||
android:textColor="@color/text_title_white"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_relation"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:drawableTop="@drawable/ic_msg_relation"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="关系申请"
|
|
||||||
android:textColor="@color/text_title_white"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/fcv"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="20dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
18
app/src/main/res/layout/fragment_cp_invite_record.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/swipe_refresh"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:clipToPadding="false" />
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
@@ -2,73 +2,220 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/recent_list_container"
|
android:id="@+id/recent_list_container"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
<com.mango.moshen.ui.widget.RecyclerViewNoViewpagerScroll
|
|
||||||
android:id="@+id/rv_attention_online"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible"/>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fl_newbie"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="80dp"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginTop="35dp">
|
||||||
android:visibility="gone"
|
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical">
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="消息"
|
||||||
|
android:textColor="@color/text_title_white"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="55dp"
|
android:id="@+id/iv_contact_trash"
|
||||||
android:layout_height="55dp"
|
android:layout_width="40dp"
|
||||||
android:src="@mipmap/ic_find_new"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
android:layout_gravity="end|center_vertical"
|
||||||
/>
|
android:layout_marginEnd="45dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:src="@drawable/ic_msg_contact_trash" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_relation"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:src="@drawable/ic_msg_relation" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginTop="22dp"
|
||||||
|
android:layout_marginEnd="15dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_communique"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:drawableTop="@drawable/ic_msg_communique"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="官方公告"
|
||||||
|
android:textColor="@color/text_title_white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="18dp"
|
||||||
android:textColor="@color/text_title_white"
|
android:layout_marginStart="-16dp"
|
||||||
android:textSize="@dimen/dp_15"
|
android:background="@drawable/shap_red_point"
|
||||||
android:text="@string/find_new"
|
android:gravity="center"
|
||||||
android:gravity="center_vertical"
|
android:minWidth="18dp"
|
||||||
android:layout_marginStart="@dimen/dp_13"
|
android:paddingStart="4dp"
|
||||||
android:drawablePadding="13.5dp"
|
android:paddingEnd="4dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:textColor="#ffffffff"
|
||||||
/>
|
android:textSize="10sp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
tools:text="88" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/iv_red_point"
|
android:layout_width="0dp"
|
||||||
android:layout_width="8dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="8dp"
|
android:layout_weight="1"
|
||||||
android:src="@drawable/shap_red_point"
|
android:gravity="center_horizontal"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:orientation="horizontal">
|
||||||
android:layout_marginEnd="@dimen/dp_32"
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_notice"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:drawableTop="@drawable/ic_msg_notice"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="活动通知"
|
||||||
|
android:textColor="@color/text_title_white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:background="@drawable/shap_red_point"
|
||||||
|
android:gravity="center"
|
||||||
|
android:minWidth="18dp"
|
||||||
|
android:paddingStart="4dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
tools:text="88" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tips"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:drawableTop="@drawable/ic_msg_tips"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="订阅提醒"
|
||||||
|
android:textColor="@color/text_title_white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="12dp"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
android:layout_marginStart="-12dp"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:background="@drawable/shap_red_point"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:visibility="visible"
|
||||||
|
tools:text="88" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_find_new"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_find_new"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:drawableTop="@drawable/ic_msg_find_new"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="发现萌新"
|
||||||
|
android:textColor="@color/text_title_white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/tv_red_point_find_new"
|
||||||
|
android:layout_width="12dp"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
android:layout_marginStart="-12dp"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:background="@drawable/shap_red_point"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:visibility="visible"
|
||||||
|
tools:text="88" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/fl_attention_online"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13dp">
|
||||||
|
|
||||||
|
<com.mango.moshen.ui.widget.RecyclerViewNoViewpagerScroll
|
||||||
|
android:id="@+id/rv_attention_online"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:background="@drawable/shape_5fcce4_corner_8dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
/>
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="105dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="29dp"
|
||||||
android:src="@drawable/arrow_right"
|
android:layout_marginStart="21dp"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:src="@drawable/ic_msg_party" />
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/recent_container"
|
android:id="@+id/recent_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="15dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
74
app/src/main/res/layout/fragment_recent_list_room.xml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/recent_list_container"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.mango.moshen.ui.widget.RecyclerViewNoViewpagerScroll
|
||||||
|
android:id="@+id/rv_attention_online"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"/>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/fl_newbie"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="55dp"
|
||||||
|
android:src="@mipmap/ic_find_new"
|
||||||
|
android:layout_marginStart="@dimen/dp_15"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/text_title_white"
|
||||||
|
android:textSize="@dimen/dp_15"
|
||||||
|
android:text="@string/find_new"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginStart="@dimen/dp_13"
|
||||||
|
android:drawablePadding="13.5dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_red_point"
|
||||||
|
android:layout_width="8dp"
|
||||||
|
android:layout_height="8dp"
|
||||||
|
android:src="@drawable/shap_red_point"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="@dimen/dp_32"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/arrow_right"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/recent_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
@@ -165,7 +165,7 @@ public class RoomMsgRecentListFragment extends BaseFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRootLayoutId() {
|
public int getRootLayoutId() {
|
||||||
return R.layout.fragment_recent_list;
|
return R.layout.fragment_recent_list_room;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|