Sau*_*abh 5 android android-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)
除此之外,我在创建应用程序时以编程方式将视图添加到布局中。
GridLayout将我的内容放入 a后ScrollView,该消息就不再出现了。
<ScrollView
android:layout_below="@id/output"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<GridLayout
android:id="@+id/button_grid"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</GridLayout >
</HorizontalScrollView>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4002 次 |
| 最近记录: |