findViewById () retorna nulo quando eu chamo onCreate ()

Estou tendo um problema com o findViewById no meu primeiro aplicativo para Android. Estou tentando chamar essa função, mas sempre retorne nulo.

Meu aplicativo tem 2 atividades. Na segunda atividade (activity_display_message), tenho este código:

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

    if (savedInstanceState == null) {
        getSupportFragmentManager().beginTransaction()
                .add(R.id.container, new PlaceholderFragment())
                .commit();
    }

    //Obtener el mensaje desde el intent en MainActivity
    Intent intent = getIntent();
    String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);

    //Buscar el textview en la vista
    TextView textView = (TextView) findViewById(R.id.texto);
    textView.setText(message);
}

E este é o fragment_display_message.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.example.app.DisplayMessageActivity$PlaceholderFragment">

<TextView
    android:id="@+id/texto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

Não sei por que retornar NULL e gerar umNullPointerException&nbsp;quando tento fazer umasetText(). Estou chamando o ID correto e declarando-o no XML também. E eu estou chamando osetContextView()&nbsp;noonCreate().

Desculpe se esta pergunta é muito óbvia (acho que estou ignorando algo óbvio), mas sou novo no desenvolvimento do Android.

EDIT: erro de logcat:

02-10 10:25:58.960    1031-1031/com.example.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.app, PID: 1031
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/com.example.app.DisplayMessageActivity}: java.lang.NullPointerException
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
        at android.app.ActivityThread.access$800(ActivityThread.java:135)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5017)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
        at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.NullPointerException
        at com.example.app.DisplayMessageActivity.onCreate(DisplayMessageActivity.java:35)
        at android.app.Activity.performCreate(Activity.java:5231)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Editar:

Problema resolvido. Só precisa mover o código deonCreate()&nbsp;paraonCreateView()&nbsp;e edite as referências.

onCreate()&nbsp;será o padrão.

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

    if (savedInstanceState == null) {
        getSupportFragmentManager().beginTransaction()
                .add(R.id.container, new PlaceholderFragment())
                .commit();
    }
}

E aonCreateView()&nbsp;emPlaceholderFragment:

        @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_display_message, container, false);

        //Obtener el mensaje desde el intent en MainActivity
        Intent intent = getActivity().getIntent();
        String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);

        //Buscar el textview en la vista
        TextView textView = (TextView) rootView.findViewById(R.id.texto);
        textView.setText(message);

        return rootView;
    }