Why to use Inflater in listview

后端 未结 3 1202
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 22:47
  • I always had ambiguity on why we need to use inflater in android, Why are they used in ListView for custom layouts (like below)?
  • What is an Inflater ?
  • <
3条回答
  •  猫巷女王i
    2020-12-28 22:50

    I always had ambiguity on why wee need to use inflater in android, Why are they used in android ListView for a custom layout ?
    They are used to create the Views for each row.

    What is an Inflater ?
    A system service that creates a View out of an XML layout.

    In the below code i am trying to understand why Inflator is used ?
    The inflater is used to create the Views for the rows.

    What is the advantage of using Inflater ?
    Compared to what? How do you want to create the Views out of the XML layout?

提交回复
热议问题