/// <summary> /// Reads files in project folder and displays them on the list. /// </summary> private void FillFilesList() { // Get all file names in project folder var projectDir = new Java.IO.File(MainActivity.ApplicationFolderPath); List <string> fileNames = new List <string>(); string[] fileArray = projectDir.List(); if (fileArray != null) { fileNames = fileArray.ToList(); fileNames.Remove("settings"); // Sort files by date fileNames.Sort(new FileComparer()); } // Display on list mAdapter = new ListAdapter(this, fileNames); mLvFiles.Adapter = mAdapter; }
/// <summary> /// Fills the raw data list. /// </summary> private void FillRawDataList() { var projectDir = new Java.IO.File(MainActivity.ApplicationFolderPath + Java.IO.File.Separator + mFilename); List <string> fileNames = new List <string>(); string[] fileArray = projectDir.List(); for (int i = 0; i < fileArray.Length; i++) { fileArray[i] = fileArray[i].Replace(".csv", ""); } if (fileArray != null) { fileNames = fileArray.ToList(); } mAdapter = new ListAdapter(this, fileNames); }