diff options
author | Samantha Houts <samhouts@users.noreply.github.com> | 2017-06-22 11:19:26 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-06-22 19:26:53 +0100 |
commit | 595344f31aa108275bfbef9abc6a3ae68b79c52b (patch) | |
tree | 7af41ca3cb1a6d0ac110bc6e8a2fd7426fb6e1d6 /Xamarin.Forms.ControlGallery.Android | |
parent | 8b014183fe21da9d9e221cc49d6c1750e52098aa (diff) | |
download | xamarin-forms-595344f31aa108275bfbef9abc6a3ae68b79c52b.tar.gz xamarin-forms-595344f31aa108275bfbef9abc6a3ae68b79c52b.tar.bz2 xamarin-forms-595344f31aa108275bfbef9abc6a3ae68b79c52b.zip |
[Android] Remove the ". " on empty labels (Accessibility) on Fastrenderers (#915)
* [Android] Concatenate Name/HelpText better
Also remove some parameters that were added to workaround an issue that
no longer exists.
* Add repro
* Listen to Stephane
he's usually right
* oops, didn't save
Diffstat (limited to 'Xamarin.Forms.ControlGallery.Android')
-rw-r--r-- | Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs index 4c6c1a89..7f6fc2e0 100644 --- a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs +++ b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs @@ -30,6 +30,7 @@ using Xamarin.Forms.Controls.Issues; [assembly: ExportRenderer(typeof(Bugzilla42000._42000NumericEntryNoDecimal), typeof(EntryRendererNoDecimal))] [assembly: ExportRenderer(typeof(Bugzilla42000._42000NumericEntryNoNegative), typeof(EntryRendererNoNegative))] +[assembly: ExportRenderer(typeof(AndroidHelpText.HintLabel), typeof(HintLabel))] #if PRE_APPLICATION_CLASS #elif FORMS_APPLICATION_ACTIVITY @@ -234,9 +235,10 @@ namespace Xamarin.Forms.ControlGallery.Android {// no view to re-use, create new view = (context as Activity).LayoutInflater.Inflate(Resource.Layout.NativeAndroidCell, null); } - else { // re-use, clear image - // doesn't seem to help - //view.FindViewById<ImageView> (Resource.Id.Image).Drawable.Dispose (); + else + { // re-use, clear image + // doesn't seem to help + //view.FindViewById<ImageView> (Resource.Id.Image).Drawable.Dispose (); } view.FindViewById<TextView>(Resource.Id.Text1).Text = x.Name; @@ -273,7 +275,8 @@ namespace Xamarin.Forms.ControlGallery.Android }, TaskScheduler.FromCurrentSynchronizationContext()); } - else { + else + { // clear the image view.FindViewById<ImageView>(Resource.Id.Image).SetImageBitmap(null); } @@ -388,9 +391,10 @@ namespace Xamarin.Forms.ControlGallery.Android {// no view to re-use, create new view = _context.LayoutInflater.Inflate(Resource.Layout.NativeAndroidListViewCell, null); } - else { // re-use, clear image - // doesn't seem to help - //view.FindViewById<ImageView> (Resource.Id.Image).Drawable.Dispose (); + else + { // re-use, clear image + // doesn't seem to help + //view.FindViewById<ImageView> (Resource.Id.Image).Drawable.Dispose (); } view.FindViewById<TextView>(Resource.Id.Text1).Text = item.Name; view.FindViewById<TextView>(Resource.Id.Text2).Text = item.Category; @@ -425,7 +429,8 @@ namespace Xamarin.Forms.ControlGallery.Android } }, TaskScheduler.FromCurrentSynchronizationContext()); } - else { + else + { // clear the image view.FindViewById<ImageView>(Resource.Id.Image).SetImageBitmap(null); } @@ -515,5 +520,21 @@ namespace Xamarin.Forms.ControlGallery.Android return base.GetDigitsKeyListener(inputTypes); } } + + public class HintLabel : Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer + { + public HintLabel() + { + Hint = AndroidHelpText.HintLabel.Success; + } + } + + public class NoFlashTestNavigationPage : Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer + { + protected override void SetupPageTransition(global::Android.Support.V4.App.FragmentTransaction transaction, bool isPush) + { + transaction.SetTransition((int)FragmentTransit.None); + } + } } |