protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.cloud_browser); SupportActionBar.SetTitle(Resource.String.move_to); R = new cloud_browser(this); fileSystem = Globals.CloudManager.PersonalClouds[0].RootFS; RootPath = Intent.GetStringExtra(ExtraRootPath); if (string.IsNullOrEmpty(RootPath)) { throw new InvalidOperationException("Internal error: IO operation root not provided."); } RootPath = RootPath.TrimEnd(Path.AltDirectorySeparatorChar); workingPath = RootPath; adapter = new FlexibleAdapter(null, this); adapter.SetAnimationOnForwardScrolling(true); layoutManager = new SmoothScrollLinearLayoutManager(this); R.list_recycler.SetLayoutManager(layoutManager); R.list_recycler.SetAdapter(adapter); R.list_recycler.AddItemDecoration(new FlexibleItemDecoration(this).WithDefaultDivider()); R.list_reloader.SetColorSchemeResources(Resource.Color.colorAccent); R.list_reloader.Refresh += RefreshDirectory; EmptyViewHelper.Create(adapter, R.list_empty); RefreshDirectory(this, EventArgs.Empty); }
protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.cloud_browser); SupportActionBar.Title = GetString(Resource.String.choose_photos_backup_location); R = new cloud_browser(this); FileSystem = Globals.CloudManager.PersonalClouds[0].RootFS; if (FileSystem == null) { throw new InvalidOperationException("Internal error: RootFileSystem or CurrentDevice is null."); } WorkingPath = "/"; adapter = new FlexibleAdapter(null, this); adapter.SetAnimationOnForwardScrolling(true); layoutManager = new SmoothScrollLinearLayoutManager(this); R.list_recycler.SetLayoutManager(layoutManager); R.list_recycler.SetAdapter(adapter); R.list_recycler.AddItemDecoration(new FlexibleItemDecoration(this).WithDefaultDivider()); R.list_reloader.SetColorSchemeResources(Resource.Color.colorAccent); R.list_reloader.Refresh += RefreshDirectory; EmptyViewHelper.Create(adapter, R.list_empty); RefreshDirectory(this, EventArgs.Empty); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.cloud_browser); R = new cloud_browser(this); SupportActionBar.SetTitle(Resource.String.select_file_to_upload); adapter = new FlexibleAdapter(null, this); adapter.SetAnimationOnForwardScrolling(true); layoutManager = new SmoothScrollLinearLayoutManager(this); R.list_recycler.SetLayoutManager(layoutManager); R.list_recycler.SetAdapter(adapter); R.list_recycler.AddItemDecoration(new FlexibleItemDecoration(this).WithDefaultDivider()); R.list_reloader.SetColorSchemeResources(Resource.Color.colorAccent); R.list_reloader.Refresh += RefreshDirectory; EmptyViewHelper.Create(adapter, R.list_empty); directory = new DirectoryInfo(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath); RefreshDirectory(this, EventArgs.Empty); }