开发者

In Android how to add a view at particular x-y co-ordinates on the screen

This is what I want to achieve. When ever a user taps at any point on the screen, I would like to show an image at that开发者_StackOverflow中文版 point for say 2 seconds. Is it possible ?


Just to inform that, I finally achieved this by overriding the onDraw method and drawing it at the specified co-ordinates


you can use Absolute layout but it is deprecated and not recommended to use because it won't give the same reults with different screen resolutions

http://android-pro.blogspot.com/2010/02/absolute-layout.html

you can check the relative layout as a substitute

http://android-pro.blogspot.com/2010/02/absolute-layout.html

thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜