@" and "+" in the Android layout file

来源:互联网 发布:p双眼皮的软件 编辑:程序博客网 时间:2024/06/06 02:18
<?xml version="1.0" encoding="utf-8"?><TextView android:id="@+id/text1"    xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="wrap_content"    android:layout_height="wrap_content"/>


The @ symbol means that the XML parser should parse and expand the rest of the id string and use an ID resource.

The + after the @ in the id string indicates that the id should be automatically created as a resource if it does not already exist.

原创粉丝点击