开发者

what`s the difference between reference directly and using inflate

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜