示例#1
0
        public override void PresentInboxUI(Inbox.PushwooshInboxStyle style)
        {
            SetStyle(style);
            Intent intent = new Intent(Application.Context, typeof(InboxActivity));

            intent.AddFlags(ActivityFlags.NewTask);
            Application.Context.StartActivity(intent);
        }
示例#2
0
        private void SetStyle(Inbox.PushwooshInboxStyle style)
        {
            Pushwoosh.Inbox.UI.PushwooshInboxStyle nativeStyle = Pushwoosh.Inbox.UI.PushwooshInboxStyle.Instance;

            if (style.AccentColor != Color.Default)
            {
                nativeStyle.AccentColor = GetColor(style.AccentColor);
            }
            if (style.BackgroundColor != Color.Default)
            {
                nativeStyle.BackgroundColor = GetColor(style.BackgroundColor);
            }
            if (style.BarAccentColor != Color.Default)
            {
                nativeStyle.BarAccentColor = GetColor(style.BarAccentColor);
            }
            if (style.BarBackgroundColor != Color.Default)
            {
                nativeStyle.BarBackgroundColor = GetColor(style.BarBackgroundColor);
            }
            if (style.BarTextColor != Color.Default)
            {
                nativeStyle.BarTextColor = GetColor(style.BarTextColor);
            }
            if (!string.IsNullOrEmpty(style.BarTitle))
            {
                nativeStyle.BarTitle = style.BarTitle;
            }
            if (style.DateColor != Color.Default)
            {
                nativeStyle.DateColor = GetColor(style.DateColor);
            }
            if (style.SelectionColor != Color.Default)
            {
                nativeStyle.HighlightColor = GetColor(style.SelectionColor);
            }
            nativeStyle.DateFormatter = GetDateFormatter(style.DateFormat);
            if (!string.IsNullOrEmpty(style.DefaultImageName))
            {
                nativeStyle.DefaultImageIcon = GetResId(style.DefaultImageName, Application.Context);
            }
            if (style.DescriptionColor != Color.Default)
            {
                nativeStyle.DescriptionColor = GetColor(style.DescriptionColor);
            }
            if (!string.IsNullOrEmpty(style.ListEmptyImageName))
            {
                nativeStyle.ListEmptyImage = GetResId(style.ListEmptyImageName, Application.Context);
            }
            if (!string.IsNullOrEmpty(style.ListEmptyMessage))
            {
                nativeStyle.ListEmptyText = style.ListEmptyMessage;
            }
            if (!string.IsNullOrEmpty(style.ListErrorImageName))
            {
                nativeStyle.ListErrorImage = GetResId(style.ListErrorImageName, Application.Context);
            }
            if (!string.IsNullOrEmpty(style.ListErrorMessage))
            {
                nativeStyle.ListErrorMessage = style.ListErrorMessage;
            }
            if (style.SeparatorColor != Color.Default)
            {
                nativeStyle.DividerColor = GetColor(style.SeparatorColor);
            }
            if (style.TitleColor != Color.Default)
            {
                nativeStyle.TitleColor = GetColor(style.TitleColor);
            }
            if (style.TitleTextSize > 0)
            {
                nativeStyle.TitleTextSize = new Float(style.TitleTextSize);
            }
            if (style.DateTextSize > 0)
            {
                nativeStyle.DateTextSize = new Float(style.DateTextSize);
            }
            if (style.DescriptionTextSize > 0)
            {
                nativeStyle.DescriptionTextSize = new Float(style.DescriptionTextSize);
            }
        }