UI对稿
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package com.mango.moshen.common;
|
package com.mango.moshen.common;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -9,6 +11,7 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import com.mango.moshen.R;
|
import com.mango.moshen.R;
|
||||||
import com.mango.xchat_android_library.utils.NetworkUtils;
|
import com.mango.xchat_android_library.utils.NetworkUtils;
|
||||||
|
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||||
|
|
||||||
|
|
||||||
public class EmptyViewHelper {
|
public class EmptyViewHelper {
|
||||||
@@ -21,6 +24,16 @@ public class EmptyViewHelper {
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TextView createEmptyTextView(Context context,CharSequence text) {
|
||||||
|
TextView textView = new TextView(context);
|
||||||
|
textView.setGravity(Gravity.CENTER);
|
||||||
|
textView.setTextColor(Color.WHITE);
|
||||||
|
textView.setTextSize(12);
|
||||||
|
textView.setSingleLine(true);
|
||||||
|
textView.setText(text);
|
||||||
|
return textView;
|
||||||
|
}
|
||||||
|
|
||||||
public static View createDarkEmptyView(Context context, String text) {
|
public static View createDarkEmptyView(Context context, String text) {
|
||||||
if (!NetworkUtils.isNetworkAvailable(context)) text = "网络异常,请检查网络再试~";
|
if (!NetworkUtils.isNetworkAvailable(context)) text = "网络异常,请检查网络再试~";
|
||||||
View view = LayoutInflater.from(context).inflate(R.layout.layout_ktv_empty, null);
|
View view = LayoutInflater.from(context).inflate(R.layout.layout_ktv_empty, null);
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package com.mango.moshen.ui.im;
|
package com.mango.moshen.ui.im;
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -43,6 +44,8 @@ import com.effective.android.panel.view.panel.PanelView;
|
|||||||
import com.mango.core.statistic.StatisticManager;
|
import com.mango.core.statistic.StatisticManager;
|
||||||
import com.mango.core.statistic.protocol.StatisticsProtocol;
|
import com.mango.core.statistic.protocol.StatisticsProtocol;
|
||||||
import com.mango.moshen.R;
|
import com.mango.moshen.R;
|
||||||
|
import com.mango.moshen.base.BaseActivity;
|
||||||
|
import com.mango.moshen.common.permission.PermissionActivity;
|
||||||
import com.mango.moshen.ui.im.actions.GiftAction;
|
import com.mango.moshen.ui.im.actions.GiftAction;
|
||||||
import com.mango.moshen.ui.im.adpter.PhotoPreviewAdapter;
|
import com.mango.moshen.ui.im.adpter.PhotoPreviewAdapter;
|
||||||
import com.mango.xchat_android_library.utils.ListUtils;
|
import com.mango.xchat_android_library.utils.ListUtils;
|
||||||
@@ -116,7 +119,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
|||||||
protected EditText messageEditText;// 文本消息编辑框
|
protected EditText messageEditText;// 文本消息编辑框
|
||||||
protected Button audioRecordBtn; // 录音按钮
|
protected Button audioRecordBtn; // 录音按钮
|
||||||
protected View audioAnimLayout; // 录音动画布局
|
protected View audioAnimLayout; // 录音动画布局
|
||||||
protected FrameLayout textAudioSwitchLayout; // 切换文本,语音按钮布局
|
|
||||||
protected View switchToTextButtonInInputBar;// 文本消息选择按钮
|
protected View switchToTextButtonInInputBar;// 文本消息选择按钮
|
||||||
protected View switchToAudioButtonInInputBar;// 语音消息选择按钮
|
protected View switchToAudioButtonInInputBar;// 语音消息选择按钮
|
||||||
protected View sendMessageButtonInInputBar;// 发送消息按钮
|
protected View sendMessageButtonInInputBar;// 发送消息按钮
|
||||||
@@ -330,7 +332,11 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
|||||||
StatisticsProtocol.EVENT_CHAT_TOOLBAR_PHOTO_CLICK,
|
StatisticsProtocol.EVENT_CHAT_TOOLBAR_PHOTO_CLICK,
|
||||||
"聊天对话框工具栏相册点击");
|
"聊天对话框工具栏相册点击");
|
||||||
emojiButtonInInputBar.setImageResource(R.drawable.nim_message_input_emotion_pressed);
|
emojiButtonInInputBar.setImageResource(R.drawable.nim_message_input_emotion_pressed);
|
||||||
initPreviewPhotos();
|
((BaseActivity)container.activity).checkPermission(
|
||||||
|
() -> initPreviewPhotos(),
|
||||||
|
0,
|
||||||
|
Manifest.permission.READ_EXTERNAL_STORAGE
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -495,9 +501,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
|||||||
switchToTextButtonInInputBar.setVisibility(View.GONE);
|
switchToTextButtonInInputBar.setVisibility(View.GONE);
|
||||||
switchToAudioButtonInInputBar.setVisibility(View.VISIBLE);
|
switchToAudioButtonInInputBar.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
// 文本录音按钮切换布局
|
|
||||||
textAudioSwitchLayout = view.findViewById(R.id.switchLayout);
|
|
||||||
textAudioSwitchLayout.setVisibility(View.GONE);
|
|
||||||
messageListView = view.findViewById(R.id.messageListView);
|
messageListView = view.findViewById(R.id.messageListView);
|
||||||
ivImage = view.findViewById(R.id.iv_image);
|
ivImage = view.findViewById(R.id.iv_image);
|
||||||
ivCamera = view.findViewById(R.id.iv_camera);
|
ivCamera = view.findViewById(R.id.iv_camera);
|
||||||
@@ -581,15 +584,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
|||||||
sendTypingCommand();
|
sendTypingCommand();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 不展示右侧按钮时需要添加edit间距
|
|
||||||
try {
|
|
||||||
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) messageEditText.getLayoutParams();
|
|
||||||
layoutParams.setMarginStart(SizeUtils.dp2px(view.getContext(), 12));
|
|
||||||
messageEditText.requestLayout();
|
|
||||||
} catch (Exception ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -75,7 +75,7 @@ public class RVDelegate<T> {
|
|||||||
if (data != null && data.size() >= pageSize) {
|
if (data != null && data.size() >= pageSize) {
|
||||||
adapter.loadMoreComplete();
|
adapter.loadMoreComplete();
|
||||||
} else {
|
} else {
|
||||||
adapter.loadMoreEnd();
|
adapter.loadMoreEnd(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ public class RVDelegate<T> {
|
|||||||
if (data != null && data.size() >= pageSize) {
|
if (data != null && data.size() >= pageSize) {
|
||||||
adapter.loadMoreComplete();
|
adapter.loadMoreComplete();
|
||||||
} else {
|
} else {
|
||||||
adapter.loadMoreEnd();
|
adapter.loadMoreEnd(true);
|
||||||
}
|
}
|
||||||
if (refreshLayout != null) refreshLayout.setRefreshing(false);
|
if (refreshLayout != null) refreshLayout.setRefreshing(false);
|
||||||
if (dataStatus != null) {
|
if (dataStatus != null) {
|
||||||
|
@@ -70,10 +70,10 @@
|
|||||||
android:id="@+id/ll_audio"
|
android:id="@+id/ll_audio"
|
||||||
android:layout_width="63dp"
|
android:layout_width="63dp"
|
||||||
android:layout_height="@dimen/dp_25"
|
android:layout_height="@dimen/dp_25"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
android:background="@drawable/bg_userinfo_skill_audio"
|
android:background="@drawable/bg_userinfo_skill_audio"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
@@ -174,12 +174,13 @@
|
|||||||
android:id="@+id/tv_erban_id"
|
android:id="@+id/tv_erban_id"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:drawableEnd="@drawable/ic_copy_id_white"
|
||||||
|
android:drawablePadding="2dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:drawableEnd="@drawable/ic_copy_id_white"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="11dp"
|
android:textSize="14dp"
|
||||||
tools:text="ID:7958626" />
|
tools:text="ID:7958626" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@@ -88,4 +88,5 @@
|
|||||||
android:layout_marginEnd="@dimen/dp_15"
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
android:background="@color/color_F4F4F4"
|
android:background="@color/color_F4F4F4"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@@ -245,7 +245,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/white_transparent_50"
|
android:textColor="@color/white_transparent_50"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:drawablePadding="2dp"
|
||||||
android:drawableEnd="@drawable/ic_copy_id_white"
|
android:drawableEnd="@drawable/ic_copy_id_white"
|
||||||
tools:text="ID123456" />
|
tools:text="ID123456" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -132,9 +132,10 @@
|
|||||||
android:drawableEnd="@drawable/ic_copy_id"
|
android:drawableEnd="@drawable/ic_copy_id"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
android:drawablePadding="2dp"
|
||||||
android:onClick="@{click}"
|
android:onClick="@{click}"
|
||||||
android:textColor="@color/text_secondary_4f516a"
|
android:textColor="@color/text_secondary_4f516a"
|
||||||
android:textSize="@dimen/dp_13"
|
android:textSize="@dimen/dp_14"
|
||||||
tools:ignore="SpUsage"
|
tools:ignore="SpUsage"
|
||||||
tools:text="ID:123456" />
|
tools:text="ID:123456" />
|
||||||
|
|
||||||
|
@@ -20,9 +20,7 @@
|
|||||||
android:id="@+id/ll_skill"
|
android:id="@+id/ll_skill"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:background="@drawable/shape_white_8dp_round"
|
android:background="@drawable/shape_white_8dp_round"
|
||||||
android:baselineAligned="true"
|
android:baselineAligned="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@@ -111,9 +109,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:background="@drawable/shape_white_8dp_round">
|
android:background="@drawable/shape_white_8dp_round">
|
||||||
|
|
||||||
|
@@ -115,8 +115,8 @@
|
|||||||
android:id="@+id/switchLayout"
|
android:id="@+id/switchLayout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/bottom_component_margin_horizontal"
|
android:layout_marginStart="15dp"
|
||||||
android:layout_marginRight="@dimen/bottom_component_margin_horizontal">
|
android:layout_marginEnd="8dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/buttonAudioMessage"
|
android:id="@+id/buttonAudioMessage"
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
android:id="@+id/emoji_button"
|
android:id="@+id/emoji_button"
|
||||||
android:layout_width="32dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:layout_marginEnd="@dimen/bottom_component_margin_horizontal"
|
android:layout_marginEnd="15dp"
|
||||||
android:contentDescription="@string/empty"
|
android:contentDescription="@string/empty"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@drawable/nim_message_input_emotion_pressed" />
|
android:src="@drawable/nim_message_input_emotion_pressed" />
|
||||||
@@ -184,11 +184,12 @@
|
|||||||
android:id="@+id/buttonSendMessage"
|
android:id="@+id/buttonSendMessage"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginEnd="6dp"
|
android:layout_marginEnd="15dp"
|
||||||
|
android:layout_marginStart="-9dp"
|
||||||
android:background="@drawable/common_btn_bg"
|
android:background="@drawable/common_btn_bg"
|
||||||
android:contentDescription="@string/empty"
|
android:contentDescription="@string/empty"
|
||||||
android:gravity="center"
|
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/send"
|
android:text="@string/send"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
|
@@ -9,11 +9,12 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.mango.moshen.R;
|
|
||||||
import com.mango.moshen.base.BaseMvpFragment;
|
|
||||||
import com.mango.moshen.treasure_box.adapter.BoxRankingListAdapter;
|
|
||||||
import com.mango.core.room.treasure_box.bean.BoxRankingInfo;
|
import com.mango.core.room.treasure_box.bean.BoxRankingInfo;
|
||||||
import com.mango.core.room.treasure_box.event.RefreshBoxRankingEvent;
|
import com.mango.core.room.treasure_box.event.RefreshBoxRankingEvent;
|
||||||
|
import com.mango.moshen.R;
|
||||||
|
import com.mango.moshen.base.BaseMvpFragment;
|
||||||
|
import com.mango.moshen.common.EmptyViewHelper;
|
||||||
|
import com.mango.moshen.treasure_box.adapter.BoxRankingListAdapter;
|
||||||
import com.mango.moshen.treasure_box.module.IBoxRankingView;
|
import com.mango.moshen.treasure_box.module.IBoxRankingView;
|
||||||
import com.mango.moshen.treasure_box.presenter.BoxRankingPresenter;
|
import com.mango.moshen.treasure_box.presenter.BoxRankingPresenter;
|
||||||
import com.mango.xchat_android_library.base.factory.CreatePresenter;
|
import com.mango.xchat_android_library.base.factory.CreatePresenter;
|
||||||
@@ -37,7 +38,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
|||||||
|
|
||||||
public static BoxRankingFragment newInstance(int datetype) {
|
public static BoxRankingFragment newInstance(int datetype) {
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putInt("datetype",datetype);
|
args.putInt("datetype", datetype);
|
||||||
BoxRankingFragment fragment = new BoxRankingFragment();
|
BoxRankingFragment fragment = new BoxRankingFragment();
|
||||||
fragment.setArguments(args);
|
fragment.setArguments(args);
|
||||||
return fragment;
|
return fragment;
|
||||||
@@ -54,7 +55,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRootLayoutId() {
|
public int getRootLayoutId() {
|
||||||
return R.layout.fragment_newbie_list;
|
return R.layout.fragment_box_ranking;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -67,24 +68,21 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
|||||||
public void onSetListener() {
|
public void onSetListener() {
|
||||||
swipeRefresh.setOnRefreshListener(() -> {
|
swipeRefresh.setOnRefreshListener(() -> {
|
||||||
mAdapter.setEnableLoadMore(true);
|
mAdapter.setEnableLoadMore(true);
|
||||||
loadData(true,datetype);
|
loadData(true, datetype);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initiate() {
|
public void initiate() {
|
||||||
initRecyclerView();
|
initRecyclerView();
|
||||||
loadData(true,datetype);
|
loadData(true, datetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新数据
|
* 刷新数据
|
||||||
*/
|
*/
|
||||||
private void loadData(boolean isRefresh,int datetype) {
|
private void loadData(boolean isRefresh, int datetype) {
|
||||||
getMvpPresenter().loadData(isRefresh,datetype);
|
getMvpPresenter().loadData(isRefresh, datetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -100,19 +98,18 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
|||||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
|
||||||
recyclerView.setLayoutManager(linearLayoutManager);
|
recyclerView.setLayoutManager(linearLayoutManager);
|
||||||
recyclerView.setAdapter(mAdapter);
|
recyclerView.setAdapter(mAdapter);
|
||||||
|
mAdapter.setEmptyView(EmptyViewHelper.createEmptyTextView(mContext, "暂无记录"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBoxRankingSuccess(BoxRankingInfo rankingInfo) {
|
public void getBoxRankingSuccess(BoxRankingInfo rankingInfo) {
|
||||||
hideStatus();
|
|
||||||
if (mAdapter != null) {
|
if (mAdapter != null) {
|
||||||
int page = getMvpPresenter().getPage();
|
int page = getMvpPresenter().getPage();
|
||||||
if (page <= 1) {
|
if (page <= 1) {
|
||||||
swipeRefresh.setRefreshing(false);
|
swipeRefresh.setRefreshing(false);
|
||||||
|
|
||||||
if (rankingInfo.getRankVos() == null || rankingInfo.getRankVos().size() == 0) {
|
if (rankingInfo.getRankVos() == null || rankingInfo.getRankVos().size() == 0) {
|
||||||
showNoData(getString(R.string.tips_radish_record_empty));
|
mAdapter.setNewData(null);
|
||||||
} else {
|
} else {
|
||||||
mAdapter.setNewData(rankingInfo.getRankVos());
|
mAdapter.setNewData(rankingInfo.getRankVos());
|
||||||
}
|
}
|
||||||
@@ -122,18 +119,16 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBoxRankingFails(String error) {
|
public void getBoxRankingFails(String error) {
|
||||||
hideStatus();
|
|
||||||
|
|
||||||
int page = getMvpPresenter().getPage();
|
int page = getMvpPresenter().getPage();
|
||||||
if (page <= 1) {
|
if (page <= 1) {
|
||||||
showNoData(getString(R.string.tips_radish_record_empty));
|
mAdapter.setNewData(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBoxRankingLoadMoreSuccess(BoxRankingInfo rankingInfo) {
|
public void getBoxRankingLoadMoreSuccess(BoxRankingInfo rankingInfo) {
|
||||||
if (ListUtils.isListEmpty(rankingInfo.getRankVos())){
|
if (ListUtils.isListEmpty(rankingInfo.getRankVos())) {
|
||||||
mAdapter.loadMoreEnd();
|
mAdapter.loadMoreEnd(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mAdapter.addData(rankingInfo.getRankVos());
|
mAdapter.addData(rankingInfo.getRankVos());
|
||||||
@@ -142,22 +137,21 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getBoxRankingLoadMoreFails(String error) {
|
public void getBoxRankingLoadMoreFails(String error) {
|
||||||
hideStatus();
|
|
||||||
int page = getMvpPresenter().getPage();
|
int page = getMvpPresenter().getPage();
|
||||||
if (page <= 1) {
|
if (page <= 1) {
|
||||||
showNoData(getString(R.string.tips_radish_record_empty));
|
mAdapter.setNewData(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReloadData() {
|
public void onReloadData() {
|
||||||
super.onReloadData();
|
super.onReloadData();
|
||||||
loadData(true,datetype);
|
loadData(true, datetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadMoreRequested() {
|
public void onLoadMoreRequested() {
|
||||||
loadData(false,datetype);
|
loadData(false, datetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -168,6 +162,6 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onRefreshRanking(RefreshBoxRankingEvent event) {
|
public void onRefreshRanking(RefreshBoxRankingEvent event) {
|
||||||
loadData(true,datetype);
|
loadData(true, datetype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ class BoxRecordFragment : BaseViewBindingFragment<FragmentBoxRecordBinding>() {
|
|||||||
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
||||||
.setAdapter(adapter)
|
.setAdapter(adapter)
|
||||||
.setRecyclerView(binding.recyclerView)
|
.setRecyclerView(binding.recyclerView)
|
||||||
.setEmptyView(EmptyViewHelper.createEmptyView(context, "暂无记录"))
|
.setEmptyView(EmptyViewHelper.createEmptyTextView(context, "暂无记录"))
|
||||||
.setLayoutManager(LinearLayoutManager(mContext))
|
.setLayoutManager(LinearLayoutManager(mContext))
|
||||||
.setRefreshLayout(binding.swipeRefresh)
|
.setRefreshLayout(binding.swipeRefresh)
|
||||||
.setPageSize(pageSize)
|
.setPageSize(pageSize)
|
||||||
|
@@ -36,15 +36,12 @@ public class BoxMoreDialog extends BaseViewBindingFragment<DialogBoxMoreBinding>
|
|||||||
sendMessageSwitchLevel = requireArguments().getInt("sendMessageSwitchLevel");
|
sendMessageSwitchLevel = requireArguments().getInt("sendMessageSwitchLevel");
|
||||||
getBinding().tvHistory.setOnClickListener(v -> {
|
getBinding().tvHistory.setOnClickListener(v -> {
|
||||||
EventBus.getDefault().post(new MoreClickEvent(v));
|
EventBus.getDefault().post(new MoreClickEvent(v));
|
||||||
//DialogWebViewActivity.start(mContext, UriProvider.getBoxHistory(), false);
|
|
||||||
});
|
});
|
||||||
getBinding().tvBoxRule.setOnClickListener(v -> {
|
getBinding().tvBoxRule.setOnClickListener(v -> {
|
||||||
EventBus.getDefault().post(new MoreClickEvent(v));
|
EventBus.getDefault().post(new MoreClickEvent(v));
|
||||||
//DialogWebViewActivity.start(mContext, UriProvider.getBoxHelp(), false);
|
|
||||||
});
|
});
|
||||||
getBinding().tvGetKey.setOnClickListener(v -> {
|
getBinding().tvGetKey.setOnClickListener(v -> {
|
||||||
EventBus.getDefault().post(new MoreClickEvent(v));
|
EventBus.getDefault().post(new MoreClickEvent(v));
|
||||||
//DialogWebViewActivity.start(mContext, UriProvider.getBoxKey());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
boolean canSwitch = sendMessageSwitchLevel != 0 && UserUtils.getExpLevel() >= sendMessageSwitchLevel;
|
boolean canSwitch = sendMessageSwitchLevel != 0 && UserUtils.getExpLevel() >= sendMessageSwitchLevel;
|
||||||
@@ -64,6 +61,6 @@ public class BoxMoreDialog extends BaseViewBindingFragment<DialogBoxMoreBinding>
|
|||||||
|
|
||||||
private void updateMsgSwitch(boolean sendMsg) {
|
private void updateMsgSwitch(boolean sendMsg) {
|
||||||
getBinding().ivSwitch.setImageResource(sendMsg ?
|
getBinding().ivSwitch.setImageResource(sendMsg ?
|
||||||
R.drawable.icon_room_set_lock_true : R.drawable.icon_room_set_lock_false);
|
R.drawable.icon_box_set_true : R.drawable.icon_box_set_false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 313 B |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
@@ -17,11 +17,13 @@
|
|||||||
android:paddingEnd="7dp">
|
android:paddingEnd="7dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="75dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="19dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="11dp"
|
||||||
|
android:background="@drawable/icon_box_rank_rb_true"
|
||||||
|
android:gravity="center"
|
||||||
android:text="更多"
|
android:text="更多"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="10sp" />
|
android:textSize="10sp" />
|
||||||
@@ -30,7 +32,7 @@
|
|||||||
android:id="@+id/tv_get_key"
|
android:id="@+id/tv_get_key"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:drawableEnd="@drawable/arrow_right"
|
android:drawableEnd="@drawable/arrow_right_box"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="参与活动获得糖果"
|
android:text="参与活动获得糖果"
|
||||||
android:textColor="#F8CBFF"
|
android:textColor="#F8CBFF"
|
||||||
@@ -47,7 +49,7 @@
|
|||||||
android:id="@+id/tv_history"
|
android:id="@+id/tv_history"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:drawableEnd="@drawable/arrow_right"
|
android:drawableEnd="@drawable/arrow_right_box"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="获奖记录"
|
android:text="获奖记录"
|
||||||
android:textColor="#F8CBFF"
|
android:textColor="#F8CBFF"
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
android:id="@+id/tv_box_rule"
|
android:id="@+id/tv_box_rule"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:drawableEnd="@drawable/arrow_right"
|
android:drawableEnd="@drawable/arrow_right_box"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="玩法规则"
|
android:text="玩法规则"
|
||||||
android:textColor="#F8CBFF"
|
android:textColor="#F8CBFF"
|
||||||
@@ -96,7 +98,7 @@
|
|||||||
android:layout_height="@dimen/dp_15"
|
android:layout_height="@dimen/dp_15"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/icon_room_set_lock_false" />
|
android:src="@drawable/icon_box_set_false" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/swipe_refresh"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="2dp" />
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
|
@@ -24,8 +24,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:fontFamily="sans-serif"
|
||||||
android:textColor="#F8CBFF"
|
android:textColor="#F8CBFF"
|
||||||
android:textSize="12sp"
|
android:textSize="10sp"
|
||||||
tools:text="哈哈哈哈" />
|
tools:text="哈哈哈哈" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -36,7 +38,7 @@
|
|||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:textColor="#F8CBFF"
|
android:textColor="#F8CBFF"
|
||||||
android:textSize="10sp"
|
android:textSize="9sp"
|
||||||
tools:text="x12" />
|
tools:text="x12" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:textColor="#F8CBFF"
|
android:textColor="#F8CBFF"
|
||||||
android:textSize="12sp"
|
android:textSize="10sp"
|
||||||
tools:text="哈哈哈哈" />
|
tools:text="哈哈哈哈" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:textColor="#ff9966e4"
|
android:textColor="#F8CBFF"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
tools:text="06-30 16:00" />
|
tools:text="06-30 16:00" />
|
||||||
|
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="6dp"
|
android:paddingTop="6dp"
|
||||||
android:paddingBottom="6dp"
|
android:paddingBottom="6dp"
|
||||||
android:paddingStart="11dp"
|
android:paddingStart="15dp"
|
||||||
android:paddingEnd="11dp">
|
android:paddingEnd="15dp">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/message_item_time"
|
android:id="@+id/message_item_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
Reference in New Issue
Block a user