Scale density correctly on VectorDrawable.applyTheme()
Bug: 25081461 Change-Id: I012e0932e67bc51502dc00e11131218af1377115
This commit is contained in:
@@ -603,7 +603,7 @@ public class VectorDrawable extends Drawable {
|
||||
final int densityDpi = a.getResources().getDisplayMetrics().densityDpi;
|
||||
final int newSourceDensity = densityDpi == 0 ? DisplayMetrics.DENSITY_DEFAULT : densityDpi;
|
||||
final int oldSourceDensity = pathRenderer.mSourceDensity;
|
||||
final float densityScale = oldSourceDensity / (float) newSourceDensity;
|
||||
final float densityScale = newSourceDensity / (float) oldSourceDensity;
|
||||
pathRenderer.mSourceDensity = newSourceDensity;
|
||||
|
||||
final int tintMode = a.getInt(R.styleable.VectorDrawable_tintMode, -1);
|
||||
|
||||
Reference in New Issue
Block a user