Android examples for User Interface:Layout
create View from layout id
//package com.java2s; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; public class Main { public static View createView(Context context, int layoutId) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Activity.LAYOUT_INFLATER_SERVICE); return inflater.inflate(layoutId, null, false); }/*from w w w . j a va2 s . com*/ }