false在android ids.xml文件中的含义是什么

false在android ids.xml文件中的含义是什么,android,Android,我注意到,在一些android应用程序的res/value文件夹中,存在一个ids.xml文件,其中某些项的值为false 虚假意味着什么? 谁能告诉我,谢谢 您可以参考以下内容,这里对所有内容都进行了精彩的解释: 我相信您在反编译apk文件时会看到这些。经过一番尝试和错误,我发现false实际上没有任何作用。您可以将任何内容替换为布尔值 那么为什么会出现虚假呢?根据我的实验,如果在我编译apk之后在项目中创建一个文件ids.xml,那么在编译的ids.xml中我会看到与我在项目ids.xml中

我注意到,在一些android应用程序的res/value文件夹中,存在一个ids.xml文件,其中某些项的值为false 虚假意味着什么?
谁能告诉我,谢谢

您可以参考以下内容,这里对所有内容都进行了精彩的解释:


我相信您在反编译apk文件时会看到这些。经过一番尝试和错误,我发现
false
实际上没有任何作用。您可以将任何内容替换为布尔值

那么为什么会出现虚假呢?根据我的实验,如果在我编译apk之后在项目中创建一个文件ids.xml,那么在编译的ids.xml中我会看到与我在项目ids.xml中看到的完全相同的行。但是,如果我不将id放入ids.xml并使用
@+id/myId
创建它,我将在编译的ids.xml中看到一个标记,其值为
false
。我希望它能回答你的问题

我的ID.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="test_id" type="id"/>
    <item name="test_id2" type="id">false</item>
    <item name="test_id3" type="id">This is a test String</item>
    <item name="test_id4" type="id">749274927492</item>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item type="id" name="test_id" />
    <item type="id" name="test_id2">false</item>
    <item type="id" name="test_id3">This is a test String</item>
    <item type="id" name="test_id4">1950617988</item>
    <item type="id" name="myId">false</item>
    <item type="id" name="action_bar_activity_content" />
    <item type="id" name="action_menu_divider" />
    <item type="id" name="action_menu_presenter" />
    <item type="id" name="action_bar_root">false</item>
    <item type="id" name="action_bar_container">false</item>
    <item type="id" name="action_bar">false</item>
    <item type="id" name="action_context_bar">false</item>
    <item type="id" name="split_action_bar">false</item>
    ....
</resources>

假的
这是一个测试字符串
749274927492
在我的版面中

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

生成的ids.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="test_id" type="id"/>
    <item name="test_id2" type="id">false</item>
    <item name="test_id3" type="id">This is a test String</item>
    <item name="test_id4" type="id">749274927492</item>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item type="id" name="test_id" />
    <item type="id" name="test_id2">false</item>
    <item type="id" name="test_id3">This is a test String</item>
    <item type="id" name="test_id4">1950617988</item>
    <item type="id" name="myId">false</item>
    <item type="id" name="action_bar_activity_content" />
    <item type="id" name="action_menu_divider" />
    <item type="id" name="action_menu_presenter" />
    <item type="id" name="action_bar_root">false</item>
    <item type="id" name="action_bar_container">false</item>
    <item type="id" name="action_bar">false</item>
    <item type="id" name="action_context_bar">false</item>
    <item type="id" name="split_action_bar">false</item>
    ....
</resources>

假的
这是一个测试字符串
1950617988
假的
假的
假的
假的
假的
假的
....

thans,我检查了该页面,但仍然没有解释节点值“false”代表的是什么,因为它帮助我定义了额外的ID,而不是在布局中使用UI小部件定义,但没有给出问题的答案。您在反编译apk文件时对
的理解是正确的
^^