Ejemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.FileSelector);

            Acp.getInstance(this).request(new AcpOptions.Builder()
                                          .SetPermissions(Permission.WriteExternalStorage, Permission.ReadExternalStorage)
                                          .Build(), new AnonymousAcpListener(ps => Toast.MakeText(this, $"权限拒绝", ToastLength.Short).Show(), InitListView));

            var sureBtn = FindViewById <TextView>(Resource.Id.FolderSelector_btSure);

            sureBtn.Click += (s, e) => SureSelect();

            var cancelBtn = FindViewById <TextView>(Resource.Id.FolderSelector_btCancel);

            cancelBtn.Click += (s, e) => CancelSelect();

            var backBtn = FindViewById(Resource.Id.FolderSelector_Back);

            backBtn.Click += (s, e) => AdapterBackUp();

            OnCancelRequested += HandleCancelSelect;

            InitListView();
        }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.FileExpleror);

            OnCreateStart?.Invoke(this);

            Acp.getInstance(this).request(new AcpOptions.Builder()
                                          .SetPermissions(Permission.WriteExternalStorage, Permission.ReadExternalStorage)
                                          .Build(), new AnonymousAcpListener(ps => Toast.MakeText(this, $"权限拒绝", ToastLength.Short).Show(), InitListView));

            var backUpBtn = FindViewById(Resource.Id.FileExpleror_BackUp);

            backUpBtn.SetOnClickListener(new AnonymousOnClickListener(BackUpClick));

            var moreBtn = FindViewById(Resource.Id.FileExpleror_Menu);

            moreBtn.SetOnClickListener(new AnonymousOnClickListener(MoreClick));

            var closeBtn = FindViewById(Resource.Id.FileExpleror_Close);

            closeBtn.SetOnClickListener(new AnonymousOnClickListener(CloseClick));

            InitListView();
        }