问题标签 [android-flexboxlayout]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 将视图添加到 flexboxlayout
单击一个按钮,我以编程方式创建一个文本视图并将它们添加到 flexboxlayout。为什么只添加了一个视图?
android-recyclerview - 是否可以在带有 FlexboxLayoutManager 的 RecycleView 中仅在屏幕上显示一行(不是网格)项目
如果可以使用 FlexboxLayoutManager 定义 RecycleView 以在屏幕上仅显示一行(行)而不是网格(二维 - 行和列)
android - 以编程方式添加视图阻塞主线程
我的 UI 中有一个 flexboxlayout,我想向它动态添加文本视图。请在下面找到代码。
我在 for 循环中调用此方法。
即使我将它写在一个线程中,它也会花费相当长的时间来执行,并且在此期间 UI 不会响应。有什么想法可以解决这个问题吗?(数组大小超过200)
android - RecyclerView items with different heights with FlexboxLayoutManager
How can I display my recycleview items in a row while keeping their original height?
I want to use a recycleviewer with FlexboxLayoutManager. Every item normally having their own height depending on their content. However, every recycleview item on the same row always ending up with an equal height somehow.
How can I display my recycleview items in a row while respecting their original height?
I need the items to be displayed like this:
What I tried without success:
(The small items always stretches)
My code where I set the layout manager:
I have tried this layoutManager.setAlignContent(AlignContent.CENTER);
However you can't set alignContent
in a FlexboxLayoutManager
for a recycleviewer.
The app crash because alignContent
is for FlexboxLayout
(not manager).
EDITED:
When using a StaggeredGridLayoutManager
, this will solve the problem.
However you will lose the responsive behaviour of the FlexboxLayoutManager.
I created my own responsive behaviour for a StaggeredGridLayoutManager:
android - 将“FlexBoxLayout”添加到项目会中断编译
我正在尝试FlexBoxLayout
在我的应用程序中使用,但我不断遇到错误。我尝试了各种设置和配置,但不断出现不同的错误。我现在拥有的:
build.gradle(应用程序):
这给了我错误:
清单合并失败:来自 [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 的属性 application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) 也存在于[androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory)。建议:将 'tools:replace="android:appComponentFactory"' 添加到 AndroidManifest.xml:23:5-131:19 的元素以覆盖。
当我将它添加tools:replace="android:appComponentFactory"'
到我的清单时,我遇到了以下问题:
清单合并失败并出现多个错误,请参阅日志
这就是我放弃的地方,我什至不知道要看什么日志。
当我只添加flexbox
到依赖项时更新NoClassDefFoundError
,应用程序在androidx.core.view.ViewCompat
类上崩溃。