Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.view.View;
import android.view.ViewGroup;

public class Main {
    public static void injectViewInLayout(ViewGroup viewGroup, int id) {
        View view = View.inflate(viewGroup.getContext(), id, null);
        view.setId(id);
        viewGroup.addView(view);
    }
}