Issue in LayoutInflater: No output is displayed, and the app crashes-Collection of common programming errors
In my application, I have created a folder and wrote text files into it. Now, I need to display them. Following is the Java code, where the main operation begins.
private class OpenFileEvent implements OnClickListener
{
@Override
public void onClick(View arg0) {
LinearLayout openFileDialogView = (LinearLayout)findViewById(R.id.open_file_dialog);
// TODO Auto-generated method stub
final Dialog openFileDialog = new Dialog(Notes.this);
openFileDialog.setTitle("Open File");
openFileDialog.setContentView(R.layout.open_dialog);
//First, list all the available Files
File folder = new File(Environment.getExternalStorageDirectory()+"/Main Notes/Notes/");
File file = new File(folder.getAbsolutePath());
File[] fileNameList = file.listFiles();
try
{
if(fileNameList != null && fileNameList.length>0)
{
for(int i=0;i