Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[WEEX][Weex-Android] Add Supported For Multi Screen Render Supported …
Browse files Browse the repository at this point in the history
…In WeexCore (#2462)
  • Loading branch information
gubaojian authored and YorkShen committed May 24, 2019
1 parent b41f0c3 commit 7479b5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public class WXDeviceUtils {


public static boolean isAutoResize(Context context){
if(context == null){
return false;
}
return isMateX(context) || isGalaxyFold(context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ public static float getScreenDensity(Context ctx){
}

public static void updateApplicationScreen(Context context){
if(context == null || WXEnvironment.sApplication == null){
return;
}
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
DisplayMetrics displayMetrics =WXEnvironment.sApplication.getResources().getDisplayMetrics();
DisplayMetrics displayMetrics = WXEnvironment.sApplication.getResources().getDisplayMetrics();
displayMetrics.heightPixels = metrics.heightPixels;
displayMetrics.widthPixels = metrics.widthPixels;
displayMetrics.density = metrics.density;
Expand Down

0 comments on commit 7479b5c

Please sign in to comment.