Ce que je veux est une colonne centrale en utilisant GridView, mais tout ce que j'essaie ne fonctionne pas. Il s'aligne toujours à gauche. J'ai essayé de jouer avec layout_gravity et la gravité en vain.GridView et une colonne centrale
J'ai un GridView dans un LinearLayout:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<GridView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:numColumns="1"
android:columnWidth="100dp"
android:stretchMode="spacingWidth"
/>
</LinearLayout>
Android Plugin pour Eclipse a un ajustement quand je tente de layout_gravity = « 1 », donc Je ne peux pas vraiment compiler votre exemple. – NebulaFox
Bizarre j'ai copié ça directement de mon éclipse. Travaillé très bien pour moi. – Pandoro
Oui très bizarre. – NebulaFox