获得LayoutInflater实例的三种方式

来源:互联网 发布:淘宝客服工作流程表 编辑:程序博客网 时间:2024/05/18 21:50

1.LayoutInflater inflater = getLayoutInflater();  //调用Activity的getLayoutInflater()

2.LayoutInflater localinflater =(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

3. LayoutInflater inflater = LayoutInflater.from(context); 

原创粉丝点击