コード例 #1
0
        private void UpdateListView(string filePath)
        {
            path = filePath;
            files.Clear();
            var dir = new File(filePath);

            if (dir.CanRead())
            {
                files.AddRange(dir.List().Select(file => Path.Combine(filePath, file)));
            }
            if (ListView.Adapter == null)
            {
                adapter          = new FileAdapter(files);
                ListView.Adapter = adapter;
            }
            else
            {
                adapter.NotifyDataSetChanged();
            }
        }