如何Android的布局膨胀机制片段工作? [英] how android layout inflate mechanism working in fragment?

查看:116
本文介绍了如何Android的布局膨胀机制片段工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个关于Android初学者。在过去的6个月,我一直在使用下面的code,显示在列表视图,片段中的布局,并添加自定义标题。

I am a beginner about android. For the past 6 months, I have been using the following code to display the layout in listview, fragment and add custom header.

(ViewGroup) inflater.inflate(layout,view, false);

LayoutInflater.from(getActivity()).inflate(layout, null);

但我不明白的功能,以及它所描述,以及它是如何工作的。敬请解释这些,如果你知道。对不起,我的英语不好。

But i do not understand the functionality, and what it describes, and how it is working. Please kindly explain those if you know. Sorry for my bad English.

推荐答案

我会强烈建议阅读这篇文章

I will strongly recommend reading this article


,因为它太大意思,并涵盖了基本的东西,也有一些常见的错误。


as it is veryinteresting and covers basic stuff and also some common mistakes.

这篇关于如何Android的布局膨胀机制片段工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆