当前位置:网站首页>The horizontal scrolling recycleview displays five and a half in one screen, which is lower than the five average distributions
The horizontal scrolling recycleview displays five and a half in one screen, which is lower than the five average distributions
2022-06-28 02:52:00 【An eagle in the desert】
@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);
}
边栏推荐
- 《天天数学》连载53:二月二十一日
- 启牛开户安全吗?怎么线上开户?
- "Dadao Zhichuang" won a ten million prea+ round of financing and launched a technology consumption robot
- How to realize red, green and yellow traffic lights in ros+gazebo?
- 英特尔锐炫A380显卡即将在中国面市
- 第三批入围企业公示!年度TOP100智能网联供应商评选
- 无心剑汉英双语诗004.《剑》
- 【历史上的今天】5 月 31 日:Amiga 之父诞生;BASIC 语言的共同开发者出生;黑莓 BBM 停运
- Usage differences between isempty and isblank
- 【历史上的今天】6 月 23 日:图灵诞生日;互联网奠基人出生;Reddit 上线
猜你喜欢
[block coding] simulation of image block coding based on MATLAB
How to systematically learn LabVIEW?
Reprinted article: the digital economy generates strong demand for computing power Intel releases a number of innovative technologies to tap the potential of computing power
[today in history] June 3: Microsoft launched Bing search engine; Larry Roberts starts ARPANET; The father of Visual Basic was born
Stm32f1 and stm32subeide programming example - metal touch sensor driver
【历史上的今天】6 月 7 日:Kubernetes 开源版本发布;《魔兽世界》登陆中国;分组交换网络发明者出生
毕业季来临,2022届高校毕业生人数首次突破千万大关
[cloud native] - docker installation and deployment of distributed database oceanbase
How to enable multi language text suggestions? Win11 method to open multilingual text suggestions
第一次使用gcc和makefile编写c程序
随机推荐
【历史上的今天】6 月 6 日:世界 IPv6 启动纪念日;《俄罗斯方块》发布;小红书成立
High reliability application knowledge map of Architecture -- the path of architecture evolution
「大道智创」获千万级preA+轮融资,推出科技消费机器人
启牛开户安全吗?怎么线上开户?
math_(函数&数列)极限的含义&误区和符号梳理/邻域&去心邻域&邻域半径
[today in history] June 16: Oracle Bone Inscriptions was established; Microsoft MSX was born; The inventor of fast Fourier transform was born
How to realize red, green and yellow traffic lights in ros+gazebo?
Character interception triplets of data warehouse: substrb, substr, substring
Opencv -- Hough transform and some problems encountered
ROS+Gazebo中红绿黄交通灯如何实现?
How does win11 close recently opened projects? Win11 method to close recently opened projects
How does win11 add printers and scanners? Win11 add printer and scanner settings
[2D code image correction and enhancement] simulation of 2D code image correction and enhancement processing based on MATLAB
Prometheus 2.27.0 新特性
2-5基础配置-Win2003增加攻击面
The first place on the list - the carrying rate of front-end equipment is up to 10%, and the top 10 suppliers of digital key solutions
How technicians become experts in technical field
在线JSON转PlainText工具
[today in history] June 12: the United States entered the era of digital television; Mozilla's original developer was born; 3com merges with American Robotics
【历史上的今天】6 月 23 日:图灵诞生日;互联网奠基人出生;Reddit 上线