1.超管接口对接和家族公会UI修改
This commit is contained in:
@@ -34,18 +34,22 @@ public class ScreenUtil {
|
||||
}
|
||||
|
||||
public static int dip2px(float dipValue) {
|
||||
init(NimUIKit.getContext());
|
||||
return (int) (dipValue * density + 0.5f);
|
||||
}
|
||||
|
||||
public static int px2dip(float pxValue) {
|
||||
init(NimUIKit.getContext());
|
||||
return (int) (pxValue / density + 0.5f);
|
||||
}
|
||||
|
||||
public static int sp2px(float spValue) {
|
||||
init(NimUIKit.getContext());
|
||||
return (int) (spValue * scaleDensity + 0.5f);
|
||||
}
|
||||
|
||||
public static int getDialogWidth() {
|
||||
init(NimUIKit.getContext());
|
||||
dialogWidth = (int) (screenMin * RATIO);
|
||||
return dialogWidth;
|
||||
}
|
||||
@@ -68,6 +72,7 @@ public class ScreenUtil {
|
||||
}
|
||||
|
||||
public static int getDisplayWidth() {
|
||||
init(NimUIKit.getContext());
|
||||
if (screenWidth == 0) {
|
||||
GetInfo(NimUIKit.getContext());
|
||||
}
|
||||
@@ -75,6 +80,7 @@ public class ScreenUtil {
|
||||
}
|
||||
|
||||
public static int getDisplayHeight() {
|
||||
init(NimUIKit.getContext());
|
||||
if (screenHeight == 0) {
|
||||
GetInfo(NimUIKit.getContext());
|
||||
}
|
||||
@@ -88,8 +94,8 @@ public class ScreenUtil {
|
||||
DisplayMetrics dm = context.getApplicationContext().getResources().getDisplayMetrics();
|
||||
screenWidth = dm.widthPixels;
|
||||
screenHeight = dm.heightPixels;
|
||||
screenMin = (screenWidth > screenHeight) ? screenHeight : screenWidth;
|
||||
screenMax = (screenWidth < screenHeight) ? screenHeight : screenWidth;
|
||||
screenMin = Math.min(screenWidth, screenHeight);
|
||||
screenMax = Math.max(screenWidth, screenHeight);
|
||||
density = dm.density;
|
||||
scaleDensity = dm.scaledDensity;
|
||||
xdpi = dm.xdpi;
|
||||
|
Reference in New Issue
Block a user