首页 > 移动平台 > 详细

[持续更新]Android小问题记录

时间:2014-10-21 15:19:31      阅读:200      评论:0      收藏:0      [点我收藏+]

文章若有价值,欢迎转载,转载请写明出处http://www.cnblogs.com/rossoneri/p/4040314.html

此文随时更新,旨在记录平时遇到的不值得单独写博客记录的细节问题。

 

1.xml中layout_gravity,gravity的区别。

 layout_gravity表示控件自身位置,gravity表示子组件的位置。

 

2.加imageView后提示Warning:Missing content Description attribute on image

Resolved this warning by setting attribute android:contentDescription for my ImageView

android:contentDescription="@string/desc"

Android Lint support in ADT 16 throws this warning to ensure that image widgets provide a contentDescription.

This defines text that briefly describes content of the view. This property is used primarily for accessibility. Since some views do not have textual representation this attribute can be used for providing such.

Non-textual widgets like ImageViews and ImageButtons should use the contentDescription attribute to specify a textual description of the widget such that screen readers and other accessibility tools can adequately describe the user interface.

http://stackoverflow.com/questions/8500544/android-lint-contentdescription-warning

 

3.eclipse编译时长时间refreshing external folders导致等待时间过长

选择project->properties
选择Java build path->libraries->android.jar->source attachment,remove掉Source attachment中的路径

 

[持续更新]Android小问题记录

原文:http://www.cnblogs.com/rossoneri/p/4040314.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!