Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 曲面视图移动/缩小视图_Android_Zooming_Surfaceview_Move_Pan - Fatal编程技术网

Android 曲面视图移动/缩小视图

Android 曲面视图移动/缩小视图,android,zooming,surfaceview,move,pan,Android,Zooming,Surfaceview,Move,Pan,我的SurfaceView有问题,屏幕上有对象,可以移动/平移和收缩缩放 问题是尺寸,我不想移动屏幕上的对象,显示一些 我已经在surfaceCreated方法中设置了固定大小的布局 LayoutParams lp = this.getLayoutParams(); lp.width = 2000; // required width lp.height = 2000; // required height this.setLayoutParams(lp); 但不知道如何限制内容,即使在缩放

我的SurfaceView有问题,屏幕上有对象,可以移动/平移和收缩缩放 问题是尺寸,我不想移动屏幕上的对象,显示一些

我已经在surfaceCreated方法中设置了固定大小的布局

LayoutParams lp = this.getLayoutParams();
lp.width = 2000; // required width
lp.height = 2000; // required height
this.setLayoutParams(lp);

但不知道如何限制内容,即使在缩放上,任何帮助都被理解为

你应该考虑TexReVIEW,而不是Survivew,因为它更适合于任何转换:与SurviveWW不同,TrutuVIEW不创建单独的窗口,而是表现为常规视图。这个关键的区别允许一个TextureView被移动、变换、设置动画等等。我如何限制TextureView的边界,使其不能拖动到屏幕视图之外???只需设置左上视图的位置,使其始终可见请参见此处的updatePosition方法:我的解决方案有效吗?