can we use layout in Customview?
<p>friends,</p>

<p>i have a custom view class</p>

<pre><code>public class Zoom extends View {
        private Drawable image;
        private int zoomControler=20; 
        public Zoom(Context context)
        {
            super(context);
            image=context.getResources().getDrawable(R.drawable.icon);
            setFocusable(true);

        }
        @Override
        protected void onDraw(Canvas canvas) {

            super.onDraw(canvas);

            //TransparentPanel tp = new TransparentPanel(this.getContext());

            //Button MyButton = new Button(this.getContext());
            //MyButton.setText("Press me");

            //tp.addView(MyButton);

            image.setBounds((getWidth()/2)-zoomControler, (getHeight()/2)-zoomControler, (getWidth()/2)+zoomControler, (getHeight()/2)+zoomControler);
            image.draw(canvas);




        }

}
</code></pre>

<p>can i use SetContentView(R.layout.mylayout) in this custom view  to display that design?</p>

<p>or </p>

<p>how can i display button with image ondraw method as i have commented the code ?</p>

<p>any help would be appreciated.</p>
