找回密码
 立即注册
ImageViewscreen屏幕orientation | android开发 2022-11-07 49 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
触屏接触流动测试代码,声明ImageView变量,声明相关变量作为存储图片宽高,方位使用,声明存储屏幕的分辨率变量,获得屏幕对象,获得屏幕解析像素,通过findViewById结构器创建ImageView对象,将图片从Drawable赋值给ImageView来出现,当点击ImageView,复原初始方位,获得手指触控屏幕的方位,覆盖触控事情,防图片超越屏幕的相关管理,预防屏幕向右超越屏幕,以setLayoutParams方法,重新安排Layout上的方位,以setLayoutParams方法,重新安排Layout上的方位...

(Touch screen contact flow test code, declare ImageView variables, declare relevant variables to be used as storage image width, height and orientation, declare storage screen resolution variables, obtain screen objects, obtain screen resolution pixels, create ImageView objects through findViewById structurer, assign pictures from Drawable to ImageView to appear, when clicking ImageView, restore the initial orientation, obtain finger touch screen orientation, and cover touch events, Relevant management of preventing pictures from exceeding the screen, preventing the screen from exceeding the screen to the right, rearrange the orientation on Layout with the setLayoutParams method, and rearrange the orientation on Layout with the setLayoutParams method)

[下载]11501182759.rar




上一篇:Android使用pull解析xml的实例
下一篇:Android alertDialog警告框实例运用