简体   繁体   English

有没有一种方法,如果控制是关闭屏幕,而不是吵架吗?

[英]Is there a way to see if a control is off screen and not drawn?

I have a app where on very small screens the buttommost textview is not drawn (it's off the screen). 我有一个应用程序,在非常小的屏幕上,没有绘制出最清晰的textview(它不在屏幕上)。 Is there a way to see if it is off the screen? 有没有办法查看它是否在屏幕外?

Yes. 是。 There is actually a pretty nice tool you can use called HierarchyViewer This will give you all kinds of good information like how your views are laid out, the specs for each one, and how long it takes to draw. 实际上,您可以使用一个非常不错的工具HierarchyViewer,它将为您提供各种有用的信息,例如视图的布局方式,每个视图的规格以及绘制时间。

The Hierarchy Viewer application allows you to debug and optimize your user interface. Hierarchy Viewer应用程序允许您调试和优化用户界面。 It provides a visual representation of the layout's View hierarchy (the View Hierarchy window) and a magnified view of the display (the Pixel Perfect window). 它提供了布局的“视图”层次结构的可视化表示(“视图层次结构”窗口)和显示的放大视图(“像素完美”窗口)。

http://developer.android.com/tools/debugging/debugging-ui.html#HierarchyViewer http://developer.android.com/tools/debugging/debugging-ui.html#HierarchyViewer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM