LayOut Inflater in android?
<p>I create a subclass of View as an inner class in my Activity. I just want to inflate an xml into the class which extending view. Can anyone provide some code/syntax of both class and xml?</p>

<pre><code>public class drawiact extends Activity {

       DrawView drawView;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
        drawView = new DrawView(this, null);
         setContentView(drawView);


    }
    public class DrawView extends View implements OnTouchListener {
        Path path;
        Paint paint = new Paint();
        private ShapeDrawable mDrawable;
        private ArrayList&lt;Path&gt; graphics = new 
        public DrawView(Context context,AttributeSet attrs) {
            super(context,attrs);
            //I want to load the contents of an xml in this class
    //
  }

}
</code></pre>

<p>xml is</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res/com.drawing"
        android:orientation="vertical"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"&gt;

 &lt;Button android:id="@+id/Button02" 
    android:layout_width="wrap_content" 
    android:layout_height="200dip"

     android:layout_gravity="right"&gt;&lt;/Button&gt;
&lt;/LinearLayout&gt;
</code></pre>
