From 142fa54b15b51a640dac7a9b8df5732c8c16d3ff Mon Sep 17 00:00:00 2001 From: 251309-lirui Date: Sat, 31 Jul 2021 11:13:59 +0800 Subject: [PATCH] =?UTF-8?q?findbus=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../elyeproj/loaderviewlibrary/AttrValue.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/loaderviewlibrary/src/main/java/es/guiguegon/elyeproj/loaderviewlibrary/AttrValue.java b/loaderviewlibrary/src/main/java/es/guiguegon/elyeproj/loaderviewlibrary/AttrValue.java index 22476d4..43b65ef 100644 --- a/loaderviewlibrary/src/main/java/es/guiguegon/elyeproj/loaderviewlibrary/AttrValue.java +++ b/loaderviewlibrary/src/main/java/es/guiguegon/elyeproj/loaderviewlibrary/AttrValue.java @@ -2,7 +2,7 @@ * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * You may obtain an copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -71,6 +71,7 @@ public class AttrValue { return (T) defValue; } } + /** * getLayout * @@ -115,11 +116,11 @@ public class AttrValue { * @param str String * @return boolean * */ - public static boolean isEmpty(String str){ - boolean isEmpty; - if(str == null || str.equals("")){ + public static boolean isEmpty(String str) { + boolean isEmpty; + if (str == null || "".equals(str)) { isEmpty = true; - }else { + } else { isEmpty = false; } return isEmpty; @@ -133,7 +134,7 @@ public class AttrValue { * @return vp */ public static int pxTovp(Context context, float px) { - return (Math.round(px) / (context.getResourceManager().getDeviceCapability().screenDensity / CONSTANT)); + return Math.round(px) / (context.getResourceManager().getDeviceCapability().screenDensity / CONSTANT); } } -- Gitee