Home > Mobile >  New questions
New questions

Time:10-30

Have a big help to explain the android layout loader layoutinflater what is instantiate an XML file, why not use the findviewbyid instantiate the concrete control directly

CodePudding user response:

I also don't know, give my feeling is:
In the Activity after using the setContentView, can directly use the findviewbyid access controls, but layoutinflater generally is dynamic to load some layout file, and then get the view reference, this reference can call the findviewbyid method to obtain the control in the reference,

CodePudding user response:

Different layout inside the ID of the can, direct the findviewbyid which, or don't know whether to find another application has multiple layoutinflater, direct the findviewbyid words to find, in all the more time-consuming fee resources,,,

I guess,,,



  • Related