相关疑难解决方法(0)

GridLayout - 垂直/水平约束不一致

我发布此内容是因为我无法在 SO 和网络的其余部分上找到我正在寻找的确切内容。我看过这个,但我不太确定如何解决这个问题。

当我在应用程序中使用时,问题就出现了GridLayout,每当我旋转屏幕时,我都会看到如下输出:

在横向模式下:

06-23 21:41:25.627 10222-10222/in.cryf.yaca D/android.widget.GridLayout: vertical constraints: y1-y0>=112, y2-y1>=112, y3-y2>=112, y4-y3>=112, y4-y0<=311 are inconsistent; permanently removing: y4-y0<=311.
Run Code Online (Sandbox Code Playgroud)

在纵向模式下:

06-23 21:41:28.124 10222-10222/in.cryf.yaca D/android.widget.GridLayout: horizontal constraints: x1-x0>=192, x2-x1>=192, x3-x2>=192, x4-x3>=192, x4-x0<=704 are inconsistent; permanently removing: x4-x0<=704.
Run Code Online (Sandbox Code Playgroud)

虽然它不会影响我的应用程序的运行,但从我上面发布的 SO 链接来看,它似乎可能存在性能问题。

GridLayout我的 XML 中:

<GridLayout
        android:id="@+id/button_grid"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
</GridLayout>
Run Code Online (Sandbox Code Playgroud)

除此之外,我在创建应用程序时以编程方式将视图添加到布局中。

android android-gridlayout

5
推荐指数
1
解决办法
4002
查看次数

标签 统计

android ×1

android-gridlayout ×1