私は単純なレイアウトを持っています:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<GridView
android:id="@+id/photo_browser_grid_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:horizontalSpacing="5dp"
android:verticalSpacing="5dp"
android:stretchMode="none"
android:numColumns="auto_fit"
android:columnWidth="100dp">
</GridView>
GridView を相対レイアウト内の中央に配置したいと考えています。私の間隔は常に固定されています。その結果、GridView が左に配置されました。親の内側に配置するにはどうすればよいですか?