6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-11 09:42:18 +08:00
parent ce1174a88c
commit 6d262d0c94

View File

@ -62,12 +62,19 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
}
public void showData(int contextLayoutGiftHeight, LiveGiftBean model) {
//设置高度
itemView.post(new Runnable() {
@Override
public void run() {
GridLayoutManager.LayoutParams linearParams = (GridLayoutManager.LayoutParams) itemView.getLayoutParams();
linearParams.height = contextLayoutGiftHeight / 2;
int giftHeight = 607;
if (contextLayoutGiftHeight > 607) {
giftHeight = 607;
} else {
giftHeight = contextLayoutGiftHeight;
}
linearParams.height = (giftHeight-30) / 2;
itemView.setLayoutParams(linearParams);
}
});