2013-04-29 75 views
-6

我是新的android開發人員,從可繪製文件夾設置圖像。在android設置圖像資源中的圖像

看到belove圖像:

enter image description here

enter image description here

輸出:

enter image description here

enter image description here

當圖像是矩形時,設置圖像視圖矩形並且圖像是正方形,然後設置圖像視圖正方形。 如何實現這種類型的功能?

請幫我

+3

請幫忙做什麼? – Blackbelt 2013-04-29 07:42:30

+3

這是個問題嗎? – 2013-04-29 07:43:10

+0

在imageview中設置圖像。 – Hemant 2013-04-29 07:43:12

回答

1

回答基於評論

試試這個

將您的文件夾res/drawable圖像,然後

<ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:src="@drawable/rectangle" />  <-- your image in drawable