title: Android - System settings for accessibility font size are not applied if using androidx
body: <p>We're trying to make our apps more accessible, and one of the things we're looking at is supporting larger font sizes when configured from the system settings.</p>
  
  <p>We noticed that on Android 7.0 (and probably earlier versions too), the system font sizes are not properly applied within our app. We also noticed that some other apps like gmail were properly handling the font size change, so it was "something" our app was doing wrong. After quite some time investigating we found out that using the androidx library seems to be the cause.</p>
  
  <p>For example, creating a "hello world" new project under Android Studio, you'll see a "use androix artifacts" checkbox:</p>
  
  <p><a href="https://i.stack.imgur.com/blBiG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/blBiG.png" alt="Android Studio New Project Window"></a></p>
  
  <p>Then, if you set the accessibility font size to the highest value:
  <a href="https://i.stack.imgur.com/xny2d.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xny2d.png" alt="Accessibility font settings"></a></p>
  
  <p>This will be the result for your app if you <strong>checked</strong> the "androidx" checkbox (not working):
  <a href="https://i.stack.imgur.com/tZ9c6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tZ9c6.png" alt="unchanged text size"></a></p>
  
  <p>This will be the result for your app if you <strong>didn't check</strong> the "androidx" checkbox (working properly):
  <a href="https://i.stack.imgur.com/14MaL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/14MaL.png" alt="changed text size"></a></p>
  
  <p>If you check that box, the produced app binary will not apply system accessibility font size changes properly on Android 7.0, otherwise it will work fine.</p>
  
  <p>Migrating to androidx was a little bit of work and since it's the future (the support library is gradually getting deprecated), going back is not really an option :/</p>
  
  <p>Has anyone else encountered a similar issue?
  Could that be a bug with the androidx library?</p>
  
  <p>If anyone found a way to keep the androidx library and not have this bug, I would really like to know about it, thank you in advance!</p>