我正在制作一个应用程序,我希望从右到左填充gridview“使用它从右到左语言”,我试图让gridView重力设置为正确但它没有工作...我的gridview布局如下。从右边开始GridView元素
在此先感谢
<RelativeLayout
android:id="@+id/grid_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/show_info"
android:gravity="right" >
<GridView
android:id="@+id/channel_grid"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:columnWidth="90dp"
android:gravity="right"
android:horizontalSpacing="10dp"
android:numColumns="auto_fit"
android:stretchMode="columnWidth"
android:verticalSpacing="10dp" >
</GridView>
</RelativeLayout>
实际上,它从4.2开始考虑'layoutDirection'。我用一些额外的链接更新了我的答案。 – Jelle 2013-08-29 08:01:36
这是一个很好的提示,谢谢。在我的应用程序中,gridView具有固定数量的列,这样我就可以模拟rtl方向。 – 2014-05-27 10:02:47