onCreate in new Activity can not display
<p>I open a NewActivity in MainActivity. It can run very well. But there is no layout in NewActivity. It just shows white. I do not know why.</p>

<p>I write the layout in R.layout.activity_first.</p>

<p>MainActivity.java</p>

<pre><code>package com.example.hello_2;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button button=(Button)this.findViewById(R.id.button1);
        button.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                Intent intent=new Intent(MainActivity.this,NewActivity.class);
                startActivity(intent);
            }
        });
    }

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

 }
</code></pre>

<p>NewActivity.java</p>

<pre><code>package com.example.hello_2;

import com.example.hello_2.NewActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.SubMenu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class NewActivity extends Activity{
    protected void onCreat(Bundle savedInstanceState1){
        super.onCreate(savedInstanceState1);
        setContentView(R.layout.activity_first);
        Log.d("NewActivity", "onCreat");
        }
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        return super.onCreateOptionsMenu(menu);
    }

}
</code></pre>
