我想在我的应用中实现这种行外观。
我已经有一个 ImageView/TextView 布局,但我希望右侧的“正面”小图像始终显示在完全相同的位置!
http://cache.ctoof.com/2010/03/gowalla-1.png
谢谢!
最佳答案
可能通过使用重力就可以完成这项工作
android:layout_gravity="center_vertical|right"
查看取 self 的一个 View 的示例
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/LinearLayout01"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dip"
android:layout_weight="1"
android:paddingRight="8dip"
android:layout_height="wrap_content"
android:id="@+id/LinearLayout01"
android:orientation="vertical">
....
</LinearLayout>
<ImageView
android:id="@+id/imgArrowRight"
android:src="@drawable/tab_right_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dip"
android:layout_gravity="center_vertical|right"></ImageView>
</LinearLayout>
关于android - ListView 行中的各种项目 - 屏幕截图示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3076983/