public final void resize(int w, int h) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); // int value = prefs.getInt("dpadDeadZone", 2); // value = (value < 0 ? 0 : (value > 4 ? 4 : value)); dpadDeadZone = DPAD_DEADZONE_VALUES[2]; dpad.hide(prefs.getBoolean("hideDpad", false)); buttons.hide(!Wrapper.supportsMultitouch(context) || prefs.getBoolean("hideButtons", false)); scaleX = (float) w / view.getWidth(); scaleY = (float) h / view.getHeight(); float controlScale = getControlScale(prefs); float sx = scaleX * controlScale; float sy = scaleY * controlScale; Resources res = context.getResources(); for (Control c : controls) c.load(res, sx, sy); reposition(w, h, prefs); transparency = prefs.getInt("vkeypadTransparency", 50); }