Skip to content

Commit

Permalink
update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
woioiow committed Dec 24, 2020
1 parent c192b04 commit 116da9e
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions easy-ui/src/main/java/com/moioio/android/util/DisplayUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@

public class DisplayUtil
{
public static int topH(Context context){
return getStateBarHeight(context);
}

public static int bottomH(Context context){
return getNavigationBarHeight(context);
}

public static int dip(Context context, int num)
{
return getDip(context,num);
}

public static int screenW(Context context)
{
return getScreenWidth(context);
}

public static int screenH(Context context)
{
return getScreenHeight(context);
}



public static int getStateBarHeight(Context context){
int result = 0;
Expand All @@ -19,13 +43,6 @@ public static int getStateBarHeight(Context context){
return result;
}

public static int getTopBarHeight(Context context){
return getStateBarHeight(context);
}

public static int getBottomBarHeight(Context context){
return getNavigationBarHeight(context);
}


public static int getNavigationBarHeight(Context context) {
Expand All @@ -43,6 +60,8 @@ public static int getNavigationBarHeight(Context context, int orientation) {
return 0;
}



public static int getDip(Context context, int num)
{
float value = num * getScreenDpi( context);
Expand Down

0 comments on commit 116da9e

Please sign in to comment.