Q:

Null Pointer Exception while implementing SeekBar Listener interface in Android

I am new to Android and have not programmed anything in last few years.
So to get myself started, I am trying out simple stuff and one of them is to implement a SeekBar and its listener. I have tried implementing the listener as a separate class as well as implementing the interface in my ActionBarActivity class itself but it results in NPE. I have been able to narrow it down to the listener not instantiating with no indication as to why.
Here is my code snippet.
Fragment_xxx.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:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.SunShineCorp.intensetorch.IntenseTorchActivity$PlaceholderFragment" >

<SeekBar
        android:id="@+id/seekBar1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_marginTop="14dp" />

</RelativeLayout>

Actual Java code
public class IntenseTorchActivity extends ActionBarActivity 
                implements SeekBar.OnSeekBarChangeListener {

private static int seekValue = 10;

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

     final SeekBar seekbar =  (SeekBar) findViewById(R.id.seekBar1);

     seekbar.setOnSeekBarChangeListener(this);

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

@Override
    public void onProgressChanged(SeekBar seekBar, int progress,
            boolean fromUser) {
       seekValue = progress;
    }

   @Override
   public void onStartTrackingTouch(SeekBar arg0) {
       // TODO Auto-generated method stub
   }

   @Override
   public void onStopTrackingTouch(SeekBar arg0) {
       // TODO Auto-generated method stub
   }

@Override
public boolean onCreateOptionsMenu(Menu menu) {

    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.intense_torch, menu);
    return true;
}

Any help or pointer is truly appreciated.

A:

Change this..
setContentView(R.layout.activity_intense_torch);

to
setContentView(R.layout.Fragment_xxx);

because SeekBar is in Fragment_xxx.xml so setContentView should refer Fragment_xxx.xml
and remove 
if (savedInstanceState == null) {
    getSupportFragmentManager().beginTransaction()
            .add(R.id.container, new PlaceholderFragment()).commit();
}

