https://stackoverflow.com/questions/12567578/what-does-the-layoutinflater-attachtoroot-parameter-mean
나중이라는 시점이 위의 stackoverflow를 참조하시면 parent.addview 이후에 붙는 것이라고 합니다. 제 생각에는 코드가 눈에 보이지는 않지만 프레임워크내 내부 로직이 존재하는거 같습니다.  getview 호출하면 view를 최종적으로 반환하니 그 다음 순서로 parent.addview(반환되는 뷰)호출이 될 거 같네요. 그런 view들이 모여서 리스트뷰를 구성하게 될 거에요~여기서 부모는 메인액티비티의 리스트뷰가 될 것 같습니다~ 

 

 

What does the LayoutInflater attachToRoot parameter mean?

The LayoutInflater.inflate documentation isn't exactly clear to me about the purpose of the attachToRoot parameter. attachToRoot: whether the inflated hierarchy should be attached to the root

stackoverflow.com

 

+ Recent posts