现在的位置: 首页 > 综合 > 正文

@” and “+” in the Android layout file

2013年12月08日 ⁄ 综合 ⁄ 共 396字 ⁄ 字号 评论关闭
<?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.

抱歉!评论已关闭.