中建365-二期开发-bug修复

develop
wlh 1 year ago
parent c12c462f2a
commit 65928255f2

@ -19,11 +19,11 @@ class HomeTopLayoutAdapter(var mContext: Context): BaseAdapter<HomeLayoutBean.Ho
var screenWidth = context.resources.displayMetrics.widthPixels
val layoutParam = holder.getView<LinearLayout>(R.id.root).layoutParams
if (data.size < 4){
if (data.size <= 4){
layoutParam.width = screenWidth /4
}else{
layoutParam.width = screenWidth /data.size
layoutParam.width = screenWidth /5
}

@ -30,10 +30,16 @@ class ShopCategoryAdapter : BaseAdapter<ShopCategoryBean>(R.layout.item_shop_cat
categoryName.setTextColor(context.getColor(R.color.col_313))
}
img.setImage(context,item.pic)
/*if (item.pic == null){
}else{
item.pic?.let {
img.setImage(context,it)
}
}*/
holder.setText(R.id.tv_category,item.categoryName)
}

@ -13,7 +13,7 @@
android:id="@+id/img_category"
android:layout_width="@dimen/dp_47"
android:layout_height="@dimen/dp_47"
android:background="@mipmap/icon_default_avator"
app:is_circle="true"
app:border_color="@color/white"
android:scaleType="centerCrop"

Loading…
Cancel
Save