android怎么样在屏幕上的一个特定的地方disaplay图像
本人开发的远程桌面应用程序,所以我从流中读取图像数据,并在Android device.So显示它的存在,我可以在一个特定的显示在上screen.May特定位置上的图像的任何方式X,Y设备上的坐标位置
I am developing a remote desktop application so i am reading the image data from the stream and displaying it on the android device.So is there any way that i can display the image at particular location on the screen.May at a particular x,y coordinates location on the device
您可以使用的 AbsoluteLayout 在特定的x,y坐标来显示。
You can use AbsoluteLayout to display at particular x,y coordinates.
您可以找到 AbsoluteLayout
例子的在这里和 HERE
不过,我真的不电子书籍使用它。下面是文档说约 AbsoluteLayout
:
However I don't really recomment using it. Here's what docs say about AbsoluteLayout
:
一个格局,让您指定精确位置及其子女(x / y坐标)。绝对布局不够灵活,更难保持比其他类型的布局没有绝对定位。
A layout that lets you specify exact locations (x/y coordinates) of its children. Absolute layouts are less flexible and harder to maintain than other types of layouts without absolute positioning.
我宁愿使用 RelativeLayout的
键,如 layout_marginTop
和 marginLeft 指定利润率code>来指定密度像素的图像定位(DP)
I would rather use a RelativeLayout
and specify margins like layout_marginTop
and marginLeft
to specify image location in density pixels (dp)