Example #1
0
        public  void BtnGeneralFragmentClick()
        {
            
            ArtikelGeneralFragment fragment =  new ArtikelGeneralFragment(Resource.Layout.FrgArtikelGeneral, _mainActivity ,  _stateClass._artikel);

            _mainActivity.FragmentManager 
                .BeginTransaction()
                .SetCustomAnimations (Android.Resource.Animator.FadeIn,Android.Resource.Animator.FadeOut)
                .Replace(Resource.Id.frameContent, fragment)
                .AddToBackStack (null)
                .Commit();

            if (_stateClass._artikel == null)
                return;

            // Configure the buttons
            if (MainActivity.User.NetworkStatus == DataAccessLayer.NetworkState.Disconnected)
                ConfigureButtons(false, false, false, false, false);
            else
                ConfigureButtons(false, false, false, false, false);

        }
Example #2
0
        public void Restore(MainActivity mainActivity)
        {
            // First assign the new mainActivity
            _mainActivity = mainActivity;

            // Then we have to get reference to the new controls
            _btnNew = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnNew);
            _btnEdit = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnEdit);
            _btnSave = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnSave);
            _btnDelete = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnDelete);
            _btnOffline = _mainActivity.FindViewById<ImageButton>(Resource.Id.btnOffline);

            ArtikelGeneralFragment fragment = new ArtikelGeneralFragment(Resource.Layout.FrgArtikelGeneral, _mainActivity ,_stateClass._artikel);

            _mainActivity.FragmentManager 
                .BeginTransaction()
                .SetCustomAnimations (Android.Resource.Animator.FadeIn,Android.Resource.Animator.FadeOut)
                .Replace(Resource.Id.frameContent, fragment)
                .AddToBackStack (null)
                .Commit();

        }