Inflator in Android Application Development

前端 未结 4 1913
不知归路
不知归路 2021-02-14 14:30

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 14:46

    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.

提交回复
热议问题