cost 328 ms
键盘正在使用 NestedScrollView 和 RcyclerView 推动部分布局 - Keyboard is pushing part of the layout with NestedScrollView and RcyclerView

我有这样的布局 但是,键盘正在推动底部的黑色视图(第二个屏幕截图)。 如果我删除RecyclerView然后键盘按预期工作,黑色视图在下面(第一个屏幕截图)。 我尝试了app:layout_behavior="@string/appbar_scrolling_view_behavior" .. ...

com.google.android.material.appbar.AppBarLayout$LayoutParams 不能转换为 androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams - com.google.android.material.appbar.AppBarLayout$LayoutParams cannot be cast to androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams

我使用了 CoordinatorLayout + AppBarLayout,因此工具栏可以在滚动时消失,并将 Recycler View 放在 tablayout 下方。 但是在我更改了模型逻辑并在工具栏中添加了子元素之后,这个致命错误不断发生。 将根布局更改为 LinearLayout 或 Fra ...

LazyColumn 可以与 CoordinatorLayout 一起使用吗? - Can LazyColumn work along with CoordinatorLayout?

我正在将应用程序迁移到 Jetpack Compose,并且在查看/撰写混合屏幕上出现以下情况: 布局根元素是一个 CoordinatorLayout,它有一个可折叠的顶栏。 内容是一个 FragmentViewPager,其中一个页面是我要迁移到 Compose 的 Fragment。 当我在这 ...

FloatingActionButton 未固定在 RecyclerView 中 - FloatingActionButton is not pinning in RecyclerView

我想每次都显示FloatingActionButton右下角(同时滚动)。 但是当我将它与RecyclerView一起使用时,它不会显示在RecyclerView上。 它显示在RecyclerView下。 这是我的布局: 如何每次都显示 FAB 右下角而不是RecyclerView下? ...

在 CoordinatorLayot 中翻译后查看不可点击 - View not clickable after translate in CoordinatorLayot

我在应用程序的右下角有一个包含我的 FAB 部分的 ConstraintLayout。 我使用布局而不仅仅是按钮,因为我在 FAB 周围有更多视图(在下面的示例中省略了它们,实际布局更复杂)。 该布局有一个 CoordinatorLayout 作为主要父级。 我有两个 FAB,一个靠近另一个,当我单 ...

工具栏不在协调器布局中滚动 - Toolbar not scrolling in Coordinator Layout

我有一个协调器布局,其中包含一个 ViewPager,后者又包含一个 RecyclerView。 我面临的问题是,当我滚动我的 RecyclerView 时,工具栏没有调整大小。 我看过很多帖子,但看不出我做错了什么。 很感谢任何形式的帮助。 我在 MainActivity 或其他任何操作工具栏的地 ...

Android 材质工具栏出现在片段后面 - Android Material Toolbar appearing behind fragment

我有一个应用程序,我需要一个底部栏作为我的主导航和工具栏的标题和设置图标。 到目前为止,我所取得的成就是: 活动.xml 一切正常,除了工具栏出现在片段后面。 只有当我在<fragment> android:layout_height="match_parent"更改为android:l ...

如何在框架布局中使用协调器布局? - How to use coordinator layout with frame layout?

我正在创建一个视图,该视图具有一个带有浮动操作按钮和自定义工具栏的导航抽屉。 它看起来像这样: 问题是:我应该在框架布局中使用协调器布局,如下所示: 或协调器布局内的框架布局,如下所示: 它们似乎都工作得很好,但我想知道哪个更好,为什么? ...

如何使用 CoordinatorLayout、EditText 和 ListView 实现此布局 - How can I achieve this layout with a CoordinatorLayout, EditText, and ListView

我正在从RelativeLayout切换到CoordinatorLayout ,这样我就可以利用 FAB 并使用Snackbar移动。 我的问题是我能够使用layout_below为布局中的项目提供层次结构和顺序。 但是,当我使用 CoordinatorLayout 运行应用程序时,一切似乎 go ...

在协调器布局中折叠布局后保留图像并设置最小高度 - Keep the image after collapse the layout in coordinator layout and set min height

我在collapseToolbarLayout中工作,在appBar的设计中,它应该是appBar底部锚点中的图像(大多数设计放置了一个floatingActionButton .. 在这里我使用的是图像)我需要在向上滚动时部分折叠,但不完全。 所以我得到了一些解决方案来从这个自定义高度为 appB ...

以编程方式滚动到 CoordinatorLayout 中的特定视图,或粘性行为 - Programmatically scrolling to specific view in CoordinatorLayout, or sticky behaviour

我有一个 CoordinatorLayout,我需要以编程方式垂直滚动以将特定视图固定在顶部作为粘性视图。 粘性通过在我想要粘性的视图上设置一个带有app:layout_scrollFlags="scroll|snap" 。 CoordinatorLayout 的编程滚动被证明是有问题的。 C ...

在 CoordinatorLayout 内触发 AppBar 回到其正常的 position - Trigger AppBar back to its normal position inside CoordinatorLayout

我有下一个布局: 当用户在列表中向下滚动时,这将隐藏应用栏,并在用户向上滚动时显示它。 我的问题是,在NestedScrollView的末尾我有一个“返回顶部”按钮,单击该按钮将触发 scrollView 向上滚动: scrollView.smoothScrollTo(0, 0); 问题是 app ...

Android Tabs和CoordinatorLayout,需要添加一行textViews - Android Tabs and CoordinatorLayout, need to add a row of textViews

Android Studio 3.5.1。 使用选项卡式活动模板。 我真的不明白 CoordinatorLayout 的东西。 这很好用。 在每个选项卡上使用带有 ListView 的选项卡等。 但是,在屏幕底部,我想添加一行包含不同状态信息的 TextView。 (例如,自开始以来的时间、计 ...

WebView 在带有 CollapsibleToolBarLayout 的 NestedScrollView 中不滚动 - WebView doesn't scroll in NestedScrollView with CollapsibleToolBarLayout

我目前有这样的布局设置: 虽然这大部分工作正常,但当我想确保其内容填充视口时,webview 的滚动存在问题。 如果我将android:fillViewport="true"属性添加到 NestedScrollView ,则视口会正确填充并且折叠工具栏仍然折叠,但 webview 本身无法再滚动。 ...

Android @ string / appbar_scrolling_view_behavior被标记为未解决的参考 - Android @string/appbar_scrolling_view_behavior is marked as unresolved reference

我正在使用androidx依赖项,一切工作正常。 但是,lint假定@ string / appbar_scrolling_view_behavior是未解决的引用。 见下图: 代码本身可以正常工作,没有问题。 我只是想摆脱棉绒/检查,以使错误消失。 似乎很奇怪,我已经尝试过 ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM