我有一个文本视图显示上方和旁边的文本视图的信息图标图像中心。在这里一切都很好,但我希望信息图标与textview居中对齐。截至目前,它相对于文本视图右对齐。我希望它对齐相对于文本视图
的XML版式文件中右低于
<RelativeLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_gravity="center"
>
<TextView
android:id="@+id/ViewMessageOne"
android:layout_width="275dp"
android:layout_height="45dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000"
android:textSize="14sp"
android:typeface="sans"
android:background="@drawable/back"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/banner_portrait"
android:layout_toRightOf="@+id/ViewMessageOne"
android:paddingLeft="10dp"
android:gravity="center"
/>
</RelativeLayout>
请点我在正确的方向。感谢您的帮助
都能跟得上使用drawableRigh。问题仍然存在。我在Imageview标签中添加了这个。 –
已编辑。此修补程序应该适用于您的情况。 –
这工作。非常感谢。 –