I recently finished developing my android application. I used sp (Scaled pixels) for all textSize. The problem is when i adjusted the system font-size, my application\'s fon
There's another way to prevent app layout issue / font issue from the setting font size change. You can try
// ignore the font scale here
final Configuration newConfiguration = new Configuration(
newBase.getResources().getConfiguration()
);
newConfiguration.fontScale = 1.0f;
applyOverrideConfiguration(newConfiguration);
where newBase is from attachBaseContext function. You need to override this callback in your Activity.
But, the side effect is that if you wanna use animation (objectanimator/valueanimator), then it will cause the weird behavior.