Esempio n. 1
0
 private void EnsureDependables ()
 {
     if (mBehavior == null) {
         var lp = (CoordinatorLayout.LayoutParams)LayoutParameters;
         mBehavior = (AppBarLayout.Behavior)lp.Behavior;
     }
     if (xParent == null) {
         xParent = Android.Runtime.Extensions.JavaCast<CoordinatorLayout> (Parent);
     }
 }
Esempio n. 2
0
 private void EnsureDependables()
 {
     if (mBehavior == null)
     {
         var lp = (CoordinatorLayout.LayoutParams)LayoutParameters;
         mBehavior = (AppBarLayout.Behavior)lp.Behavior;
     }
     if (xParent == null)
     {
         xParent = Android.Runtime.Extensions.JavaCast <CoordinatorLayout> (Parent);
     }
 }
Esempio n. 3
0
        private void ShowEmptyPage()
        {
            try
            {
                MainScrollEvent.IsLoading = false;

                ProgressBarLoader.Visibility = ViewStates.Gone;

                if (PixUserFeedAdapter.PostList.Count > 0)
                {
                    ProfileFeedRecylerView.Visibility = ViewStates.Visible;
                    EmptyStateLayout.Visibility       = ViewStates.Gone;
                }
                else
                {
                    ProfileFeedRecylerView.Visibility = ViewStates.Gone;

                    if (Inflated == null)
                    {
                        Inflated = EmptyStateLayout.Inflate();
                    }

                    EmptyStateInflater x = new EmptyStateInflater();
                    x.InflateLayout(Inflated, EmptyStateInflater.Type.NoPost);
                    if (!x.EmptyStateButton.HasOnClickListeners)
                    {
                        x.EmptyStateButton.Click += null;
                    }
                    EmptyStateLayout.Visibility = ViewStates.Visible;

                    //Remove behavior from AppBarLayout
                    if (ViewCompat.IsLaidOut(AppBarLayoutView))
                    {
                        CoordinatorLayout.LayoutParams appBarLayoutParams = (CoordinatorLayout.LayoutParams)AppBarLayoutView.LayoutParameters;
                        AppBarLayout.Behavior          behavior           = (AppBarLayout.Behavior)appBarLayoutParams.Behavior;
                        behavior.SetDragCallback(new DragRemover());
                    }
                }
            }
            catch (Exception e)
            {
                ProgressBarLoader.Visibility = ViewStates.Gone;
                Console.WriteLine(e);
            }
        }