我在相对布局中有两个框架布局,像这样:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottom_nav_bar" >
<FrameLayout
android:id="@+id/for_dashboard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true" >
</FrameLayout>
<FrameLayout
android:id="@+id/for_main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true" >
</FrameLayout>
</RelativeLayout>案例1:当for_main_layout可见时,我设置了for_dashboard_layout调整调整大小,因此它一直滞后/延迟约2-3秒。
案例2:for_dashboard_layout I GONE和for_main_layout正在调整大小,接下来我通过调用VISIBLE显示for_dashboard_layout,也发生了相同的问题(滞后约2-3秒)。
任何人都能帮我解决这个问题..。
发布于 2017-12-06 03:54:26
在您的逻辑周围清楚地显示和隐藏您的仪表板之前,可能您的仪表板正在尝试加载包含许多元素的大数据或列表。试着用看不见的代替过去,以减少时间的滞后。
https://stackoverflow.com/questions/47666426
复制相似问题