对于GridLayout类型,方法setVerticalSpacing(int)未定义

时间:2014-01-03 18:25:12

标签: java android grid-layout android-gridlayout

为什么我收到此错误? The method setVerticalSpacing(int) is undefined for the type GridLayout。此方法适用于GridLayout视图。

以下是GridLayout的声明:

GridLayout gameplayGL;
gameplayGL = new GridLayout(getApplicationContext());
gameplayGL.setVerticalSpacing(1);
gameplayGL.setHorizontalSpacing(1);  //same error here

这应该是我应该能够在我的gameplayGL布局上运行的常规方法。我一定错过了一些明显的东西。为什么会抛出错误?

0 个答案:

没有答案