Java tutorial
//package com.java2s; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class Main { public static View inflater(LayoutInflater inflater, int layoutId) { return inflater.inflate(layoutId, null); } public static View inflater(LayoutInflater inflater, int layoutId, ViewGroup container) { return inflater.inflate(layoutId, container); } public static View inflater(Context context, int layoutId) { return LayoutInflater.from(context).inflate(layoutId, null); } public static View inflater(Context context, int layoutId, ViewGroup container) { return LayoutInflater.from(context).inflate(layoutId, container); } }