私は、GridView
アルファベットの写真を表示する を持っていますが、最後の行では毎回アルファベットが少なくなります。そして、最後の行は左揃えです。これは見栄えが悪いので、最後の行を中央に配置したいと思います。
私のGridView
コード:
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/grid_view"
android:layout_width="fill_parent"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp"
android:layout_height="fill_parent"
android:numColumns="auto_fit"
android:columnWidth="70dp"
android:horizontalSpacing="10dp"
android:verticalSpacing="20dp"
android:gravity="center"
android:stretchMode="spacingWidthUniform" >
</GridView>