2013-04-29 74 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