6.5.4礼物冠名
This commit is contained in:
parent
ce1174a88c
commit
6d262d0c94
@ -62,12 +62,19 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showData(int contextLayoutGiftHeight, LiveGiftBean model) {
|
public void showData(int contextLayoutGiftHeight, LiveGiftBean model) {
|
||||||
|
|
||||||
//设置高度
|
//设置高度
|
||||||
itemView.post(new Runnable() {
|
itemView.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
GridLayoutManager.LayoutParams linearParams = (GridLayoutManager.LayoutParams) itemView.getLayoutParams();
|
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);
|
itemView.setLayoutParams(linearParams);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user