just got updated my project to xamarin.forms 4.8 pre 2 and this style
<item name="android:textAllCaps">false</item>
in android resorces somehow not working anymore!
disable buttons text uppercase
buttons text still are uppercase
Run this, then update it to 4.8 pre2 and run it again - the uppercase returns.
_11556 Repro.zip
This problem persists in Xamarin.Forms 4.8.0.1269. Can someone let me know if any workaround is there to fix that? In recent times for last one year or so, I could keep seeing issue like this in each Xamarin.Forms release which stops us to upgrade to latest version. Many issues are there with CarouselView, CollectionView, ImageButton and now in Buttons etc. I don't know how far the QA process is done.
@poliahrameshkumar Exactly :( i can't upgrade our project to 4.8.0.1269 because of this.
The below custom renderer fixes the issue for the time being.
using Android.Content;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(Button), typeof(CustomButtonRenderer))]
namespace somenamespacename
{
public class CustomButtonRenderer : ButtonRenderer
{
public CustomButtonRenderer(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
{
base.OnElementChanged(e);
Control.SetAllCaps(false);
}
}
}
i was exactly thinking about using a custom renderer :) thank you so much.
just found out the TextTransform property works for buttons too and is a perfect replacement for the old android resorces and custom renderer Workaround :) so our project is now upgraded to 4.8. 馃帀
@poliahrameshkumar thanks your fix saved me today! for some reasons the
"\
Kind of confused what the behavior should be, as we definitely do not want to be all caps true
thanks again for the fix
Xamarin-Forms-4.8 : We can set Button property TextTransform="None" to fix all-caps android issue.
Note: This will not work for the button of type Visual="Material".
You saved my life guys with TextTransform 鉂わ笍
@ananth-more1-gmail you saved my day
it works, thanks
@ananth-more1-gmail thank you
馃憤
Xamarin-Forms-4.8 : We can set Button property TextTransform="None" to fix all-caps android issue.
Note: This will not work for the button of type Visual="Material".
@ananth-more1-gmail If I didn't miss a build/clean/rebuild, it works for Visual Material buttons too with 4.8.0.1534 ^_^
Xamarin-Forms-4.8 : We can set Button property TextTransform="None" to fix all-caps android issue.
Note: This will not work for the button of type Visual="Material".
Thank you
Most helpful comment
The below custom renderer fixes the issue for the time being.
using Android.Content;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(Button), typeof(CustomButtonRenderer))]
namespace somenamespacename
{
public class CustomButtonRenderer : ButtonRenderer
{
public CustomButtonRenderer(Context context) : base(context)
{
}
}