所不同的@ + ID / Android的:清单和@ ID / Android的:清单? [英] What is different between @+id/android:list and @id/android:list?

查看:118
本文介绍了所不同的@ + ID / Android的:清单和@ ID / Android的:清单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发Android应用程序,以及一个问题。

I've develop android application, and one question.

如你所知,当我们使用LiveActivity,我们必须指定@ ID / Android的:清单ListView控件ID

As you know, When we use LiveActivity, we must specify @id/android:list for ListView ID.

不过,当我使用@ + ID / Android的:清单代替@ ID / Android的:列表中,这是工作的罚款

But, When I use @+id/android:list instead of @id/android:list, it is working fine.

什么之间@不同的是+ ID / Android的:清单和@ ID / Android的:清单??

What is different between @+id/android:list and @id/android:list ??

推荐答案

的根本区别@ @ + @ + 的信号,你需要添加一个新的ID,在 @ 本身告诉编译器寻找一个现有ID。

The fundamental difference between @ and @+ is that @+ is signaling that you need to add a new id, the @ by itself tells the compiler to look for an existing id.

这篇关于所不同的@ + ID / Android的:清单和@ ID / Android的:清单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆