There are several different ways to determine an identifier. What is the difference?

There are several different ways to determine an identifier:

android:id="@id/android:list"
android:id="@+id/android:list"
android:id="@+id/confirm" 

What is the difference?

+3
source share
3 answers

android: id = "@ id / android: list" refers to android.R.id.list. android.R contains resources that are platform related. There are many of these standard resources, they are all listed in the JavaDoc .

@+ , android: id = "@+ id/confirm" R- , .. R.id.confirm. s > a > Dev.

, android: id = "@+ id/android: list", , .

+4

+ id/label , id = label . , android.jar, , , android: id = "@android: id/list", , id value = list android .

. : http://groups.google.com/group/android-developers/browse_thread/thread/dc8023b221351aa7

+1

"+" means add it to your current R.java project. Those who have no pluses are resources inherited from the framework.

0
source

Source: https://habr.com/ru/post/1739416/


All Articles