Inflator in Android Application Development

前端 未结 4 1603
自闭症患者
自闭症患者 2021-02-14 14:10

Can anybody please tell What Inflator is and how it is being used in an Android application?

I don\'t know the exact use of it and Why it is being used.

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-14 15:00

    layout inflator is used to return a java object of your complete layout

    suppose you have a layout xml file in which the root element is relative layout and it contains a imageview and textview then using layout inflator you can return a view object that refers to entire layout.

    this basically is used in list view and grid view to plug into them a layout object of single row or element which is to be repeated.

提交回复
热议问题