발견 discovery

안드로이드 (Android) - @+id ...

s740ag 2017. 2. 20. 20:25

<?xml version="1.0" encoding="utf-8"?>

<ViewGroup

    xmlns:android="http://schemas.android.com/apk/res/android"

    android:id="@[+][package:]id/resource_name"

    android:layout_height=["dimension" | "match_parent" | "wrap_content"]

...





android:id


Resource ID. A unique resource name for the element, which you can use to obtain a reference to the ViewGroup from your application

리소스 ID. 당신이 당신의 어플의 뷰그룹 참조를 위해 사용하는, 엘리먼트를 위한 고유의 리소스 이름


For the ID value, you should usually use this syntax form: "@+id/name". The plus symbol, +, indicates that this is a new resource ID and the aapt tool will create a new resource integer in the R.java class, if it doesn't already exist

ID의 값을 위해, 당신은 대개 @+id/name 문법을 사용했을 것이다. 플러스 심볼, +, 이것은 새로운 리소스 ID를 가리킨다. 그리고 aapt 툴이 R.java 클래스에서 새로운 리소스 정수를 만들 것이다, 이미 존재하는 ID가 없다면


However, if you have already defined an ID resource (and it is not already used), then you can apply that ID to a View element by excluding the plus symbol in the android:id value

그러나, 당신이 이미 정의한 리소스 ID를 갖고 있다면 (그리고 그것이 이미 사용되지 않는 것이라면), 그때 당신은 뷰 엘리먼트에 플러스 심볼을 제외한 android:id 값으로 ID를 공급할 수 있다





@+id / @id / @android:id


1. @+id : 새로 추가 (+) 하는 리소스 ID

- 다른 액티비티와 동일한 아이디 생성 가능

- ex) @+id/test를 A.xml, B.xml에서 동시 사용 가능


2. @id : 이미 추가되어 있는 리소스 ID를 가리킴


3. @android:id : 안드로이드에 예약되어 있는 리소스 ID





자세한 내용은

https://developer.android.com/guide/topics/resources/layout-resource.html#idvalue

http://blog.daum.net/_blog/BlogTypeView.do?blogid=0fsaV&articleno=28&categoryId=15&regdt=20160203000947


























손정보 손링크 손어플  - 새로운 블로그, 오늘은


오늘은 추천 페이지 건너뛰기

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.


000.

000.

K팝스타 이승훈 공연 모음 - TOP 10이 되기 전까지의 공연들

Men's Merit and Demerit Guide


우리가 몰랐던 철학자 피카소의 비밀 7

괜찮은 무의식 심리테스트 - 2013년


사진작가 - NOTsoNOISY Guillaume Reymond

스코틀랜드 속담 - 삶의 지혜


신기한 사이트 모음

인생에 관한 재미있는 공식


오십이 넘어야 이해되는 말 18가지

평범한 그룹이 천재성을 넘어서는 비결


000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.

000.


000.

000.

오늘은 블로그를 방문해 주셔서 감사합니다.

오늘은 블로그 (http://www.s740abcdefg.com/)는, PC에서 더 많은 기능과 정보를 제공합니다. 감사합니다.