I need to set a listener to a button defined in another xml. How do I do that? I tried this but it gives me RunTimeException.

```
super.onCreate(savedInstanceState);
setContentView(R.layout.leavestatus_info_activity);
cancel_leave_button = (Button)findViewById(R.layout.leave_status_reason).findViewById(R.id.cancel_leave);

```

Here is my logcat:

```
03-12 11:36:19.125: E/AndroidRuntime(689): FATAL EXCEPTION: main
03-12 11:36:19.125: E/AndroidRuntime(689): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.empover.hrms.activity/com.empover.hrms.activity.LeaveStatusInfoActivity}: java.lang.NullPointerException
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.os.Looper.loop(Looper.java:123)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.app.ActivityThread.main(ActivityThread.java:4627)
03-12 11:36:19.125: E/AndroidRuntime(689):  at java.lang.reflect.Method.invokeNative(Native Method)
03-12 11:36:19.125: E/AndroidRuntime(689):  at java.lang.reflect.Method.invoke(Method.java:521)
03-12 11:36:19.125: E/AndroidRuntime(689):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-12 11:36:19.125: E/AndroidRuntime(689):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-12 11:36:19.125: E/AndroidRuntime(689):  at dalvik.system.NativeStart.main(Native Method)
03-12 11:36:19.125: E/AndroidRuntime(689): Caused by: java.lang.NullPointerException
03-12 11:36:19.125: E/AndroidRuntime(689):  at com.empover.hrms.activity.LeaveStatusInfoActivity.onCreate(LeaveStatusInfoActivity.java:61)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-12 11:36:19.125: E/AndroidRuntime(689):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-12 11:36:19.125: E/AndroidRuntime(689):  ... 11 more

```