public ToolBarPostsStylesHolderIOS(ThemeParser <T> themeParser)
 {
     MoreButtonTheme  = themeParser.GetThemeByName <IImageButtonTheme>(_moreButtonTheme);
     TitleTheme       = themeParser.GetThemeByName <ITextViewTheme>(_titleTheme);
     ToolbarViewTheme = themeParser.GetThemeByName <IViewTheme>(_viewTheme);
     CreatePostButton = themeParser.GetThemeByName <ITextViewTheme>(_createPostTheme);
 }
Beispiel #2
0
 public void SetCountryTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _countryLabel.SetTheme(theme);
     });
 }
Beispiel #3
0
 public void SetPhoneTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _phoneLabel.SetTheme(theme);
     });
 }
Beispiel #4
0
 public void SetNameTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.NameTitleTextView.SetTheme(theme);
     }, null);
 }
Beispiel #5
0
 public void SetHeaderLabelTheme(ITextViewTheme themeName)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.TitleTextView.SetTheme(themeName);
     });
 }
Beispiel #6
0
        public void SetTitleTheme(ITextViewTheme theme)
        {
            var strAttr = new UIStringAttributes();

            strAttr.ForegroundColor            = (UIColor)theme.TextColor;
            _navigationBar.TitleTextAttributes = strAttr;
        }
Beispiel #7
0
 public void SetFirstLastNameTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _nameLabel.SetTheme(theme);
     });
 }
Beispiel #8
0
 public void SetSocialNetworkLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         //_socialNetworksLabel.SetTheme(themeName);
     });
 }
Beispiel #9
0
 public void SetNoAccountLabelTheme(ITextViewTheme theme)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.NoAccountTextView.SetTheme(theme);
     });
 }
Beispiel #10
0
 public void SetPasswordLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _passwordLabel.SetTheme(theme);
     });
 }
Beispiel #11
0
 public void SetNoAccountLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _noAccountLabel.SetTheme(theme);
     });
 }
Beispiel #12
0
        public void SetCreatePostTheme(ITextViewTheme theme)
        {
            var strAttr = new UITextAttributes();

            strAttr.TextColor = (UIColor)theme.TextColor;
            _createPostButton.SetTitleTextAttributes(strAttr, UIControlState.Normal);
        }
Beispiel #13
0
        public static void SetTheme(this UILabel label, ITextViewTheme mainTheme, string mainText, ITextViewTheme attrTheme, string attrText, int position)
        {
            SetTheme(label, mainTheme);

            var firstAttributes = new UIStringAttributes();

            if (mainTheme.TextColor != null)
            {
                firstAttributes.ForegroundColor = (UIColor)mainTheme.TextColor;
            }

            if (mainTheme.TextSize > 0)
            {
                firstAttributes.Font = FontStyleFromEnum(mainTheme.TextStyle, (int)mainTheme.TextSize);
            }

            var secondAttributes = new UIStringAttributes
            {
                Font            = FontStyleFromEnum(attrTheme.TextStyle, (int)attrTheme.TextSize),
                ForegroundColor = (UIColor)attrTheme.TextColor,
                UnderlineStyle  = NSUnderlineStyle.Single //_nativeTheme.UnderlineStyles[linkFontStyle]
            };

            var prettyString = new NSMutableAttributedString(mainText.Insert(position, attrText));

            prettyString.SetAttributes(firstAttributes.Dictionary, new NSRange(0, position - 1));
            prettyString.SetAttributes(firstAttributes.Dictionary, new NSRange(position + attrText.Length - 1, prettyString.Length - position - attrText.Length));
            prettyString.SetAttributes(secondAttributes.Dictionary, new NSRange(position, attrText.Length));

            label.AttributedText = prettyString;
        }
Beispiel #14
0
        public void SetEnableCell(int index, IViewTheme viewTheme, ITextViewTheme labelTheme)
        {
            var indexPath = NSIndexPath.FromRowSection(index, 0);
            var cell      = (ToolViewCell)_toolsCollectionView.CellAt(indexPath);

            cell?.SetThemes(viewTheme, labelTheme);
        }
Beispiel #15
0
 public void SetCurrentPriceTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _currentPriceValueLabel.SetTheme(theme);
     });
 }
 public void SetFeatureTextTheme(ITextViewTheme themeName)
 {
     InvokeOnMainThread(() =>
     {
         _featureText.SetTheme(themeName);
     });
 }
Beispiel #17
0
 public void SetDiffValueTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _profitValueLabel.SetTheme(theme);
     });
 }
Beispiel #18
0
 public void SetSkypeTextViewTheme(ITextViewTheme theme)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.SkypeTextView.SetTheme(theme);
     });
 }
Beispiel #19
0
 public void SetDateTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _dateLabel.SetTheme(theme);
     });
 }
Beispiel #20
0
 public void SetHeaderLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _forgotPassHeaderLabel.SetTheme(theme);
     });
 }
Beispiel #21
0
 public void SetContent(string content, string readMore, ITextViewTheme mainTheme, ITextViewTheme attrTheme, int position)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.ContentTextView.SetTheme(mainTheme, content, attrTheme, readMore, position);
     }, null);
 }
 public ProfileCellStylesHolderIOS(ThemeParser <T> themeParser)
 {
     CellBackgroundTheme   = themeParser.GetThemeByName <IViewTheme>(_cellBackgroundTheme);
     AvatarImageViewTheme  = themeParser.GetThemeByName <IImageViewTheme>(_avatarImageViewTheme);
     NameLabelTheme        = themeParser.GetThemeByName <ITextViewTheme>(_nameLabelTheme);
     YourProfileLabelTheme = themeParser.GetThemeByName <ITextViewTheme>(_yourProfileLabelTheme);
 }
Beispiel #23
0
 public void SetProfileLabelTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.ProfileLabelTextView.SetTheme(theme);
     }, null);
 }
Beispiel #24
0
 public void SetTextTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _optionLabel.SetTheme(theme);
     });
 }
Beispiel #25
0
 public void SetFeatureTextTheme(ITextViewTheme themeName)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.FeatureTextView.SetTheme(themeName);
     });
 }
Beispiel #26
0
 public void SetBuySellValueTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _buySellValueLabel.SetTheme(theme);
     });
 }
Beispiel #27
0
 public void SetEmailTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _emailLabel.SetTheme(theme);
     });
 }
Beispiel #28
0
 public void SetForecastTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _forecastTimeValueLabel.SetTheme(theme);
     });
 }
Beispiel #29
0
 public void SetSkypeTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _skypeLabel.SetTheme(theme);
     });
 }
Beispiel #30
0
 public void SetDiffValueTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.DifferenceValueTextView.SetTheme(theme);
     }, null);
 }