动态详情页 房间更多页面 私聊消息子item UI修改
This commit is contained in:
@@ -575,7 +575,7 @@
|
||||
android:label="音游"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/>
|
||||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
|
||||
<activity
|
||||
android:name=".ui.keepalive.OnePiexlActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.yizhuan.erban.home.activity;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@@ -18,14 +17,12 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.yizhuan.erban.MainActivity;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.avroom.adapter.RoomContributeListAdapter;
|
||||
import com.yizhuan.erban.avroom.ktv.KtvMusicManager;
|
||||
import com.yizhuan.erban.base.BaseMvpActivity;
|
||||
import com.yizhuan.erban.common.widget.DragLayout;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.erban.home.adapter.HomeConcernsAdapter;
|
||||
import com.yizhuan.erban.home.adapter.MainMagicIndicatorAdapter;
|
||||
@@ -33,7 +30,6 @@ import com.yizhuan.erban.home.fragment.HomeTabMapFragment;
|
||||
import com.yizhuan.erban.home.presenter.MainFragmentPresenter;
|
||||
import com.yizhuan.erban.home.view.IMainFragmentView;
|
||||
import com.yizhuan.erban.service.DaemonService;
|
||||
import com.yizhuan.erban.ui.patriarch.help.LimitEnterRoomHelper;
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
|
||||
import com.yizhuan.erban.ui.widget.OnPageSelectedListener;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator;
|
||||
@@ -81,9 +77,6 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IMainFragmentView, Mai
|
||||
RecyclerView rvFollowRoom;
|
||||
private HomeConcernsAdapter mFollowRoomsAdapter;
|
||||
private List<Fragment> mFragments;
|
||||
private LimitEnterRoomHelper limitEnterRoomHelper;
|
||||
private ObjectAnimator roomMinAnim;
|
||||
private DragLayout avatarLayout;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -125,23 +118,9 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IMainFragmentView, Mai
|
||||
getMvpPresenter().getHomeConcerns();
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected boolean needSteepStateBar() {
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void setStatusBar() {
|
||||
// super.setStatusBar();
|
||||
// StatusBarUtil.transparencyBar(this);
|
||||
// StatusBarUtil.StatusBarLightMode(this);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onItemSelect(int position, TextView view) {
|
||||
// if (mHomeTitleInfos == null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (mFragments == null || mFragments.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
@@ -149,7 +128,6 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IMainFragmentView, Mai
|
||||
if (fragment == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
viewPager.setCurrentItem(position);
|
||||
|
||||
}
|
||||
@@ -172,44 +150,6 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IMainFragmentView, Mai
|
||||
} else if (openRoomFailType == MainFragmentPresenter.OPEN_ROOM_FAIL_ALREADY_OPENED_ROOM) {
|
||||
RoomInfo roomInfo = (RoomInfo) arg[0];
|
||||
AVRoomActivity.start(HomeMoreRoomActivity.this, roomInfo.getUid());
|
||||
} else if (openRoomFailType == MainFragmentPresenter.OPEN_ROOM_FAIL_PM_LIMIT_TIME) {
|
||||
// if (arg != null && arg.length > 0 && arg[0] instanceof String) {
|
||||
// ((MainActivity) getActivity()).handleOpenRoomWhenPmLimit((String) arg[0]);
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理开房限制时长
|
||||
*/
|
||||
public void handleOpenRoomWhenPmLimit(String error) {
|
||||
getLimitEnterRoomHelper().handleThisContext(this, error, false, this::handlePmExitRoom);
|
||||
}
|
||||
|
||||
public LimitEnterRoomHelper getLimitEnterRoomHelper() {
|
||||
if (limitEnterRoomHelper == null) {
|
||||
limitEnterRoomHelper = new LimitEnterRoomHelper();
|
||||
}
|
||||
return limitEnterRoomHelper;
|
||||
}
|
||||
|
||||
private void handlePmExitRoom() {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo != null) {
|
||||
closeOpenRoomAnimation();
|
||||
getMvpPresenter().exitRoom();
|
||||
}
|
||||
}
|
||||
|
||||
private void closeOpenRoomAnimation() {
|
||||
stopRoomMinAnim();
|
||||
avatarLayout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void stopRoomMinAnim() {
|
||||
if (roomMinAnim != null) {
|
||||
roomMinAnim.cancel();
|
||||
roomMinAnim = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,8 +175,6 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IMainFragmentView, Mai
|
||||
|
||||
@Override
|
||||
public void exitRoom(RoomInfo roomInfo) {
|
||||
closeOpenRoomAnimation();
|
||||
//ktv退出的时候需要用到
|
||||
if (RtcEngineManager.get().isOpenKtv() && roomInfo != null) {
|
||||
KtvMusicManager.INSTANCE.deleteUserAllChooseMusic(roomInfo.getUid()).subscribe();
|
||||
RtcEngineManager.get().closeKtvModel();
|
||||
@@ -413,13 +351,9 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IMainFragmentView, Mai
|
||||
});
|
||||
}
|
||||
|
||||
private int mRoomType;
|
||||
|
||||
private void changeRoomState(long worldId, int roomType) {
|
||||
mRoomType = roomType;
|
||||
if (worldId == 0) {
|
||||
openRoom(roomType);
|
||||
|
||||
} else {
|
||||
getMvpPresenter().roomWorldModeClose(AuthModel.get().getCurrentUid());
|
||||
}
|
||||
@@ -449,4 +383,15 @@ public class HomeMoreRoomActivity extends BaseMvpActivity<IMainFragmentView, Mai
|
||||
tips.length() - 4, tips.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
}
|
||||
}
|
||||
|
@@ -22,11 +22,13 @@ 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))
|
||||
@@ -42,17 +44,19 @@ class ContactsListFragment : BaseViewBindingFragment<FragmentContactListBinding>
|
||||
EventBus.getDefault().post(ContactTrashEvent())
|
||||
}
|
||||
})
|
||||
} else {
|
||||
toast("暂无未读消息需要清理")
|
||||
}
|
||||
}
|
||||
|
||||
binding.tvFans.setOnClickListener {
|
||||
FansListActivity.start(requireContext(),FansListActivity.TYPE_FANS)
|
||||
FansListActivity.start(requireContext(), FansListActivity.TYPE_FANS)
|
||||
}
|
||||
binding.tvAttention.setOnClickListener {
|
||||
AttentionListActivity.start(requireContext())
|
||||
}
|
||||
binding.tvFriend.setOnClickListener {
|
||||
FansListActivity.start(requireContext(),FansListActivity.TYPE_FRIEND)
|
||||
FansListActivity.start(requireContext(), FansListActivity.TYPE_FRIEND)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.yizhuan.erban.ui.im.chat;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
@@ -12,8 +11,8 @@ import com.netease.nim.uikit.common.ui.recyclerview.adapter.BaseMultiItemFetchLo
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.GiftModel;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.GiftAttachment;
|
||||
|
||||
/**
|
||||
@@ -55,9 +54,6 @@ public class MsgViewHolderGift extends MsgViewHolderBase {
|
||||
GiftModel.get().findGiftInfoById(attachment.getGiftReceiveInfo().getGiftId()) : giftInfo;
|
||||
|
||||
boolean isSelf = attachment.getGiftReceiveInfo().getUid() == AuthModel.get().getCurrentUid();
|
||||
giftName.setTextColor(isSelf ? ContextCompat.getColor(context, R.color.color_333333) : ContextCompat.getColor(context, R.color.color_333333));
|
||||
number.setTextColor(isSelf ? ContextCompat.getColor(context, R.color.color_333333) : ContextCompat.getColor(context, R.color.color_333333));
|
||||
tvTargetNick.setTextColor(isSelf ? ContextCompat.getColor(context, R.color.color_999999) : ContextCompat.getColor(context, R.color.color_999999));
|
||||
flGiftImg.setBackgroundResource(isSelf ? R.drawable.bg_msg_gift_img : R.drawable.bg_msg_gift_img_normal);
|
||||
|
||||
if (giftInfo != null) {
|
||||
|
@@ -148,7 +148,7 @@ public class RecentContactsFragment extends TFragment {
|
||||
adapter.notifyDataSetChanged();
|
||||
boolean empty = items.isEmpty() && msgLoaded && !isHaveKFHeadView();
|
||||
emptyBg.setVisibility(empty ? View.VISIBLE : View.GONE);
|
||||
emptyHint.setHint("你还没有聊天记录哦!\n快去和好友聊天吧!");
|
||||
emptyHint.setText("你还没有聊天记录哦!\n快去和好友聊天吧!");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#F4F4F4" />
|
||||
|
||||
<corners android:radius="19dp"/>
|
||||
|
||||
</shape>
|
@@ -3,22 +3,21 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_F9F9F9"
|
||||
android:background="@color/color_1c1b22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
<View
|
||||
android:id="@+id/iv_bg_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/bg_home_top"
|
||||
android:layout_height="300dp"
|
||||
android:background="@drawable/bg_shape_home_top"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
@@ -53,7 +52,7 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:background="@drawable/shape_home_bg_15dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="3dp">
|
||||
|
||||
@@ -72,7 +71,7 @@
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_F9F9F9"
|
||||
android:background="@color/color_1c1b22"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="35dp">
|
||||
android:layout_marginTop="30dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -28,7 +28,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_shape_home_top"
|
||||
android:gravity="center"
|
||||
android:paddingTop="30dp"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="60dp" />
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/emptyBg"
|
||||
@@ -37,7 +37,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="73dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="13sp"
|
||||
tools:text="123" />
|
||||
</LinearLayout>
|
||||
|
@@ -43,7 +43,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_toRightOf="@id/avatar"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15dp"
|
||||
tools:text="礼物名称"/>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
android:id="@+id/gift_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="15dp"
|
||||
tools:text="x1"/>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12dp"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
tools:text="赠给 xxx"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -12,6 +12,6 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="10dp"
|
||||
android:text="恭喜您,获得抽奖机会,点我抽奖>>"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
@@ -15,7 +15,7 @@
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_toStartOf="@+id/iv_avatar"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textColor="@color/white"
|
||||
tools:text="我想邀请你加入我的家族:抓皮卡丘回精灵球家族,和我一起在家族里玩耍~"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
@@ -42,7 +42,7 @@
|
||||
tools:text="立即加入"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
tools:ignore="SpUsage" />
|
||||
|
@@ -39,7 +39,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/avatar"
|
||||
android:text=""
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp"
|
||||
tools:text="恭喜!您的等级已到达"/>
|
||||
|
||||
@@ -59,6 +59,6 @@
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:drawableRight="@drawable/icon_arrow_right_small"
|
||||
android:textColor="@color/color_999999"/>
|
||||
android:textColor="@color/color_c6c6e9"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
@@ -12,6 +12,6 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="10dp"
|
||||
android:text="恭喜您,获得抽奖机会,点我抽奖>>"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
@@ -33,7 +33,7 @@
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_toRightOf="@id/avatar"
|
||||
android:text="您关注的TA"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp" />
|
||||
|
||||
<TextView
|
||||
|
@@ -25,7 +25,7 @@
|
||||
android:id="@+id/tip_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textColor="@color/white"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
tools:text="点我!点我!点我!"
|
||||
android:textColor="@color/color_1A1A1A"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:paddingStart="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_9"
|
||||
@@ -27,7 +27,7 @@
|
||||
android:paddingStart="@dimen/dp_9"
|
||||
android:paddingEnd="@dimen/dp_9"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_1A1A1A"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="提醒签到消息" />
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:text="@string/go_to_sign_in"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -17,8 +17,8 @@
|
||||
app:tab_icon="@mipmap/ic_main_tab_game_home"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_game_pressed"
|
||||
app:tab_text="派对"
|
||||
app:tab_text_color="@color/color_999999"
|
||||
app:tab_text_color_select="@color/appColor" />
|
||||
app:tab_text_color="#555574"
|
||||
app:tab_text_color_select="#248CFE" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainRedPointTab
|
||||
android:id="@+id/main_attention_tab"
|
||||
@@ -30,8 +30,8 @@
|
||||
app:tab_icon="@mipmap/ic_main_tab_find"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_find_pressed"
|
||||
app:tab_text="广场"
|
||||
app:tab_text_color="@color/color_999999"
|
||||
app:tab_text_color_select="@color/appColor" />
|
||||
app:tab_text_color="#555574"
|
||||
app:tab_text_color_select="#248CFE" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainTab
|
||||
android:id="@+id/main_game_tab"
|
||||
@@ -43,8 +43,8 @@
|
||||
app:tab_icon="@mipmap/ic_main_tab_peace"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_peace_pressed"
|
||||
app:tab_text="赛事"
|
||||
app:tab_text_color="@color/color_999999"
|
||||
app:tab_text_color_select="@color/appColor" />
|
||||
app:tab_text_color="#555574"
|
||||
app:tab_text_color_select="#248CFE" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainRedPointTab
|
||||
android:id="@+id/main_msg_tab"
|
||||
@@ -56,8 +56,8 @@
|
||||
app:tab_icon="@mipmap/ic_main_tab_msg"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_msg_pressed"
|
||||
app:tab_text="消息"
|
||||
app:tab_text_color="@color/color_999999"
|
||||
app:tab_text_color_select="@color/appColor" />
|
||||
app:tab_text_color="#555574"
|
||||
app:tab_text_color_select="#248CFE" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MainTab
|
||||
android:id="@+id/main_me_tab"
|
||||
@@ -69,7 +69,7 @@
|
||||
app:tab_icon="@mipmap/ic_main_tab_me"
|
||||
app:tab_icon_select="@mipmap/ic_main_tab_me_pressed"
|
||||
app:tab_text="我的"
|
||||
app:tab_text_color="@color/color_999999"
|
||||
app:tab_text_color_select="@color/appColor" />
|
||||
app:tab_text_color="#555574"
|
||||
app:tab_text_color_select="#248CFE" />
|
||||
|
||||
</merge>
|
@@ -1,13 +1,11 @@
|
||||
package com.yizhuan.erban.community.dynamic.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
|
||||
@@ -44,7 +42,7 @@ public class CommentReplyAdapter extends BaseQuickAdapter<Reply, BaseViewHolder>
|
||||
builder.append("@" + item.getToNick(),
|
||||
new ForegroundColorSpan(mContext.getResources().getColor(R.color.color_7154EE)))
|
||||
.append(" " + item.getContent(),
|
||||
new ForegroundColorSpan(mContext.getResources().getColor(R.color.color_333333)));
|
||||
new ForegroundColorSpan(mContext.getResources().getColor(R.color.color_c6c6e9)));
|
||||
|
||||
helper.setText(R.id.tv_content, builder.build());
|
||||
|
||||
|
@@ -4,6 +4,7 @@ package com.yizhuan.erban.community.dynamic.adapter;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
@@ -122,6 +123,8 @@ public class WorldDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, Base
|
||||
|
||||
DynamicNickDetailWidget widget = helper.getView(R.id.widget_nick_detail);
|
||||
widget.setData(item);
|
||||
widget.setNickColor(ContextCompat.getColor(context,R.color.color_333333));
|
||||
widget.setTimeColor(ContextCompat.getColor(context,R.color.color_999999));
|
||||
|
||||
View inOfficialMask = helper.getView(R.id.in_official_mask);
|
||||
if (!TextUtils.isEmpty(item.getNameplateWord()) && !TextUtils.isEmpty(item.getNameplatePic())) {
|
||||
|
@@ -6,13 +6,6 @@ import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
@@ -26,13 +19,17 @@ import android.widget.LinearLayout;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.netease.nim.uikit.business.session.emoji.EmoticonPickerView;
|
||||
import com.netease.nim.uikit.business.session.emoji.IEmoticonSelectedListener;
|
||||
import com.netease.nim.uikit.business.session.emoji.MoonUtil;
|
||||
import com.netease.nim.uikit.support.glide.GlideApp;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
@@ -108,7 +105,16 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
RecyclerView rvListComment;
|
||||
@BindView(R.id.refresh_layout)
|
||||
SwipeRefreshLayout refreshLayout;
|
||||
|
||||
@BindView(R.id.ll_reply)
|
||||
LinearLayout llReply;
|
||||
@BindView(R.id.iv_emoji)
|
||||
ImageView ivEmoji;
|
||||
@BindView(R.id.et_reply)
|
||||
EditText etReply;
|
||||
@BindView(R.id.tv_send)
|
||||
TextView tvSend;
|
||||
@BindView(R.id.emoticon_picker_view)
|
||||
EmoticonPickerView emoticonPickerView;
|
||||
|
||||
CircleImageView ivAvatar;
|
||||
ImageView ivHeadWear;
|
||||
@@ -118,50 +124,17 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
RecyclerView rvImage;
|
||||
ExpandableTextView etvContent;
|
||||
TextView tvCommentCount;
|
||||
|
||||
|
||||
ConstraintLayout clOption;
|
||||
ImageView ivLikePic;
|
||||
TextView tvLikeCount;
|
||||
ImageView ivCommentPic;
|
||||
ImageView ivSharePic;
|
||||
TextView tvCommentCountOption;
|
||||
|
||||
// @BindView(R.id.tv_flag_mini_world)
|
||||
TextView tvFlagMiniWorld;
|
||||
// @BindView(R.id.layout_root_mini_world)
|
||||
ConstraintLayout layoutRootMiniWorld;
|
||||
// @BindView(R.id.tv_mini_world_name)
|
||||
TextView tvMiniWorldName;
|
||||
|
||||
private View viewLineDetailHeader;
|
||||
|
||||
|
||||
@BindView(R.id.ll_reply)
|
||||
LinearLayout llReply;
|
||||
@BindView(R.id.iv_emoji)
|
||||
ImageView ivEmoji;
|
||||
@BindView(R.id.et_reply)
|
||||
EditText etReply;
|
||||
@BindView(R.id.tv_send)
|
||||
TextView tvSend;
|
||||
|
||||
// @BindView(R.id.cl_option)
|
||||
// ConstraintLayout clOption;
|
||||
// @BindView(R.id.iv_like_pic)
|
||||
// ImageView ivLikePic;
|
||||
// @BindView(R.id.tv_like_count)
|
||||
// TextView tvLikeCount;
|
||||
//
|
||||
// @BindView(R.id.iv_comment_pic)
|
||||
// ImageView ivCommentPic;
|
||||
//
|
||||
// @BindView(R.id.iv_share_pic)
|
||||
// ImageView ivSharePic;
|
||||
|
||||
@BindView(R.id.emoticon_picker_view)
|
||||
EmoticonPickerView emoticonPickerView;
|
||||
|
||||
private long dynamicId;
|
||||
|
||||
private long worldId;
|
||||
@@ -255,6 +228,8 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
dynamicId = getIntent().getLongExtra(EXTRA_DYNAMIC_ID, 0L);
|
||||
worldId = getIntent().getLongExtra(EXTRA_WORLD_ID, 0L);
|
||||
initTitleBar("详情");
|
||||
mTitleBar.setLeftImageResource(R.drawable.arrow_left_white);
|
||||
mTitleBar.setTitleColor(Color.WHITE);
|
||||
initRecyclerView();
|
||||
initView();
|
||||
loadComment(true, true);
|
||||
@@ -330,12 +305,9 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
}
|
||||
});
|
||||
|
||||
etReply.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (hasFocus) {
|
||||
hideEmojiView();
|
||||
}
|
||||
etReply.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
if (hasFocus) {
|
||||
hideEmojiView();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -363,21 +335,6 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
layoutRootMiniWorld = mHeaderView.findViewById(R.id.layout_root_mini_world);
|
||||
tvMiniWorldName = mHeaderView.findViewById(R.id.tv_mini_world_name);
|
||||
viewLineDetailHeader.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void resetTvCommentCountTop(int topDp) {
|
||||
if (tvCommentCount == null) {
|
||||
return;
|
||||
}
|
||||
if (!(tvCommentCount.getLayoutParams() instanceof ViewGroup.MarginLayoutParams)) {
|
||||
return;
|
||||
}
|
||||
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) tvCommentCount.getLayoutParams();
|
||||
params.topMargin = UIUtil.dip2px(context, topDp);
|
||||
tvCommentCount.setLayoutParams(params);
|
||||
}
|
||||
|
||||
private boolean currNeedKeyboard = false;
|
||||
@@ -390,32 +347,29 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
adapter = new CommentAdapter();
|
||||
adapter.setHeaderAndEmpty(true);
|
||||
adapter.setHeaderView(mHeaderView);
|
||||
adapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMoreRequested() {
|
||||
if (isLoading || noMoreData) {
|
||||
return;
|
||||
}
|
||||
LogUtil.print("onLoadMoreRequested...");
|
||||
rvListComment.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (ListUtils.isListEmpty(adapter.getData())) {
|
||||
adapter.loadMoreEnd();
|
||||
adapter.setOnLoadMoreListener(() -> {
|
||||
if (isLoading || noMoreData) {
|
||||
return;
|
||||
}
|
||||
LogUtil.print("onLoadMoreRequested...");
|
||||
rvListComment.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (ListUtils.isListEmpty(adapter.getData())) {
|
||||
adapter.loadMoreEnd();
|
||||
} else {
|
||||
if (!isErr) {
|
||||
//成功获取更多数据
|
||||
LogUtil.print("请求加载更多接口");
|
||||
loadComment(false, false);
|
||||
} else {
|
||||
if (!isErr) {
|
||||
//成功获取更多数据
|
||||
LogUtil.print("请求加载更多接口");
|
||||
loadComment(false, false);
|
||||
} else {
|
||||
//获取更多数据失败
|
||||
isErr = true;
|
||||
adapter.loadMoreFail();
|
||||
}
|
||||
//获取更多数据失败
|
||||
isErr = true;
|
||||
adapter.loadMoreFail();
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
}, rvListComment);
|
||||
|
||||
|
||||
@@ -528,14 +482,11 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
});
|
||||
|
||||
//刷新
|
||||
refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
if (isLoading) {
|
||||
return;
|
||||
}
|
||||
loadComment(true, true);
|
||||
refreshLayout.setOnRefreshListener(() -> {
|
||||
if (isLoading) {
|
||||
return;
|
||||
}
|
||||
loadComment(true, true);
|
||||
});
|
||||
|
||||
}
|
||||
@@ -737,7 +688,6 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
header_more();
|
||||
});
|
||||
|
||||
UserInfo.NamePlate namePlate = info.getNameplate();
|
||||
|
||||
tvTime.setText(TimeUiUtils.getDynamicUi(bean.getPublishTime()));
|
||||
etvContent.setVisibility(View.GONE);
|
||||
@@ -755,22 +705,17 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
|
||||
setLikeCount(false);
|
||||
|
||||
// if (ListUtils.isListEmpty(bean.getDynamicResList())) {
|
||||
// resetTvCommentCountTop(22);
|
||||
// } else {
|
||||
// resetTvCommentCountTop(15);
|
||||
// }
|
||||
updateCommentCount();
|
||||
|
||||
//头饰 贵族头饰
|
||||
String headwearEffect = bean.getHeadwearEffect();
|
||||
String headwearPic = bean.getHeadwearPic();
|
||||
String micDecorate = bean.getMicDecorate();
|
||||
if (!TextUtils.isEmpty(headwearEffect)){
|
||||
if (!TextUtils.isEmpty(headwearEffect)) {
|
||||
NobleUtil.loadHeadWear(headwearEffect, ivHeadWear);
|
||||
} else if (!TextUtils.isEmpty(headwearPic)) {
|
||||
NobleUtil.loadHeadWear(headwearPic, ivHeadWear);
|
||||
} else if (!TextUtils.isEmpty(micDecorate)){
|
||||
} else if (!TextUtils.isEmpty(micDecorate)) {
|
||||
NobleUtil.loadResource(micDecorate, ivHeadWear);
|
||||
} else {
|
||||
ivHeadWear.setImageDrawable(null);
|
||||
@@ -964,15 +909,7 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
tvLikeCount.setText(likeCountStr);
|
||||
|
||||
if (bean.isLike()) {
|
||||
// if (isAnim) {
|
||||
// AnimationDrawable drawable = (AnimationDrawable) context.getResources()
|
||||
// .getDrawable(R.drawable.anim_list_dy_like);
|
||||
// ivLikePic.setImageDrawable(drawable);
|
||||
// drawable.stop();
|
||||
// drawable.start();
|
||||
// } else {
|
||||
ivLikePic.setImageResource(R.drawable.icon_dy_list_like);
|
||||
// }
|
||||
} else {
|
||||
ivLikePic.setImageResource(R.drawable.icon_dy_list_like_false);
|
||||
}
|
||||
@@ -990,10 +927,6 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
if (bean.getCommentCount() >= 100000) {
|
||||
commentCountStr = "99999+";
|
||||
}
|
||||
// builder.append("所有评论(")
|
||||
// .append(commentCountStr,
|
||||
// new ForegroundColorSpan(getResources().getColor(R.color.color_333333)))
|
||||
// .append(")");
|
||||
String comment = "所有评论(" + commentCountStr + ")";
|
||||
tvCommentCount.setText(comment);
|
||||
tvCommentCountOption.setText(commentCountStr);
|
||||
@@ -1232,4 +1165,15 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package com.yizhuan.erban.community.widget;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.text.TextUtils;
|
||||
@@ -69,6 +70,18 @@ public class DynamicNickDetailWidget extends ShapeConstrainLayout {
|
||||
ButterKnife.bind(this);
|
||||
}
|
||||
|
||||
public void setNickColor(@ColorInt int color) {
|
||||
if (tvNick != null) {
|
||||
tvNick.setTextColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
public void setTimeColor(@ColorInt int color) {
|
||||
if (tvTime != null) {
|
||||
tvTime.setTextColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
public void setData(BaseUserInfo info) {
|
||||
tvNick.setText(RegexUtil.getPrintableString(info.getNick()));
|
||||
tvAge.setVisibility(GONE);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 2.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<item android:state_enabled="false">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_50" />
|
||||
<solid android:color="@color/color_E5E5E5" />
|
||||
<solid android:color="#555574" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="true">
|
||||
|
@@ -4,7 +4,8 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
android:background="@color/color_1c1b22"
|
||||
android:paddingTop="25dp">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
@@ -38,14 +39,14 @@
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line_color"
|
||||
android:background="#353548"
|
||||
app:layout_constraintBottom_toTopOf="@+id/ll_reply" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_reply"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:background="@color/color_2a2a39"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="50dp"
|
||||
android:orientation="horizontal"
|
||||
@@ -61,14 +62,14 @@
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_round_f5f5f5_radius_15dp"
|
||||
android:background="@drawable/bg_message_input"
|
||||
android:hint="@string/dy_pub_comment"
|
||||
android:maxLength="500"
|
||||
android:maxLines="3"
|
||||
android:minHeight="30dp"
|
||||
android:paddingStart="10dp"
|
||||
android:textColor="@color/color_1A1A1A"
|
||||
android:textColorHint="@color/color_B3B3B3"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#555574"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<ImageView
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_list_data"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="27dp">
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
|
@@ -40,17 +40,6 @@
|
||||
app:layout_constraintTop_toTopOf="@id/iv_head_wear"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:id="@+id/tv_time"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:gravity="center"-->
|
||||
<!--android:textColor="@color/color_999999"-->
|
||||
<!--android:textSize="@dimen/dp_12"-->
|
||||
<!--tools:text="刚刚" />-->
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.yizhuan.erban.community.widget.ExpandableTextView
|
||||
@@ -74,7 +63,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -165,7 +154,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="#4F516A"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -210,7 +199,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/color_AFAFB3"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_like_pic"
|
||||
app:layout_constraintStart_toEndOf="@id/v_tmp_like"
|
||||
@@ -245,7 +234,7 @@
|
||||
android:layout_marginStart="5.5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/dy_comment_text"
|
||||
android:textColor="@color/color_AFAFB3"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_comment_pic"
|
||||
app:layout_constraintStart_toEndOf="@id/v_tmp_comment"
|
||||
@@ -289,7 +278,7 @@
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@color/line_color"
|
||||
android:background="#353548"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cl_option" />
|
||||
@@ -300,7 +289,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line_detail_header"
|
||||
|
@@ -23,7 +23,7 @@
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="180dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
@@ -35,7 +35,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="#4F516A"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_nick"
|
||||
@@ -51,7 +51,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_29"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="@dimen/dp_13"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="#C6C6E9"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_nick"
|
||||
@@ -62,7 +62,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@color/line_color"
|
||||
android:background="#353548"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_content"
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
android:id="@+id/line_reply_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line_color"
|
||||
android:background="#353548"
|
||||
app:layout_constraintEnd_toEndOf="@id/line_reply_top"
|
||||
app:layout_constraintStart_toStartOf="@id/line_reply_top"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_reply" />
|
||||
|
@@ -24,7 +24,7 @@
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="180dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
@@ -36,7 +36,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="#4F516A"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_nick"
|
||||
@@ -52,7 +52,7 @@
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="@dimen/sp_13"
|
||||
tools:text="回复内容回复内容回复内容回复内容回复内容回复内容回复内容回复内容回复"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_29"
|
||||
@@ -65,7 +65,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_content"
|
||||
android:background="@color/line_color"
|
||||
android:background="#353548"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px" />
|
||||
|
||||
|
@@ -23,13 +23,14 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
public class RoomNewbieActivity extends BaseActivity{
|
||||
public class RoomNewbieActivity extends BaseActivity {
|
||||
private RoomNewbieListFragment newbieListFragment;
|
||||
private boolean mIsInRoom;
|
||||
private ImageView ivBack;
|
||||
public static void start(Context context,boolean isInRoom) {
|
||||
|
||||
public static void start(Context context, boolean isInRoom) {
|
||||
Intent starter = new Intent(context, RoomNewbieActivity.class);
|
||||
starter.putExtra("isInRoom",isInRoom);
|
||||
starter.putExtra("isInRoom", isInRoom);
|
||||
context.startActivity(starter);
|
||||
}
|
||||
|
||||
@@ -63,8 +64,8 @@ public class RoomNewbieActivity extends BaseActivity{
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mIsInRoom = getIntent().getBooleanExtra("isInRoom",false);
|
||||
setContentView(mIsInRoom?R.layout.activity_room_newbie_list:R.layout.activity_newbie_list);
|
||||
mIsInRoom = getIntent().getBooleanExtra("isInRoom", false);
|
||||
setContentView(mIsInRoom ? R.layout.activity_room_newbie_list : R.layout.activity_newbie_list);
|
||||
ButterKnife.bind(this);
|
||||
init();
|
||||
|
||||
|
@@ -117,7 +117,7 @@ public class RoomMsgRecentContactsFragment extends TFragment {
|
||||
adapter.notifyDataSetChanged();
|
||||
boolean empty = items.isEmpty() && msgLoaded;
|
||||
emptyBg.setVisibility(empty ? View.VISIBLE : View.GONE);
|
||||
emptyHint.setHint("你还没有聊天记录哦!\n快去和好友聊天吧!");
|
||||
emptyHint.setText("你还没有聊天记录哦!\n快去和好友聊天吧!");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -6,13 +6,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="27dp"
|
||||
tools:background="@color/color_666666">
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/white"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
|
@@ -57,7 +57,7 @@
|
||||
<EditText
|
||||
android:id="@+id/editTextMessage"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/bottom_component_margin_horizontal"
|
||||
@@ -69,14 +69,14 @@
|
||||
android:imeOptions="actionSend"
|
||||
android:inputType="text"
|
||||
android:hint="@string/message_hint"
|
||||
android:textColorHint="#C6C6C6"
|
||||
android:textColorHint="#555574"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="10dp"
|
||||
android:background="@drawable/bg_message_input"
|
||||
android:minHeight="35dp"
|
||||
android:maxHeight="72dp"
|
||||
android:maxLines="4"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="13sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/emoji_button"
|
||||
|
@@ -33,6 +33,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/emptyBg1"
|
||||
android:textColor="#C6C6E9"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="5dip"
|
||||
android:gravity="center"/>
|
||||
|
@@ -122,7 +122,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
private volatile boolean disable;
|
||||
|
||||
|
||||
private String hintText;
|
||||
private boolean isChat;
|
||||
|
||||
public InputPanel(Container container, View view, List<BaseAction> actions, boolean isTextAudioSwitchShow) {
|
||||
@@ -200,31 +199,31 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
|
||||
private void initViews() {
|
||||
// input bar
|
||||
messageActivityBottomLayout = (LinearLayout) view.findViewById(R.id.messageActivityBottomLayout);
|
||||
messageActivityBottomLayout = view.findViewById(R.id.messageActivityBottomLayout);
|
||||
messageInputBar = view.findViewById(R.id.textMessageLayout);
|
||||
switchToTextButtonInInputBar = view.findViewById(R.id.buttonTextMessage);
|
||||
switchToAudioButtonInInputBar = view.findViewById(R.id.buttonAudioMessage);
|
||||
moreFuntionButtonInInputBar = view.findViewById(R.id.buttonMoreFuntionInText);
|
||||
emojiButtonInInputBar = view.findViewById(R.id.emoji_button);
|
||||
sendMessageButtonInInputBar = view.findViewById(R.id.buttonSendMessage);
|
||||
messageEditText = (EditText) view.findViewById(R.id.editTextMessage);
|
||||
messageEditText = view.findViewById(R.id.editTextMessage);
|
||||
|
||||
// 语音
|
||||
audioRecordBtn = (Button) view.findViewById(R.id.audioRecord);
|
||||
audioRecordBtn = view.findViewById(R.id.audioRecord);
|
||||
audioAnimLayout = view.findViewById(R.id.layoutPlayAudio);
|
||||
time = (Chronometer) view.findViewById(R.id.timer);
|
||||
timerTip = (TextView) view.findViewById(R.id.timer_tip);
|
||||
timerTipContainer = (LinearLayout) view.findViewById(R.id.timer_tip_container);
|
||||
time = view.findViewById(R.id.timer);
|
||||
timerTip = view.findViewById(R.id.timer_tip);
|
||||
timerTipContainer = view.findViewById(R.id.timer_tip_container);
|
||||
|
||||
// 表情
|
||||
emoticonPickerView = (EmoticonPickerView) view.findViewById(R.id.emoticon_picker_view);
|
||||
emoticonPickerView = view.findViewById(R.id.emoticon_picker_view);
|
||||
|
||||
// 显示录音按钮
|
||||
switchToTextButtonInInputBar.setVisibility(View.GONE);
|
||||
switchToAudioButtonInInputBar.setVisibility(View.VISIBLE);
|
||||
|
||||
// 文本录音按钮切换布局
|
||||
textAudioSwitchLayout = (FrameLayout) view.findViewById(R.id.switchLayout);
|
||||
textAudioSwitchLayout = view.findViewById(R.id.switchLayout);
|
||||
if (isTextAudioSwitchShow) {
|
||||
textAudioSwitchLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
@@ -278,13 +277,9 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
return false;
|
||||
});
|
||||
|
||||
messageEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
messageEditText.setHint("");
|
||||
checkSendButtonEnable(messageEditText);
|
||||
}
|
||||
messageEditText.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
messageEditText.setHint("");
|
||||
checkSendButtonEnable(messageEditText);
|
||||
});
|
||||
|
||||
messageEditText.addTextChangedListener(new TextWatcher() {
|
||||
@@ -377,7 +372,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
* ************************* 键盘布局切换 *******************************
|
||||
*/
|
||||
|
||||
private View.OnClickListener clickListener = new View.OnClickListener() {
|
||||
private final View.OnClickListener clickListener = new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -591,21 +586,21 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
actionPanelBottomLayoutHasSetup = true;
|
||||
}
|
||||
|
||||
private Runnable showEmojiRunnable = new Runnable() {
|
||||
private final Runnable showEmojiRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
emoticonPickerView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
};
|
||||
|
||||
private Runnable showMoreFuncRunnable = new Runnable() {
|
||||
private final Runnable showMoreFuncRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
actionPanelBottomLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
};
|
||||
|
||||
private Runnable showTextRunnable = new Runnable() {
|
||||
private final Runnable showTextRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showInputMethod(messageEditText);
|
||||
@@ -748,12 +743,8 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
int[] location = new int[2];
|
||||
view.getLocationOnScreen(location);
|
||||
|
||||
if (event.getRawX() < location[0] || event.getRawX() > location[0] + view.getWidth()
|
||||
|| event.getRawY() < location[1] - 40) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return event.getRawX() < location[0] || event.getRawX() > location[0] + view.getWidth()
|
||||
|| event.getRawY() < location[1] - 40;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -961,9 +952,8 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
container.proxy.sendMessage(customMessage);
|
||||
}
|
||||
|
||||
public void setLimitLevel(boolean isChat,String msg) {
|
||||
public void setLimitLevel(boolean isChat, String msg) {
|
||||
this.isChat = isChat;
|
||||
this.hintText = msg;
|
||||
setEditTextState();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user