开发者

what`s the difference between reference directly and using inflate

开发者 https://www.devze.com 2023-02-19 04:54 出处:网络
when i want to get a view object delared in xml,usually i have two method.R.id.view and inflate the view,so what`s the deference betwee开发者_JS百科n them.

when i want to get a view object delared in xml,usually i have two method.R.id.view and inflate the view,so what`s the deference betwee开发者_JS百科n them. thanks in advance,i am a newbie.


When you do setContentView() your layout is inflated implicitly with all the views mentioned in the respected xml. When you inflate the view manually you do pretty the same, but explicitly. The difference is only in code you write.

0

精彩评论

暂无评论...
验证码 换一张
取 消