[Modify]修改房间布局和排行榜布局颜色
This commit is contained in:
@@ -47,7 +47,6 @@ import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
* @author xiaoyu
|
||||
* @date 2017/12/18
|
||||
*/
|
||||
|
||||
public abstract class BaseMicroViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
// 麦位类型;用于左右滑动切换房间时判断是否需要更换麦位adapter
|
||||
public static final String MICRO_TYPE_NULL = "null";
|
||||
|
@@ -2,13 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#0D183F"
|
||||
android:startColor="#32687A"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<solid android:color="@color/color_67D7D7" />
|
||||
<corners android:radius="@dimen/dp_12" />
|
||||
|
||||
|
||||
</shape>
|
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="#ff000000" />
|
||||
<solid android:color="#26ffffff" />
|
||||
<corners android:topLeftRadius="12dp" android:topRightRadius="12dp" android:bottomLeftRadius="12dp" android:bottomRightRadius="12dp" />
|
||||
<solid android:color="#4dffffff" />
|
||||
<corners android:radius="@dimen/dp_12" />
|
||||
</shape>
|
@@ -1,5 +1,5 @@
|
||||
<com.yizhuan.erban.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/status_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@@ -191,7 +191,7 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_EB82AB"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -121,4 +121,5 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/nim_default_img" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
@@ -242,7 +242,7 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_EB82AB"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -280,7 +280,7 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_EB82AB"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -238,7 +238,7 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_EB82AB"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="10dp"
|
||||
tools:text="126" />
|
||||
</LinearLayout>
|
||||
|
@@ -225,7 +225,7 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_EB82AB"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -199,7 +199,7 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_EB82AB"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -181,7 +181,7 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_EB82AB"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -9,15 +9,17 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.netease.nim.uikit.common.ui.recyclerview.loadmore.MsgListFetchLoadMoreView;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseMvpFragment;
|
||||
import com.yizhuan.erban.common.NoDataFragment;
|
||||
import com.yizhuan.erban.treasure_box.adapter.BoxRankingListAdapter;
|
||||
import com.yizhuan.erban.treasure_box.module.IBoxRankingView;
|
||||
import com.yizhuan.erban.treasure_box.presenter.BoxRankingPresenter;
|
||||
import com.yizhuan.erban.treasure_box.widget.BoxRankLoadMoreView;
|
||||
import com.yizhuan.erban.ui.user.activity.UserInfoActivity;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.erban.ui.widget.recyclerview.decoration.HorizontalDecoration;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.TreasureRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.event.RefreshBoxRankingEvent;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
@@ -30,7 +32,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间内私聊用的好友列表界面
|
||||
* 房间内寻爱排行榜
|
||||
*
|
||||
* @author MadisonRong RoomNewbieListFragment
|
||||
*/
|
||||
@@ -75,8 +77,6 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
mAdapter.setEnableLoadMore(true);
|
||||
loadData(true, datetype);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,6 +103,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
recyclerView.setItemAnimator(null);
|
||||
recyclerView.addItemDecoration(new HorizontalDecoration(UIUtil.dip2px(mContext, 8), false, false));
|
||||
mAdapter = new BoxRankingListAdapter(mContext);
|
||||
mAdapter.setLoadMoreView(new BoxRankLoadMoreView());
|
||||
mAdapter.setOnLoadMoreListener(this, recyclerView);
|
||||
mAdapter.setOnItemChildClickListener((adapter, view, position) -> UserInfoActivity.Companion.start(mContext, mAdapter.getData().get(position).getUid()));
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
|
||||
@@ -128,6 +129,23 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showNoData(View view, int drawable, CharSequence charSequence) {
|
||||
if (!checkActivityValid())
|
||||
return;
|
||||
|
||||
if (view == null) {
|
||||
return;
|
||||
}
|
||||
View status = view.findViewById(R.id.status_layout);
|
||||
if (status == null || status.getId() == View.NO_ID) {
|
||||
return;
|
||||
}
|
||||
NoDataFragment fragment = NoDataFragment.newInstance(R.layout.fragment_box_rank_no_data, drawable, charSequence);
|
||||
fragment.setListener(getLoadListener());
|
||||
getChildFragmentManager().beginTransaction().replace(status.getId(), fragment, STATUS_TAG).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBoxRankingFails(String error) {
|
||||
hideStatus();
|
||||
|
@@ -0,0 +1,27 @@
|
||||
package com.yizhuan.erban.treasure_box.widget;
|
||||
|
||||
import com.chad.library.adapter.base.loadmore.LoadMoreView;
|
||||
import com.yizhuan.erban.R;
|
||||
|
||||
public final class BoxRankLoadMoreView extends LoadMoreView {
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.box_rank_view_load_more;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLoadingViewId() {
|
||||
return R.id.load_more_loading_view;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLoadFailViewId() {
|
||||
return R.id.load_more_load_fail_view;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLoadEndViewId() {
|
||||
return R.id.load_more_load_end_view;
|
||||
}
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/load_more_loading_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:layout_marginRight="@dimen/dp_4"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loading_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_4"
|
||||
android:text="@string/brvah_loading"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/load_more_load_fail_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prompt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/brvah_load_failed"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/load_more_load_end_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/brvah_load_end"
|
||||
android:textColor="@color/color_white"/>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="250dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/no_data_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_common_failure" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_data_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/layout_item_empty_list_01"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
Reference in New Issue
Block a user