1
我有我的Android應用程序佈局之一的GridView。我試圖在Gridview的中心設置Item,但它始終停留在左側。我在StackOverflow中搜索了許多類似的問題,但沒有解決我的問題。我的XML如下所示。讓我知道是否有人可以幫助我在中心製作GridView項目。Android中的GridView項目在中心
<FrameLayout
android:id="@+id/framecaregory"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/second"
android:layout_alignParentTop="true"
android:layout_marginTop="?actionBarSize">
<GridView
android:id="@+id/gridviewcategory"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lite_color"
android:numColumns="5"
android:visibility="gone">
</GridView>
</FrameLayout>
感謝
你想圖像中心內部,你的GridView我是正確的 –
做u有網格view's項目佈局。如果是提供另一個佈局代碼,請 – 2017-09-01 17:29:08
@Yoni請不要添加「Android - 」問題請參閱[幫助中心標記](https://stackoverflow.com/help/tagging)(在頁面底部)應該避免它。 – jmattheis