当前位置:网站首页>横向滚动的RecycleView一屏显示五个半,低于五个平均分布
横向滚动的RecycleView一屏显示五个半,低于五个平均分布
2022-06-28 00:57:00 【沙漠一只雕得儿得儿】
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View itemView = mInflater.inflate(R.layout.layout_item_hq_cn_icon, parent, false);
int columnWidth;
if (mDataSet.size() > 5) {
columnWidth = (int) (parent.getMeasuredWidth() / 5.57f);
} else {
columnWidth = (int) (parent.getMeasuredWidth() / mDataSet.size());
}
RecyclerView.LayoutParams lp = new RecyclerView.LayoutParams(columnWidth, RecyclerView.LayoutParams.WRAP_CONTENT);
itemView.setLayoutParams(lp);
return ViewHolder.createViewHolder(mContext, itemView);
}边栏推荐
- KVM related
- 【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真
- Digital intelligence learning Lake Warehouse Integration Practice and exploration
- 云原生(三十) | Kubernetes篇之应用商店-Helm
- Cloud platform KVM migration local virtual machine records
- Win11不能拖拽圖片到任務欄軟件上快速打開怎麼辦
- 我今天忘带手机了
- 【历史上的今天】6 月 16 日:甲骨文成立;微软 MSX 诞生;快速傅里叶变换发明者出生
- File transfer protocol --ftp
- STM32F103的11个定时器
猜你喜欢

云原生(三十) | Kubernetes篇之应用商店-Helm

Win11不能拖拽圖片到任務欄軟件上快速打開怎麼辦

【历史上的今天】6 月 18 日:京东诞生;网店平台 Etsy 成立;Facebook 发布 Libra 白皮书

【云原生】-Docker安装部署分布式数据库 OceanBase

win11如何添加打印机和扫描仪?win11添加打印机和扫描仪的设置

榜单首发——前装搭载率站上10%大关,数字钥匙方案供应商TOP10
![[today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp](/img/fe/497eab2ac4a762298e71d28ed26e41.png)
[today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp

NER中BiLSTM-CRF解读Forward_algorithm

Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document
![[cloud native] - docker installation and deployment of distributed database oceanbase](/img/02/57ab785acafd8ff0a49c584dd05188.png)
[cloud native] - docker installation and deployment of distributed database oceanbase
随机推荐
Flask基础:模板渲染+模板过滤使用+控制语句
OSI 7层模型讲解(大白话 通俗易懂)
Truth table of common anode digital tube
Prometheus 2.27.0 new features
【历史上的今天】6 月 13 日:分组交换网路的“亲子纠纷”;博弈论创始人出生;交互式电视初现雏形
ROS+Gazebo中红绿黄交通灯如何实现?
KVM related
STM32F103的11个定时器
LeetCode - Easy - 197
如何系统学习LabVIEW?
【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真
【历史上的今天】6 月 11 日:蒙特卡罗方法的共同发明者出生;谷歌推出 Google 地球;谷歌收购 Waze
Exploration on the construction path of real-time digital warehouse integrating digital intelligence learning and streaming batch
Win11 ne peut pas faire glisser l'image sur le logiciel de la barre des tâches
Mysql database foundation: DML data operation language
ScheduledThreadPoolExecutor源码解读(二)
毕业总结
Teach you how to realize pynq-z2 bar code recognition
[today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born
CRF+BiLSTM代码分步骤解读