Esempio n. 1
0
        public CustomAlertDialog SetMessage(Java.Lang.ICharSequence message, Boolean enableLinks = true)
        {
            View.Inflate(Context, Resource.Layout.dialogMessage, _layout);

            TextView textView = _layout.FindViewById <TextView>(Resource.Id.dialogMessageTextView);

            if (enableLinks)
            {
                textView.MovementMethod = LinkMovementMethod.Instance;
                textView.TextFormatted  = message.StripUrlUnderlines();
            }
            else
            {
                textView.TextFormatted = message;
            }

            textView.TextFormatted = textView.TextFormatted.Trim();

            return(this);
        }
Esempio n. 2
0
        private void ShowLayoutMessage(Java.Lang.ICharSequence message, Boolean enableLinks = true)
        {
            _contentLayout.RemoveAllViews();

            View layout = View.Inflate(this, Resource.Layout.message, _contentLayout);

            TextView textView = layout.FindViewById <TextView>(Resource.Id.messageTextView);

            if (enableLinks)
            {
                textView.MovementMethod = LinkMovementMethod.Instance;
                textView.TextFormatted  = message.StripUrlUnderlines();
            }
            else
            {
                textView.TextFormatted = message;
            }

            textView.TextFormatted = textView.TextFormatted.Trim();
            textView.SetMaxWidth((Int32)(UiUtilities.GetScreenPixelSize(WindowManager).width * 0.9));
        }