TextView:

1.textView.setText();参数如果直接传int类型,ide不会显示错误。但是运行会报错。

布局渲染:

1.

<View
android:background="#E5E5E5"
android:layout_width="match_parent"
android:layout_height="1dp"/>
划一条横线的时候记得View要大写。否则报错。 2.在studio中定义drawable资源及获取方法:
<string-array name="actions_images">
<item>@drawable/pencil1</item>
<item>@drawable/pencil2</item>
<item>@drawable/pencil3</item>
<item>@drawable/pencil4</item>
<item>@drawable/pencil5</item>
<item>@drawable/pencil6</item>
</string-array>

获取方法:

TypedArray ar = context.getResources().obtainTypedArray(R.array.actions_images);
int len = ar.length();
int[] resIds = new int[len];
for (int i = 0; i < len; i++)
resIds[i] = ar.getResourceId(i, 0); ar.recycle();

不能够定义为Integer。这样获取不到。

最新文章

  1. Device.js – 快速检测平台、操作系统和方向信息
  2. SqlSever基础 rtrim函数 除去字符串的右边的空格,左边中间的不管
  3. linux初学 :linux 常用命令(一)
  4. android Button 切换背景,实现动态按钮和按钮颜色渐变
  5. 【转载】svn代码回滚命令
  6. .net的 async 和 await
  7. 类linux系统/proc/sysrq-trigger文件功能作用
  8. 网络资源(7) - JAX-WS视频
  9. oracle存储过程+游标处理select数据
  10. 字符串匹配&mdash;KMP 扩展KMP Manacher
  11. js 获取上传视频的时长、大小、后缀名
  12. POI操作excle
  13. python作业练习
  14. shell脚本学习-循环
  15. Java JDK与JRE
  16. MySQL触发器trigger的使用
  17. Misunderstood-Missing-逆向DP
  18. php三级联动(html,php两个页面)
  19. 定时器QTimer
  20. what&#39;s the python之变量、基本数据类型

热门文章

  1. JS - this 总结
  2. NOIP2016提高A组模拟9.17总结
  3. mybatis——mybatis打印sql 接口工作原理
  4. MongoDB操作:flush()
  5. 容器适配器————stack
  6. c++函数相关
  7. ASP.NET中调用百度地图API
  8. nodejs 文件操作
  9. C#的keyValue
  10. qemu-kvm: unable to map backing store for guest RAM: Cannot allocate memory