Merge "Copy configuration when getting resources for a rotation" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c074433e3b
@@ -116,7 +116,7 @@ public class RotationUtils {
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown rotation: " + rot);
|
||||
}
|
||||
Configuration c = context.getResources().getConfiguration();
|
||||
Configuration c = new Configuration(context.getResources().getConfiguration());
|
||||
c.orientation = orientation;
|
||||
Context rotated = context.createConfigurationContext(c);
|
||||
return rotated.getResources();
|
||||
|
||||
Reference in New Issue
Block a user