2011-01-10 8 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"は仕事をしました。