| | |
| | | //this may not be 100% accurate, but it's all we've got |
| | | realWidth = display.getWidth(); |
| | | realHeight = display.getHeight(); |
| | | System.out.println("LayoutUtil.getRealHeight" + e.getMessage()); |
| | | System1.out.println("LayoutUtil.getRealHeight" + e.getMessage()); |
| | | } |
| | | } else { |
| | | //This should be close, as lower API devices should not have window navigation bars |
| | |
| | | //this may not be 100% accurate, but it's all we've got |
| | | realWidth = display.getWidth(); |
| | | realHeight = display.getHeight(); |
| | | System.out.println("LayoutUtil.getRealHeight" + e.getMessage()); |
| | | System1.out.println("LayoutUtil.getRealHeight" + e.getMessage()); |
| | | } |
| | | } else { |
| | | //This should be close, as lower API devices should not have window navigation bars |
| | |
| | | //this may not be 100% accurate, but it's all we've got |
| | | realWidth = display.getWidth(); |
| | | realHeight = display.getHeight(); |
| | | System.out.println("LayoutUtil.getRealHeight" + e.getMessage()); |
| | | System1.out.println("LayoutUtil.getRealHeight" + e.getMessage()); |
| | | } |
| | | } else { |
| | | //This should be close, as lower API devices should not have window navigation bars |
| | |
| | | |
| | | public static int getHeightPixel(int height) { |
| | | int toHeight = (int) (height * getRealHeight() * 1.0 / BaseApplication.getApplication().getResources().getDimension(RUtils.R_dimen_w800)); |
| | | // System.out.println("height=" + height + ", to height=" + toHeight); |
| | | // System1.out.println("height=" + height + ", to height=" + toHeight); |
| | | return toHeight; |
| | | } |
| | | |
| | |
| | | try { |
| | | if (view instanceof TextView) { |
| | | int fontSize = (Integer) style.get(Style.fontSize); |
| | | System.out.println("LayoutUtil.applyStyle fontSize=" + fontSize); |
| | | System1.out.println("LayoutUtil.applyStyle fontSize=" + fontSize); |
| | | // if (fontSize == 21) { |
| | | //// float fontSize1 = BaseApplication.getApplication().activity.fragment_face_detail.sign_up_rule_field_label.getTextSize(); |
| | | //// ((TextView) view).setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize1); |