层次观众间产生pretation [英] hierarchy viewer results interpretation

查看:196
本文介绍了层次观众间产生pretation的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前我已经安装在Eclipse的ADT插件的更新,我刚刚尝试了新的层次观众工具。除了我花了一段时间,发现测量仅在第一个(父)视图来计算,我观察到显示的数值,每次都是不一样的,即使有我的应用程序没有任何改变。

Some days ago I've installed the updates for ADT Plugin in Eclipse and I've just tried the new Hierarchy viewer tool. Beside it took me a while to find that the measurements are calculated only at the first (parent) view, I have observed that the values shown are not the same every time, even if there are no changes in my application.

例如,我在模拟器启动我的应用程序之一,它装在层次观众,并得到了下一个结果:(我希望包括屏幕截图,但我的名誉不允许我张贴图片,所以我就写值)

For example, I've launched in the emulator one of my applications, loaded it in the Hierarchy viewer and got the next results: (I've wanted to include the screen shots, but my reputation doesn't allow me to post pictures yet, so I'll just write the values)

测量: 175.340毫秒
布局: 5.179毫秒
绘制: 47.115毫秒

Measure: 175.340 ms
Layout: 5.179 ms
Draw: 47.115 ms

然后,没有任何变化,我再次启动的应用程序,并得到以下结果:

Then, without any changes, I launched again the application, and got the following results:

测量: 98.696毫秒
布局: 4.819毫秒
绘制: 50.923毫秒

Measure: 98.696 ms
Layout: 4.819 ms
Draw: 50.923 ms

有人能告诉我,为什么会出现测量值之间如此大的差异,例如?

Could someone tell me why there is such a big difference between the values of Measure, for example?

此外,也有人知道意思/提供的3个值之间的差异:测量 布局绘图?分别与相关的意见,一些具体的attributs?

Also, did someone know the meaning / the difference between the 3 values provided: Measure, Layout and Draw? Are each related with some specific attributs of the views?

Android的开发者页面并没有提供太多的解释是什么,以及我所知道的是这些值必须尽可能的小。

The Android developers page doesn't provide too many explanations for that, and all I know is those values must be as small as possible.

推荐答案

看一看的android怎么样画图
它有什么样的价值观衡量一个视图,布局和绘制的所有信息。

Have a look at "How Android Draws Views".
It has all the info of what the values Measure, Layout and Draw of a View are.

这篇关于层次观众间产生pretation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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