public void SetSaveButtonTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _saveButton.SetTheme(theme); }); }
public void SetUserAgreementTheme(IButtonTheme mainThemeName, string mainText, IButtonTheme attrThemeName, string attrText, int position) { InvokeOnMainThread(() => { _userAgreementLink.SetTheme(mainThemeName, mainText, attrThemeName, attrText, position); }); }
public void SetSkipButtonTheme(IButtonTheme themeName) { InvokeOnMainThread(() => { _skipButton.SetTheme(themeName); }); }
public void SetForgetPassTheme(IButtonTheme theme) { (Context as Activity)?.RunOnUiThread(() => { _holder.ForgotPassTextView.SetTheme((ITextViewTheme)theme); }); }
public void SetNextButtonTheme(IButtonTheme themeName) { InvokeOnMainThread(() => { _nextButton.SetTheme(themeName); }); }
public void SetLogInButtonTheme(IButtonTheme theme) { (Context as Activity)?.RunOnUiThread(() => { _holder.AuthButton.SetTheme(theme); }); }
public void SetFacebookButtonTheme(IButtonTheme theme) { (Context as Activity)?.RunOnUiThread(() => { _holder.NewFacebookImageButton.SetTheme(theme); }); }
public void SetForgetPassTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _forgetPassButton.SetTheme(theme); }); }
public void SetFacebookButtonTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _fbAuthButton.SetTheme(theme); }); }
public void SetRegistrationButtonTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _registrationButton.SetTheme(theme); }); }
public void SetLogInButtonTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _logInButton.SetTheme(theme); }); }
public static void SetTheme(this UIButton button, IButtonTheme mainTheme, string mainText, IButtonTheme attrTheme, string attrText, int position) { SetTheme(button, 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)); button.SetAttributedTitle(prettyString, UIControlState.Normal); }
public void SetCancelButtonTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _cancelButton.SetTheme(theme); }); }
public PostSocialStylesHolderDroid(ThemeParser <T> themeParser) { NotLikeTheme = themeParser.GetThemeByName <IButtonTheme>(_notLikeThemeName); LikeTheme = themeParser.GetThemeByName <IButtonTheme>(_likeThemeName); CommentTheme = themeParser.GetThemeByName <IButtonTheme>(_commentThemeName); ShareTheme = themeParser.GetThemeByName <IButtonTheme>(_shareThemeName); }
public void SetRecoveryButtonTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _passRecoveryButton.SetTheme(theme); }); }
public void SetRegButtonTheme(IButtonTheme themeName) { (Context as Activity)?.RunOnUiThread(() => { _holder.RegButton.SetTheme(themeName); }); }
public void SetUserAgreementTheme(IButtonTheme mainThemeName, string mainText, IButtonTheme attrThemeName, string attrText, int position) { (Context as Activity)?.RunOnUiThread(() => { _holder.UserAgreementTextView.SetTheme((ITextViewTheme)mainThemeName, mainText, (ITextViewTheme)attrThemeName, attrText, position); }); }
public void SetLikeDrawable(IButtonTheme theme) { Application.SynchronizationContext.Post(_ => { _holder.LikeTextView.SetTheme((ITextViewTheme)theme); }, null); }
public void SetCommentTheme(IButtonTheme theme) { Application.SynchronizationContext.Post(_ => { _holder.CommentTextView.SetTheme((ITextViewTheme)theme); }, null); }
public void SetShareTheme(IButtonTheme theme) { InvokeOnMainThread(() => { CleanImageForSmallDevice(theme); _shareButton.SetTheme(theme); }); }
public void SetLikeDrawable(IButtonTheme themeName) { InvokeOnMainThread(() => { CleanImageForSmallDevice(themeName); _likeButton.SetTheme(themeName); }); }
public void SetCommentTheme(IButtonTheme theme) { InvokeOnMainThread(() => { CleanImageForSmallDevice(theme); _commentButton.SetTheme(theme); }); }
public void SetLikeTheme(IButtonTheme theme) { InvokeOnMainThread(() => { _likeButton.SetImage(null, UIControlState.Normal); CleanImageForSmallDevice(theme); _likeButton.SetTheme(theme); }); }
public EditContactStyleHolderDroid(ThemeParser <T> themeParser) { BackgroundTheme = themeParser.GetThemeByName <IViewTheme>(_backgroundTheme); UnEditableTextNoneTheme = themeParser.GetThemeByName <IEditTextTheme>(_uneditableTextNoneTheme); EditTextNoneTheme = themeParser.GetThemeByName <IEditTextTheme>(_editTextNoneTheme); EditTextFailTheme = themeParser.GetThemeByName <IEditTextTheme>(_editTextFailTheme); TextViewTheme = themeParser.GetThemeByName <ITextViewTheme>(_textViewTheme); SaveButtonTheme = themeParser.GetThemeByName <IButtonTheme>(_saveButtonTheme); CancelButtonTheme = themeParser.GetThemeByName <IButtonTheme>(_cancelButtonTheme); }
private void CleanImageForSmallDevice(IButtonTheme theme, bool left = true) { var w = UIScreen.MainScreen.Bounds.Width; if (w == 320 || w == 568) { if (left) { theme.ImageLeft = null; } else { theme.ImageRight = null; } } }
public static void SetTheme(this UIButton button, IButtonTheme theme) { SetTheme((UIView)button, (IViewTheme)theme); if (theme.TextColor != null) { button.SetTitleColor((UIColor)theme.TextColor, UIControlState.Normal); } if (theme.TextSize > 0) { button.Font = FontStyleFromEnum(theme.TextStyle, (int)theme.TextSize); } if (theme.CornerRadius > 0) { button.Layer.CornerRadius = theme.CornerRadius; } if (theme.BorderWidth > 0) { button.Layer.BorderWidth = theme.BorderWidth; } if (theme.BorderColor != null) { button.Layer.BorderColor = ((UIColor)theme.BorderColor).CGColor; } if (theme.ImageLeft != null) { button.SetImage((UIImage)theme.ImageLeft, UIControlState.Normal); //button.HorizontalAlignment = UIControlContentHorizontalAlignment.Left; //var availableSpace = button.ContentEdgeInsets.InsetRect(button.Bounds); //var availableWidth = availableSpace.Width - button.ImageEdgeInsets.Right - (button.ImageView?.Frame.Width ?? 0) - (button.TitleLabel?.Frame.Width ?? 0); //button.TitleEdgeInsets = new UIEdgeInsets(top: 0, left: availableWidth / 2, bottom: 0, right: 0); } if (theme.ImageRight != null) { button.SetImage((UIImage)theme.ImageRight, UIControlState.Normal); button.TitleEdgeInsets = new UIEdgeInsets(0, -button.ImageView.Frame.Size.Width, 0, button.ImageView.Frame.Size.Width); button.ImageEdgeInsets = new UIEdgeInsets(0, button.Frame.Size.Width - button.ImageView.Frame.Size.Width * 4, 0, -(button.Frame.Size.Width - button.ImageView.Frame.Size.Width)); } }
public void SetNextButtonTheme(IButtonTheme themeName) { _nextButton.SetTheme(themeName); }
public UpdatePostStylesHolderDroid(ThemeParser <T> themeParser) : base(themeParser) { ToolsDisableTheme = themeParser.GetThemeByName <IButtonTheme>(_toolsDisableTheme); TextFieldsDisableTheme = themeParser.GetThemeByName <IButtonTheme>(_textFieldsDisableTheme); }
public static void SetTheme(this Button button, IButtonTheme theme) { SetTheme((TextView)button, (ITextViewTheme)theme); }