Android格式GridView布局

Android格式GridView布局,android,gridview,Android,Gridview,您好,我主要是问是否可以格式化GridView布局,我在应用程序中使用了一个,并尝试了android:gravity=“center”,但是当我加载我的应用程序时,GridView由于未知原因与左侧对齐 是否有需要定义的特定属性?或者这只是我使用我的GridView应用RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" 对于GridView android:layout_

您好,我主要是问是否可以格式化
GridView布局
,我在应用程序中使用了一个,并尝试了
android:gravity=“center”
,但是当我加载我的应用程序时,
GridView
由于未知原因与
左侧对齐


是否有需要定义的特定属性?或者这只是我使用我的
GridView
应用RelativeLayout

android:layout_width="match_parent"
android:layout_height="match_parent"
对于GridView

android:layout_centerInParent = "true"
如果你想说“谢谢”,请投票并接受我的回答。