在Android中如何在屏幕上的特定x-y坐標處添加視圖 - In Android how to add a view at particular x-y co-ordinates on the screen -开发者知识库

在Android中如何在屏幕上的特定x-y坐標處添加視圖 - In Android how to add a view at particular x-y co-ordinates on the screen -开发者知识库,第1张

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 point for say 2 seconds. Is it possible ?

這就是我想要實現的目標。當用戶點擊屏幕上的任何一點時,我想在該點顯示一個圖像,比如說2秒。可能嗎 ?

2 个解决方案

#1


1  

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

為了告知這一點,我最終通過覆蓋onDraw方法並在指定的坐標處繪制它來實現這一點

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复