码迷,mamicode.com
首页 > 移动开发 > 详细

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

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

标签:des   android   style   blog   http   color   io   os   ar   

文章若有价值,欢迎转载,转载请写明出处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小问题记录

标签:des   android   style   blog   http   color   io   os   ar   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!