package com.example.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;

public class MainActivity extends Activity {
	private final int WRAP_CONTENT = ViewGroup.LayoutParams.WRAP_CONTENT;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	protected void onCreate1(Bundle icicle) {
		super.onCreate(icicle);

		LinearLayout linearLayout = new LinearLayout(this);
		linearLayout.setOrientation(LinearLayout.VERTICAL);
		setContentView(linearLayout);

		Button button1 = new Button(this);
		button1.setText("Yes");
		linearLayout.addView(button1, new LinearLayout.LayoutParams(
				WRAP_CONTENT, WRAP_CONTENT));

		Button button2 = new Button(this);
		button2.setText("No");
		linearLayout.addView(button2, new LinearLayout.LayoutParams(
				WRAP_CONTENT, WRAP_CONTENT));
	}

}
