随笔分类 - Android Resource Types
摘要:1.官方文档 https://developer.android.com/studio/write/vector-asset-studio https://developer.android.com/studio/write/convert-webp https://developer.androi
阅读全文
摘要:TextView没有按下状态,Button有。 如图1,内容1在一个TextView上,默认它并没有按下状态。 如何让TextView有呢。 在xml中加入属性: android:clickable="true" 就可以作用StateList Drawable了。 代码如: msgbg_state.
阅读全文
摘要:模板: 和属性含义: 是否让系统来帮我们处理颜色差异,一般android系统中使用的颜色是ARGB_8888, 但很多显示设置是RGB_565,这个ARGB_8888与RGB_565有什么区别呢。这个ARGB_8888也就 是说每一个像素点要拿4个字节来保存,依次每个字节是A8个字节,R8个字节,G
阅读全文
摘要:参考: http://stackoverflow.com/questions/8633539/resources-getsystem-vs-getresources 相同: 都是取得 Resources 对象然后加载相应的资源。 区别: 它们使用的位置不同。Resources.getSystem()
阅读全文
摘要:1,示例 它们的代码如下: shape_oval.xml shape_rectangle.xml shape_ring.xml shape_line.xml ring_circle.xml 如图: oval_circle.xml 注意,虽然shape="oval",且width=16dp,heigh
阅读全文
摘要:要给它设置个bounds才可以 1 TextView noticeHeaderView; 2 TextView headerRefreshText; 3 ProgressBar headerRefreshPgrsb; 4 View headerRefresh; 5 ...
阅读全文
摘要:Re-using Layouts with THIS LESSON TEACHES YOU TOCreate a Re-usable LayoutUse the TagUse the TagYOU SHOULD ALSO READLayout Resources Although Androi...
阅读全文
摘要:国际化 与字符串国际相似,在 res 下新建 drawable-zh 文件夹,存放中文环境下的图片 新建 drawable-en 作为英语环境下的图片 在 eclipse 下新建 Android 项目时,会在 res 目录下自动创建三个默认语言环境的文件夹: drawable-hdpi d...
阅读全文
摘要:1.官方文档: https://developer.android.com/guide/topics/resources/string-resource 2.格式化字符串 2.1 示例 <resources> <string name="app_name">DataBind</string> <st
阅读全文
摘要:注意Color State List Resource 与 Color不同,前者是颜色状态表.根据不同状态显示不同颜色,它是State list,里面有多种颜色,后者只是一个颜色.Color State List Resource AColorStateListis an object you...
阅读全文
摘要:State List AStateListDrawableis a drawable object defined in XML that uses a several different images to represent the same graphic, depending on the...
阅读全文
摘要:简介 Drawable Resources(可绘资源) 是一系列可以在屏幕上被绘制的资源文件,它不只是图片,可以是 xml文件,在xml文件中配置各种绘制参数.常见Drawable ResourceBitmap File位图文件(.png,.jpg, or.gif),不是xmlNine-Patch...
阅读全文