@@ -0,0 +1,1907 @@
+package com.Rahat.myEditor;%0A%0Aimport java.io.File;%0A%0Aimport android.app.Activity;%0Aimport android.app.ListActivity;%0Aimport android.content.Intent;%0Aimport android.os.Bundle;%0Aimport android.os.Environment;%0Aimport android.view.Menu;%0Aimport android.view.MenuItem;%0Aimport android.view.View;%0Aimport android.widget.AdapterView;%0Aimport android.widget.AdapterView.OnItemClickListener;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.ListView;%0A%0Apublic class FileListActivity extends ListActivity %7B%0A%0A%09String%5B%5D fileNames;%0A%09File%5B%5D allFiles;%0A%09%0A%09@Override%0A%09protected void onCreate(Bundle savedInstanceState) %7B%0A%09%09super.onCreate(savedInstanceState);%0A%09%09//setContentView(R.layout.activity_file_list);%0A%09%09File root = Environment.getExternalStorageDirectory();%0A        File dir = new File(root.getAbsolutePath() + %22/%22+MainActivity.storageFolderName);%0A        if(!dir.exists())%7B%0A        %09dir.mkdirs();%0A        %7D%0A        %0A        allFiles=dir.listFiles();%0A        fileNames=new String%5BallFiles.length%5D;%0A        %0A        for(int i=0;i%3CallFiles.length;i++)%7B%0A        %09fileNames%5Bi%5D=allFiles%5Bi%5D.getName();%0A        %7D%0A%09%09// Binding resources Array to ListAdapter%0A        if(fileNames.length!=0)%7B%0A        %09this.setListAdapter(new ArrayAdapter%3CString%3E(this, R.layout.activity_file_list, R.id.nameLabel, fileNames));%0A        %7D%0A%09%09%0A        ListView listView=getListView();%0A        listView.setOnItemClickListener(new OnItemClickListener() %7B%0A%0A%09%09%09@Override%0A%09%09%09public void onItemClick(AdapterView%3C?%3E parent, View view, int position,%0A%09%09%09%09%09long id) %7B%0A%09%09%09%09%0A%09%09%09%09Intent resultIntent = new Intent();%0A%09%09%09%09resultIntent.putExtra(%22fileName%22, fileNames%5Bposition%5D);%0A%09%09%09%09setResult(Activity.RESULT_OK, resultIntent);%0A%09%09%09%09finish();%0A%09%09%09%7D%0A%09%09%7D);%0A%09%7D%0A%0A%09@Override%0A%09public boolean onCreateOptionsMenu(Menu menu) %7B%0A%09%09// Inflate the menu; this adds items to the action bar if it is present.%0A%09%09getMenuInflater().inflate(R.menu.file_list, menu);%0A%09%09return true;%0A%09%7D%0A%7D%0A

Update and rename src/com/Rahat/myEditor to src/com/Rahat/myEditor/FileListActivity.java