hi grace,

thanks for your comment. i have found the solution.
this is how you should do it

public class Draw extends Activity {

        @Override
        protected void onCreate(Bundle savedInstanceState) {
                // TODO Auto-generated method stub
                final Context context = getApplicationContext();
                super.onCreate(savedInstanceState);
                RelativeLayout relative = new RelativeLayout(this);
                RelativeLayout.LayoutParams answerAlign = new
RelativeLayout.LayoutParams(
                                RelativeLayout.LayoutParams.WRAP_CONTENT,
                                RelativeLayout.LayoutParams.WRAP_CONTENT);
                final Button answer = new Button(this);
                answer.setText("Answer");
        
answerAlign.addRule(android.widget.RelativeLayout.ALIGN_PARENT_BOTTOM);
                relative.addView(answer, answerAlign);

                answer.setOnClickListener(new OnClickListener() {

                        @Override
                        public void onClick(View v) {
                                // TODO Auto-generated method stub
                                // context.startService(new Intent(context, 
AnswerCall.class));
                                telephony(true);
                        }
                });

                        relative.addView(new DrawView(this);
                setContentView(relative);
        }

   public class DrawView extends View {

        public DrawView(Context context) {
      }
   }
}

so the buttons will appear on top of the View

regards,
Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to