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);
 }
예제 #2
0
 public void SetCountryTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _countryLabel.SetTheme(theme);
     });
 }
예제 #3
0
 public void SetPhoneTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _phoneLabel.SetTheme(theme);
     });
 }
예제 #4
0
 public void SetNameTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.NameTitleTextView.SetTheme(theme);
     }, null);
 }
예제 #5
0
 public void SetHeaderLabelTheme(ITextViewTheme themeName)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.TitleTextView.SetTheme(themeName);
     });
 }
예제 #6
0
        public void SetTitleTheme(ITextViewTheme theme)
        {
            var strAttr = new UIStringAttributes();

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

            strAttr.TextColor = (UIColor)theme.TextColor;
            _createPostButton.SetTitleTextAttributes(strAttr, UIControlState.Normal);
        }
예제 #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;
        }
예제 #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);
        }
예제 #15
0
 public void SetCurrentPriceTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _currentPriceValueLabel.SetTheme(theme);
     });
 }
 public void SetFeatureTextTheme(ITextViewTheme themeName)
 {
     InvokeOnMainThread(() =>
     {
         _featureText.SetTheme(themeName);
     });
 }
예제 #17
0
 public void SetDiffValueTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _profitValueLabel.SetTheme(theme);
     });
 }
예제 #18
0
 public void SetSkypeTextViewTheme(ITextViewTheme theme)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.SkypeTextView.SetTheme(theme);
     });
 }
예제 #19
0
 public void SetDateTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _dateLabel.SetTheme(theme);
     });
 }
예제 #20
0
 public void SetHeaderLabelTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _forgotPassHeaderLabel.SetTheme(theme);
     });
 }
예제 #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);
 }
예제 #23
0
 public void SetProfileLabelTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.ProfileLabelTextView.SetTheme(theme);
     }, null);
 }
예제 #24
0
 public void SetTextTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _optionLabel.SetTheme(theme);
     });
 }
예제 #25
0
 public void SetFeatureTextTheme(ITextViewTheme themeName)
 {
     (Context as Activity)?.RunOnUiThread(() =>
     {
         _holder.FeatureTextView.SetTheme(themeName);
     });
 }
예제 #26
0
 public void SetBuySellValueTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _buySellValueLabel.SetTheme(theme);
     });
 }
예제 #27
0
 public void SetEmailTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _emailLabel.SetTheme(theme);
     });
 }
예제 #28
0
 public void SetForecastTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _forecastTimeValueLabel.SetTheme(theme);
     });
 }
예제 #29
0
 public void SetSkypeTextViewTheme(ITextViewTheme theme)
 {
     InvokeOnMainThread(() =>
     {
         _skypeLabel.SetTheme(theme);
     });
 }
예제 #30
0
 public void SetDiffValueTheme(ITextViewTheme theme)
 {
     Application.SynchronizationContext.Post(_ =>
     {
         _holder.DifferenceValueTextView.SetTheme(theme);
     }, null);
 }