get View via LayoutInflater - Android User Interface

Android examples for User Interface:Layout

Description

get View via LayoutInflater

Demo Code


//package com.java2s;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

public class Main {
    public static View getView(Context context, int resId) {
        return LayoutInflater.from(context).inflate(resId, null);
    }//www  . j  a v a  2  s  .co m
}

Related Tutorials