Commit 60f5f09b authored by 小费同学阿's avatar 小费同学阿 💬 Committed by 杨秀秀

bug修复

parent fa732bc6
...@@ -62,8 +62,7 @@ public class ActivitiesActivity extends BaseActivity<ActivityActivitiesListBindi ...@@ -62,8 +62,7 @@ public class ActivitiesActivity extends BaseActivity<ActivityActivitiesListBindi
binding.rvDblList.setVisibility(View.VISIBLE); binding.rvDblList.setVisibility(View.VISIBLE);
binding.llNoData.setVisibility(View.GONE); binding.llNoData.setVisibility(View.GONE);
/*结束加载*/ /*结束加载*/
binding.refresh.finishLoadMore(); binding.refresh.finishLoadMoreWithNoMoreData();
binding.refresh.setEnableLoadMore(false);
} else if (it == 3) { } else if (it == 3) {
/*显示recycleView和它的暂无数据列表*/ /*显示recycleView和它的暂无数据列表*/
binding.rvDblList.setVisibility(View.GONE); binding.rvDblList.setVisibility(View.GONE);
...@@ -93,6 +92,6 @@ public class ActivitiesActivity extends BaseActivity<ActivityActivitiesListBindi ...@@ -93,6 +92,6 @@ public class ActivitiesActivity extends BaseActivity<ActivityActivitiesListBindi
public void onRefresh(@NonNull RefreshLayout refreshLayout) { public void onRefresh(@NonNull RefreshLayout refreshLayout) {
viewModel.page = 1; viewModel.page = 1;
viewModel.getActivityCenterList(); viewModel.getActivityCenterList();
binding.refresh.setEnableLoadMore(true); binding.refresh.setEnableFooterFollowWhenNoMoreData(true);
} }
} }
...@@ -4,18 +4,8 @@ package com.xx.hbhbcompany.activity.adapter; ...@@ -4,18 +4,8 @@ package com.xx.hbhbcompany.activity.adapter;
import static com.xx.hbhbcompany.utils.RetrofitClient.baseImgUrl; import static com.xx.hbhbcompany.utils.RetrofitClient.baseImgUrl;
import android.content.Context; import android.content.Context;
import android.text.Layout;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.StaticLayout;
import android.text.TextUtils;
import android.text.style.AlignmentSpan;
import android.text.style.ForegroundColorSpan;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.TextView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
...@@ -64,4 +54,17 @@ public class MyCommentListAdapter extends xxBaseRecyclerViewAdapter<ItemCommentL ...@@ -64,4 +54,17 @@ public class MyCommentListAdapter extends xxBaseRecyclerViewAdapter<ItemCommentL
dataBind.ivAapDelete.setVisibility(View.GONE); dataBind.ivAapDelete.setVisibility(View.GONE);
} }
} }
/**
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
*/
public static int dp2px(Context context, float dpValue) {
int res = 0;
final float scale = context.getResources().getDisplayMetrics().density;
if (dpValue < 0)
res = -(int) (-dpValue * scale + 0.5f);
else
res = (int) (dpValue * scale + 0.5f);
return res;
}
} }
\ No newline at end of file
...@@ -85,8 +85,7 @@ public class MyCommentActivity extends BaseActivity<ActivityMyCommentBinding, My ...@@ -85,8 +85,7 @@ public class MyCommentActivity extends BaseActivity<ActivityMyCommentBinding, My
binding.rvMyCommentList.setVisibility(View.VISIBLE); binding.rvMyCommentList.setVisibility(View.VISIBLE);
binding.llNoData.setVisibility(View.GONE); binding.llNoData.setVisibility(View.GONE);
/*结束加载*/ /*结束加载*/
binding.refresh.finishLoadMore(); binding.refresh.finishLoadMoreWithNoMoreData();
binding.refresh.setEnableLoadMore(false);
}else if(it==3) }else if(it==3)
{ {
/*显示recycleView和它的暂无数据列表*/ /*显示recycleView和它的暂无数据列表*/
...@@ -155,6 +154,6 @@ public class MyCommentActivity extends BaseActivity<ActivityMyCommentBinding, My ...@@ -155,6 +154,6 @@ public class MyCommentActivity extends BaseActivity<ActivityMyCommentBinding, My
viewModel.page=1; viewModel.page=1;
viewModel.getMyCommentList(); viewModel.getMyCommentList();
binding.refresh.setEnableLoadMore(true); binding.refresh.setEnableFooterFollowWhenNoMoreData(true);
} }
} }
...@@ -22,4 +22,8 @@ ...@@ -22,4 +22,8 @@
<color name="static_reject">#C8382A</color> <color name="static_reject">#C8382A</color>
<color name="static_deal">#E6933F</color> <color name="static_deal">#E6933F</color>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment