示例#1
0
        private void InitComponent()
        {
            try
            {
                TxtAppName      = FindViewById <TextView>(Resource.Id.appName);
                TxtPackageName  = FindViewById <TextView>(Resource.Id.appUsername);
                IconVersion     = FindViewById <TextView>(Resource.Id.iconVersion);
                TxtCountVersion = FindViewById <TextView>(Resource.Id.countVersion);
                IconChangelog   = FindViewById <TextView>(Resource.Id.iconChangelog);
                IconRateApp     = FindViewById <TextView>(Resource.Id.iconRateApp);
                IconTerms       = FindViewById <TextView>(Resource.Id.iconTerms);
                IconPrivacy     = FindViewById <TextView>(Resource.Id.iconPrivacy);
                IconAbout       = FindViewById <TextView>(Resource.Id.iconAbout);

                CardView1 = FindViewById <CardView>(Resource.Id.cardView1);
                CardView2 = FindViewById <CardView>(Resource.Id.cardView2);

                CardView1.SetBackgroundColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#282828") : Color.ParseColor("#efefef"));
                CardView2.SetBackgroundColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#282828") : Color.ParseColor("#efefef"));


                LayoutChangelog = FindViewById <LinearLayout>(Resource.Id.layoutChangelog);
                LayoutRate      = FindViewById <LinearLayout>(Resource.Id.layoutRate);
                LayoutTerms     = FindViewById <LinearLayout>(Resource.Id.layoutTerms);
                LayoutPrivacy   = FindViewById <LinearLayout>(Resource.Id.layoutPrivacy);
                LayoutAbout     = FindViewById <LinearLayout>(Resource.Id.layoutAbout);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconVersion, FontAwesomeIcon.InfoCircle);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconChangelog, FontAwesomeIcon.SyncAlt);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconRateApp, IonIconsFonts.AndroidStarHalf);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeRegular, IconTerms, FontAwesomeIcon.FileContract);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconPrivacy, FontAwesomeIcon.UserSecret);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeBrands, IconAbout, FontAwesomeIcon.Medapps);

                TxtAppName.Text = AppSettings.ApplicationName;

                PackageInfo info = PackageManager.GetPackageInfo(PackageName, 0);
                //int versionNumber = info.VersionCode;
                string versionName = info.VersionName;

                TxtPackageName.Text  = PackageName;
                TxtCountVersion.Text = versionName;

                var nativeAdLayout = FindViewById <NativeAdLayout>(Resource.Id.native_ad_container);
                nativeAdLayout.Visibility = ViewStates.Gone;

                AdsFacebook.InitNative(this, nativeAdLayout, null);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#2
0
    public void ViewCards(CardViewerDetails details)
    {
        cardViewerObject.SetActive(true);

        headerText.text = details.locationText;

        Debug.Log("Displaying " + details.cardsToDisplay.Count + " cards in the Card Viewer Window.");

        //populate the display with CardView Prefabs
        for (int i = 0; i < details.cardsToDisplay.Count; i++)
        {
            GameObject newView = cardViewObjectPool.GetObject();
            newView.transform.SetParent(contentPanel);

            CardView2 view = newView.GetComponent <CardView2>();
            view.Setup(details.cardsToDisplay[i]);
        }
    }