This commit is contained in:
lixiaopeng
2020-09-17 21:16:18 +08:00
parent 1378cb808d
commit 2053211498
42 changed files with 79 additions and 60 deletions

View File

@@ -87,16 +87,16 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
// .into(mBgImageView);
mBgImageView.setBackgroundResource(getTypeRes(surroundingConstruction.getPoiType()));
RequestOptions requestOptions = new RequestOptions()
.placeholder(R.drawable.v2x_icon_live_logo)
.error(R.drawable.v2x_icon_live_logo)
.fallback(R.drawable.v2x_icon_live_logo);
Glide.with(mContext)
.asBitmap()
.load(getTypeSmallRes(surroundingConstruction.getPoiType()))
.apply(requestOptions)
.into(new SkinAbleBitmapTarget(mTypeImageView, requestOptions));
mTypeImageView.setBackgroundResource(getTypeSmallRes(surroundingConstruction.getPoiType()));
// RequestOptions requestOptions = new RequestOptions()
// .placeholder(R.drawable.v2x_icon_live_logo)
// .error(R.drawable.v2x_icon_live_logo)
// .fallback(R.drawable.v2x_icon_live_logo);
// Glide.with(mContext)
// .asBitmap()
// .load(getTypeSmallRes(surroundingConstruction.getPoiType()))
// .apply(requestOptions)
// .into(new SkinAbleBitmapTarget(mTypeImageView, requestOptions));
}

View File

@@ -106,11 +106,11 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
mShareTv.setOnClickListener(this);
mFreshTv.setOnClickListener(this);
mRecyclerView.setHasFixedSize(true);
// mRecyclerView.setHasFixedSize(true);
mRecyclerView.setOverScrollMode(OVER_SCROLL_NEVER);
GridLayoutManager layoutManage = new GridLayoutManager(getContext(), 2);
int spacingInPixels = getContext().getResources().getDimensionPixelSize(R.dimen.module_v2x_surrounding_item_bottom_right_textsize);
mRecyclerView.addItemDecoration(new SurroundingMarginDecoration(spacingInPixels));
// int spacingInPixels = getContext().getResources().getDimensionPixelSize(R.dimen.module_v2x_surrounding_item_bottom_right_textsize);
// mRecyclerView.addItemDecoration(new SurroundingMarginDecoration(spacingInPixels));
mRecyclerView.setLayoutManager(layoutManage);
mAdapter = new V2XSurroundingAdapter(getActivity(), poiInfosList, this);