Skip to content

Commit

Permalink
see 08/07 log
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankj committed Aug 7, 2018
1 parent 608e2d9 commit a269b5f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apk/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1018003,"versionName":"1.18.3","enabled":true,"outputFile":"util_1_18_3.apk","fullName":"release","baseName":"release"},"path":"util_1_18_3.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1018004,"versionName":"1.18.4","enabled":true,"outputFile":"util_1_18_4.apk","fullName":"release","baseName":"release"},"path":"util_1_18_4.apk","properties":{}}]
Binary file renamed apk/util_1_18_3.apk → apk/util_1_18_4.apk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public static void start(Context context) {
@Override
public void initData(@Nullable Bundle bundle) {
if (ScreenUtils.isPortrait()) {
ScreenUtils.adaptScreen4VerticalSlide(this, 720);
ScreenUtils.adaptScreen4VerticalSlide(this, 540);
} else {
ScreenUtils.adaptScreen4HorizontalSlide(this, 720);
ScreenUtils.adaptScreen4HorizontalSlide(this, 540);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ public static void cancelAdaptScreen(final Activity activity) {
private static void adaptScreen(final Activity activity,
final float sizeInDp,
final boolean isVerticalSlide) {
final DisplayMetrics appDm = Utils.getApp().getResources().getDisplayMetrics();
final DisplayMetrics activityDm = activity.getResources().getDisplayMetrics();
if (UDM.densityDpi == -1) {
UDM.density = activityDm.density;
Expand All @@ -369,6 +370,10 @@ public void onLowMemory() {/**/}
}
activityDm.scaledDensity = activityDm.density * (UDM.scaledDensity / UDM.density);
activityDm.densityDpi = (int) (160 * activityDm.density);

appDm.density = activityDm.density;
appDm.scaledDensity = activityDm.scaledDensity;
appDm.densityDpi = activityDm.densityDpi;
}

private static final UtilDisplayMetrics UDM = new UtilDisplayMetrics();
Expand Down

0 comments on commit a269b5f

Please sign in to comment.