示例#1
0
        public void InitializeLayoutParadigm(View view)
        {
            primaryLibraryGridViewTop      = view.FindViewById <LibraryGridView>(Resource.Id.primaryLibraryGridView1);
            primaryLibraryGridViewBottom   = view.FindViewById <LibraryGridView>(Resource.Id.primaryLibraryGridView2);
            secondaryLibraryGridViewTop    = view.FindViewById <LibraryGridView>(Resource.Id.secondaryLibraryGridView1);
            secondaryLibraryGridViewBottom = view.FindViewById <LibraryGridView>(Resource.Id.secondaryLibraryGridView2);

            primaryLibraryTextView   = view.FindViewById <TextView>(Resource.Id.primaryLibraryTitle);
            secondaryLibraryTextView = view.FindViewById <TextView>(Resource.Id.secondaryLibraryTitle);

            Typeface face = Typeface.CreateFromAsset(Activity.Assets, "fonts/Roboto-Light.ttf");

            primaryLibraryTextView.SetTypeface(face, TypefaceStyle.Normal);
            secondaryLibraryTextView.SetTypeface(face, TypefaceStyle.Normal);

            if (LibraryMode == Library.Bible)
            {
                primaryLibraryGridViewTop.Tag      = "hebrew";
                primaryLibraryGridViewBottom.Tag   = "greek";
                secondaryLibraryGridViewTop.Tag    = "hebrew";
                secondaryLibraryGridViewBottom.Tag = "greek";
            }
            else
            {
                primaryLibraryGridViewTop.Tag      = App.STATE.PrimaryLanguage.EnglishName;
                primaryLibraryGridViewBottom.Tag   = App.STATE.PrimaryLanguage.EnglishName;
                secondaryLibraryGridViewTop.Tag    = App.STATE.SecondaryLanguage.EnglishName;
                secondaryLibraryGridViewBottom.Tag = App.STATE.SecondaryLanguage.EnglishName;

                ViewGroup primaryContainer   = (ViewGroup)primaryLibraryGridViewBottom.Parent;
                ViewGroup secondaryContainer = (ViewGroup)secondaryLibraryGridViewBottom.Parent;

                primaryContainer.RemoveView(primaryLibraryGridViewBottom);
                secondaryContainer.RemoveView(secondaryLibraryGridViewBottom);

                if (LibraryMode == Library.Insight)
                {
                    secondaryContainer.RemoveView(secondaryLibraryGridViewTop);
                    secondaryContainer.RemoveView(view.FindViewById <TextView>(Resource.Id.secondaryLibraryTitle));
                }
            }

            primaryLibraryGridViewTop.ItemClick      += LibraryGridView_Click;
            primaryLibraryGridViewBottom.ItemClick   += LibraryGridView_Click;
            secondaryLibraryGridViewTop.ItemClick    += LibraryGridView_Click;
            secondaryLibraryGridViewBottom.ItemClick += LibraryGridView_Click;

            UpdateUI();
        }
示例#2
0
 public LibraryGridViewListener(LibraryGridView paramLibraryGridView, int paramInt)
 {
     this.paramLibraryGridView = paramLibraryGridView;
     this.paramInt             = paramInt;
 }