I have a tab activity caled "tabActivity", inside the tab activity i want a button "butDetail" at "saveImageActivity" to show a custom dialog "detail.xml". this is my code to show the dialog
public void butDetail(View v){
final Dialog dialog = new Dialog(saveImageActivity.this);
dialog.setContentView(R.layout.detail);
dialog.setTitle("Detail Image");
TextView filepath = (TextView)findViewById(R.id.txtfilepath);
TextView resolution = (TextView)findViewById(R.id.txtresolution);
filepath.setText("File Path : ");
resolution.setText("Resolution : ");
dialog.setCancelable(true);
dialog.show();
}
why if i add the "filepath" and "resolution" its always give "java.lang.NullPointerException", and if i detele that two variabel the dialog is show up,,, any solution for this case??