2012-05-19 60 views
1

我有一個包含2個圖像視圖的小部件。當我調整窗口小部件的大小時,其中一個圖像視圖保持相同的大小,但另一個更改。我希望他們都保持相同的大小,但我不知道圖像之間的區別是什麼。兩者都在佈局中定義了相同的屬性(當然除了src),並且都位於drawable-hdpi中。 Android如何確定是否調整圖像大小?它需要具備哪些特殊屬性? 感謝您的幫助。小工具自動調整圖像大小

這裏的佈局:

<LinearLayout android:layout_width="0dip" android:layout_height="fill_parent" 
    android:orientation="vertical" android:layout_gravity="right" 
    android:layout_weight="0.1"> 
    <ImageView android:id="@+id/update_button" android:layout_width="wrap_content" 
     android:layout_height="wrap_content" android:src="@drawable/update_blue_small" 
     android:contentDescription="@string/update_content_description"/> 
     <!-- android:text="@string/update_button_label"/> --> 
    <ImageView android:id="@+id/configure_button" android:layout_width="wrap_content" 
     android:layout_height="wrap_content" android:src="@drawable/update_blue_small" 
     android:contentDescription="@string/config_content_description"/> 
     <!-- android:text="@string/configure_button_label"/> --> 
</LinearLayout> 
+0

請將代碼顯示出來 – SpeedBirdNine

回答