예제 #1
0
        protected override async void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            await _onCreateLock.WaitAsync();

            SetContentView(Resource.Layout.activityMain);
            _preferences = new PreferenceWrapper(this);

            _authCache       = new ListCache <WearAuthenticator>(AuthenticatorCacheName, this);
            _categoryCache   = new ListCache <WearCategory>(CategoryCacheName, this);
            _customIconCache = new CustomIconCache(this);

            await _authCache.Init();

            await _categoryCache.Init();

            var defaultCategory = _preferences.DefaultCategory;

            _authView = new AuthenticatorView(_authCache, defaultCategory, _preferences.SortMode);

            RunOnUiThread(delegate
            {
                InitViews();

                if (!_authCache.GetItems().Any())
                {
                    _onCreateLock.Release();
                    return;
                }

                AnimUtil.FadeOutView(_circularProgressLayout, AnimUtil.LengthShort, false, delegate
                {
                    CheckEmptyState();
                    _onCreateLock.Release();
                });
            });
        }
 public AuthenticatorListAdapter(AuthenticatorView authView, CustomIconCache customIconCache)
 {
     _authView        = authView;
     _customIconCache = customIconCache;
 }