Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Android textAllCaps no longer works #11703

Closed
atexinspect opened this issue Aug 8, 2020 · 11 comments
Closed

Android textAllCaps no longer works #11703

atexinspect opened this issue Aug 8, 2020 · 11 comments
Labels
4.8.0 regression on 4.8.0 e/3 🕒 3 i/regression in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Milestone

Comments

@atexinspect
Copy link

Description

Android textAllCaps no longer works when using XF 4.8.0.1269

Steps to Reproduce

  1. Install XF 4.8.0.1269
  2. Run Android App
  3. Button text is always in capitals

Expected Behavior

Button text should be camel case

Actual Behavior

Button text always capitals

Basic Information

  • Version with issue:
  • Last known good version: XF 4.7.0.1260
  • IDE: VS 2019 V16.7.0
  • Platform Target Frameworks:
    • Android:
@rmarinho rmarinho added p/Android t/bug 🐛 s/unverified New report that has yet to be verified s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Aug 10, 2020
@rmarinho
Copy link
Member

@atexinspect text on android was always all caps no? do you have an example we can look?!

Thanks

@atexinspect
Copy link
Author

atexinspect commented Aug 10, 2020

In styles.xml

<?xml version="1.0" encoding="utf-8" ?>
<resources>
  <style name="Theme.Splash"
        parent="android:Theme">
    <item name="android:windowBackground">@drawable/splashscreen</item>
    <item name="android:windowNoTitle">true</item>
  </style>
  <style name="MainTheme" parent="MainTheme.Base">
  </style>
  <!-- Base theme applied no matter what API -->
  <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
    <item name="windowNoTitle">true</item>
    <!--We will be using the toolbar so no need to show ActionBar-->
    <item name="windowActionBar">false</item>
    <!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
    <!-- colorPrimary is used for the default action bar background -->
    <item name="colorPrimary">#2196F3</item>
    <!-- colorPrimaryDark is used for the status bar -->
    <item name="colorPrimaryDark">#1976D2</item>
    <!-- colorAccent is used as the default value for colorControlActivated
         which is used to tint widgets -->
    <item name="colorAccent">#96BCE3</item>
    <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight and colorSwitchThumbNormal. -->
    <item name="windowActionModeOverlay">true</item>
    <item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item> 
    <item name="android:colorPressedHighlight">@color/ListViewSelected</item>
    <item name="android:colorLongPressedHighlight">@color/ListViewHighlighted</item>
    <item name="android:colorFocusedHighlight">@color/ListViewSelected</item>
    <item name="android:colorActivatedHighlight">@color/ListViewSelected</item>
    <item name="android:activatedBackgroundIndicator">@color/ListViewSelected</item>

    <item name="android:textAllCaps">false</item>  <!-- Does not work with XF 4.8.0.1269 / Works with XF 4.7.0.1260 -->

    <!-- In Tabbar.axml app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget" makes tab page text camel case --> 
    
  </style>   
  <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
    <item name="colorAccent">#96BCE3</item>
  </style>
</resources>

Tabbar.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/sliding_tabs"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/colorPrimary"
    app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:tabIndicatorColor="@android:color/white"
    app:tabGravity="fill"
    app:tabMode="fixed" /

Tabbar.xml still gives correct camel case on tabs with XF 4.7.0.1260 & XF 4.8.0.1269

Regards
Paul.

@rmarinho
Copy link
Member

@atexinspect can you upload a small repro?! Thanks

@atexinspect
Copy link
Author

@Pantheas
Copy link

Creating a custom button renderer and calling SetAllCaps(false); does not work aswell...

@rmarinho rmarinho added 4.8.0 regression on 4.8.0 i/regression e/3 🕒 3 and removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified labels Aug 12, 2020
@samhouts samhouts added this to the 4.8.0 milestone Aug 13, 2020
@Pantheas
Copy link

@atexinspect setting TextTransform="None" in global Button style worked for me...

@atexinspect
Copy link
Author

@atexinspect setting TextTransform="None" in global Button style worked for me...

Worked for me too. Thanks.

@manikandantk88
Copy link

@atexinspect Thanks for the solution. Worked.

@kevcrooks
Copy link

We'd previously fixed the issue using the workaround mentioned above too.

We tried removing it just now on Xamarin.Forms version 4.8.0.1687, and the capitalisation issue seems to have been fixed for us. I haven't checked which version this seems to have been fixed from though.

@Cfun1
Copy link

Cfun1 commented Nov 30, 2020

@samhouts isn't a duplicate of #11556 ?

@rmarinho
Copy link
Member

rmarinho commented Dec 2, 2020

This should be fixed by #12170

@rmarinho rmarinho closed this as completed Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.8.0 regression on 4.8.0 e/3 🕒 3 i/regression in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects
None yet
Development

No branches or pull requests

7 participants