android怎么样在屏幕上的一个特定的地方disaplay图像 [英] android How to disaplay image at a particular place on screen

查看:116
本文介绍了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 来指定密度像素的图像定位(DP)

I would rather use a RelativeLayout and specify margins like layout_marginTop and marginLeft to specify image location in density pixels (dp)

这篇关于android怎么样在屏幕上的一个特定的地方disaplay图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆