List of usage examples for android.view LayoutInflater from
public static LayoutInflater from(Context context)
From source file:Main.java
public static View getInflateView(Context context, int layoutID) { return LayoutInflater.from(context).inflate(layoutID, null, false); }
From source file:Main.java
public static View create(Context context, int layout) { return LayoutInflater.from(context).inflate(layout, null); }
From source file:Main.java
public static View getView(Context context, int id, ViewGroup viewGroup) { return LayoutInflater.from(context).inflate(id, viewGroup); }
From source file:Main.java
public static final View inflate(final Context pContext, final int pLayoutID) { return LayoutInflater.from(pContext).inflate(pLayoutID, null); }
From source file:Main.java
public static View inflateLayout(Context context, int id, ViewGroup view) { LayoutInflater inflate = LayoutInflater.from(context); View result = inflate.inflate(id, view); return result; }
From source file:Main.java
public static View inflate(Context context, int res) { if (inflater == null) { inflater = LayoutInflater.from(context); }//from w ww.java2 s. c o m return inflater.inflate(res, null); }
From source file:Main.java
public static void toastShow(String paramString, Context paramContext) { View localView = LayoutInflater.from(paramContext).inflate(getLayoutId(paramContext, "xdw_toast_item"), null);// www . j a v a2 s . co m Toast localToast = new Toast(paramContext); localToast.setView(localView); localToast.setGravity(17, 0, 0); ((TextView) localView.findViewById(getResId(paramContext, "xdw_toast_mes"))).setText(paramString); localToast.show(); }
From source file:Main.java
public static View infalte(Context context, @LayoutRes int layoutId, ViewGroup parent) { return LayoutInflater.from(context).inflate(layoutId, parent, false); }
From source file:Main.java
public static View getView(Context context, int resourceId) { LayoutInflater inflater = LayoutInflater.from(context); if (resourceId != INVALID) { return inflater.inflate(resourceId, null); }/* www . jav a2 s. com*/ return null; }
From source file:Main.java
public static void setView(Activity activity, int id) { LayoutInflater layoutInflater = LayoutInflater.from(activity); setTranslucentStatus(activity);//from w ww . j a va 2s .co m ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView().findViewById(android.R.id.content); int height = getStatusBarHeight(activity); ViewGroup linearLayout = (ViewGroup) layoutInflater.from(activity).inflate(id, null); linearLayout.setPadding(0, height, 0, 0); decorView.removeAllViews(); decorView.addView(linearLayout); }