1 @+id/xx

这个表示向资源文件中添加一个新的id。

@+id是在R文件中生成int xxx=value。

有两种情况

①R文件中不存在xxx变量,则生成int xxx=value即为控件新建一个id值

②若R文件中已存在xxx变量,则不再新建,直接引用该变量对应的id值

2 @id/xxx

引用现有的资源。

例子:

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/textView1" //请看这一行
android:text="@string/textview2" />

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/textview1" />

2 @android:id/list

只是在使用ListView的时候才规定要用@android:id/list

<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />

最新文章

  1. MVC 后台管理框架 FineUIMvc 在线示例
  2. DAC Usage4:从 Backup Package(.bacpac)还原DB
  3. SpringBoot list查询方法
  4. ajax提交Form
  5. extjs,清空treepanel数据。
  6. node.js 初体验
  7. js运动 模仿淘宝幻灯
  8. IDS 日志分析
  9. net开发过程中Bin目录net开发过程中Bin目录下面几种文件
  10. php中奖算法逻辑
  11. Linux安装解压缩版jdk
  12. Hive命令及操作
  13. RHEL系统初始化步骤
  14. 更新pip和setuptools
  15. 洛谷P2347 砝码称重 【多重背包】(方案数)(经典)
  16. 【CF884D】Boxes And Balls k叉哈夫曼树
  17. linux-centos6-rabbitmq安装及配置
  18. 学习Struts框架系列(三):声明式异常处理
  19. VS2010 单元测试,性能测试 案例
  20. 几种流行的开源WebService框架Axis1,Axis2,Xfire,CXF,JWS比较

热门文章

  1. Java中堆内存和栈内存有什么区别
  2. Python学习日记(十)—— 杂货铺(全局变量补充、Python参数传递、字符串格式化、迭代器、生成器)
  3. UVALive 5052 Genome Evolution ——(xjbg)
  4. php-fpm(绕过open_basedir,结合ssrf)
  5. Jenkins与gitlib实现自动化部署与持续构建
  6. Nginx 之 Location 的整理
  7. 转载---WCF、WPF、Silverlight和区别
  8. Flutter实现TabBarView切换页面时每个页面只initState一次
  9. delphi10.3.1不支持.net 5
  10. nginx - nginx下配置thinkphp5