当前位置:网站首页>The problem of incomplete or partial display of the last recyclerview is solved
The problem of incomplete or partial display of the last recyclerview is solved
2022-07-26 10:15:00 【FrancisBingo】
One 、 Problem phenomenon
RecyclerView The last problem of incomplete data display
Two 、 Prerequisite
Use ViewPager+Fragment+RefreshLayout+RecyclerView+constrainLayout
3、 ... and 、 Try a solution
What is trying to solve , The following methods are used , Various modifications have not been solved .
1.recyclerview The height is set to 0dp, Then add app:layout_constraintBottom_toBottomOf="parent"
2.recyclerview use NestedScrollView wrap up
3.recyclerview coat RelativeLayout
If none of the above attempts solves your problem 、 So nice , And then it's time to witness miracles .
Four 、 Final solution
Use CoordinatorLayout+AppBarLayout modification viewPager Perfect solution ~ Say not much, say half a sentence . Please look at the code.
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/sv_contentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/common_content_background_color">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/ll_contentView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:elevation="0dp">
<ai.gmtech.uicom.ui.CommonTitleBar
android:id="@+id/commonTitleBar26"
android:layout_width="match_parent"
android:layout_height="44dp"
app:title=" Talk to each other ">
</ai.gmtech.uicom.ui.CommonTitleBar>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_call"
android:layout_width="match_parent"
android:layout_height="44dp"
android:background="@color/white_FFFFFFFF"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tabIndicator="@drawable/tab_indictor_bg"
app:tabIndicatorColor="@color/common_tv_font_color">
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottom_view_cl"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<RelativeLayout
android:id="@+id/view_pager_rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="1">
<androidx.viewpager.widget.ViewPager
android:id="@+id/callpage_viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.viewpager.widget.ViewPager>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>5、 ... and 、 If there are other problems and solutions, please leave a message for discussion
边栏推荐
- [datawhale] [machine learning] Diabetes genetic risk detection challenge
- Cloud native (36) | introduction and installation of harbor in kubernetes
- Common errors when starting projects in uniapp ---appid
- Li Kou - binary tree pruning
- Tower of Hanoi II | tower of Hanoi 4 columns
- Set view dynamic picture
- Encapsulation of tabbarcontroller
- Docker configuring MySQL Cluster
- 新建福厦铁路全线贯通 这将给福建沿海带来什么?
- 数通基础-Telnet远程管理设备
猜你喜欢
![[fluorescent character effect]](/img/05/4f4c24c787881e073919b63a6864cf.jpg)
[fluorescent character effect]

MySQL 5.7.25 source code installation record

分布式网络通信框架:本地服务怎么发布成RPC服务

Learning about opencv (1)

论文笔记(SESSION-BASED RECOMMENDATIONS WITHRECURRENT NEURAL NETWORKS)

数据库的复习--1.概述

Learning about opencv (3)

Principle analysis and source code interpretation of service discovery

Data communication foundation STP principle

Draw arrows with openlayer
随机推荐
Okaleido ecological core equity Oka, all in fusion mining mode
Show default image when wechat applet image cannot be displayed
Keeping alive to realize MySQL automatic failover
汉诺塔II|汉诺塔4柱
Azkaban [basic knowledge 01] core concepts + features +web interface + Architecture +job type (you can get started with Azkaban workflow scheduling system in one article)
Use of tabbarcontroller
Learning about tensor (III)
Self encapsulated database dbutils universal template
What is the principle of reflection mechanism?
Write a script that can run in Bash / shell and PowerShell
Sqoop [put it into practice 02] sqoop latest version full database import + data filtering + field type support description and example code (query parameter and field type forced conversion)
SQL优化的魅力!从 30248s 到 0.001s
The charm of SQL optimization! From 30248s to 0.001s
Production of a-modal drag function in antui
In Net 6.0
输入整数后输入整行字符串的解决方法
Force deduction DFS
SPARK中 DS V2 push down(下推)的一些说明
Network related journals and conferences in CS
Server memory failure prediction can actually do this!