2011-01-10 16 views
0

我有一個頭,其中我有文字:「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的圖形佈局它顯示正確的做法:

alt text

但在模擬器和我的手機上showes這樣的: alt text

什麼是做到這一點的最好方法是什麼?

回答

0

固定它。

對於那些想知道:android:scaleType="fitStart"做的工作。