当前位置:网站首页>Methods of nested recycleview to solve sliding conflict and incomplete item display
Methods of nested recycleview to solve sliding conflict and incomplete item display
2022-04-23 18:42:00 【Xiao Xiaofeng】
nesting recycleview The problem is nothing more than these two : Slide conflict 、item Display incomplete . There are thousands of solutions , The simplest and most effective solution is as follows .
Slide conflict resolution :
to recycleview Set the following methods
recyclerView.setHasFixedSize(true);
recyclerView.setNestedScrollingEnabled(false);
Recycleview item The display is not completely solved :
Given in layout Recycleview Add... To the outer layer RelativeLayout And add properties android:descendantFocusability="blocksDescendants"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:descendantFocusability="blocksDescendants">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:paddingTop="20pt"
android:paddingBottom="20pt" />
</RelativeLayout>
版权声明
本文为[Xiao Xiaofeng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210604091200.html
边栏推荐
- K210串口通信
- 教你用简单几个步骤快速重命名文件夹名
- Use of regular expressions in QT
- Get a list of recent apps
- Nacos cluster construction and MySQL persistence configuration
- ESP32 LVGL8. 1 - arc (arc 19)
- CANopen usage method and main parameters of object dictionary
- ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
- Chondroitin sulfate in vitreous
- Mysql database backup command -- mysqldump
猜你喜欢
Teach you to quickly rename folder names in a few simple steps
Use of regular expressions in QT
ctfshow-web361(SSTI)
ESP32 LVGL8. 1 - calendar (calendar 25)
教你用简单几个步骤快速重命名文件夹名
STM32: LCD显示
Use stm32cube MX / stm32cube ide to generate FatFs code and operate SPI flash
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
Esp32 (UART ecoh) - serial port echo worm learning (2)
视频边框背景如何虚化,简单操作几步实现
随机推荐
CISSP certified daily knowledge points (April 19, 2022)
Chondroitin sulfate in vitreous
Configure iptables
Daily CISSP certification common mistakes (April 19, 2022)
昇腾 AI 开发者创享日全国巡回首站在西安成功举行
Introduction to QT programming
关于unity文件读取的操作(一)
Kettle paoding jieniu Chapter 17 text file output
ctfshow-web361(SSTI)
ESP32 LVGL8. 1. Detailed migration tutorial of m5stack + lvgl + IDF (27)
CISSP certified daily knowledge points (April 18, 2022)
listener. log
ESP32 LVGL8. 1 - slider slider (slider 22)
Seata处理分布式事务
ESP32 LVGL8. 1 - label (style 14)
Daily network security certification test questions (April 13, 2022)
Database computer experiment 4 (data integrity and stored procedure)
QT error: no matching member function for call to ‘connect‘
The corresponding permissions required to automatically open the app in the setting interface through accessibility service
CISSP certified daily knowledge points (April 13, 2022)