我有一个头,其中我有文字:“Huidige Locatie”并且在其下方我有国别标志的图像。对齐动态图像和文本Android中
我宣布在布局中的TextView和ImageView的如下:
<LinearLayout
android:id="@+id/locatiebalk"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="5sp"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/vlaggenlocatie"
android:layout_width="105sp"
android:layout_height="fill_parent"
android:paddingLeft="14sp"
android:orientation="vertical">
<TextView
android:id="@+id/huidiglocatie"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Huidige locatie"
android:textColor="#000000"
android:textSize="12sp"/>
<ImageView
android:id="@+id/flag"
android:layout_width="fill_parent"
android:layout_height="46sp"
android:gravity="left"
android:src="@drawable/nl"/>
</LinearLayout>
(我正确地关闭标签以后,只是显示的相关部分)
在Eclipse的图形布局它显示正确的做法:
但在模拟器和我的手机上showes这样的:
什么是做到这一点的最好方法是什么?