diff --git a/app/src/main/java/com/hippo/ehviewer/EhApplication.java b/app/src/main/java/com/hippo/ehviewer/EhApplication.java index b8e4e9eaa..07e0788bb 100644 --- a/app/src/main/java/com/hippo/ehviewer/EhApplication.java +++ b/app/src/main/java/com/hippo/ehviewer/EhApplication.java @@ -108,6 +108,8 @@ public class EhApplication extends SceneApplication implements Thread.UncaughtEx CommonOperations.ensureNoMediaFile(Settings.getDownloadLocation()); + update(); + // Update version code try { PackageInfo pi= getPackageManager().getPackageInfo(getPackageName(), 0); @@ -121,6 +123,13 @@ public class EhApplication extends SceneApplication implements Thread.UncaughtEx } } + private void update() { + int version = Settings.getVersionCode(); + if (version < 52) { + Settings.putGuideGallery(true); + } + } + public void clearMemoryCache() { if (null != mConaco) { mConaco.clearMemoryCache(); diff --git a/app/src/main/java/com/hippo/ehviewer/gallery/gl/GalleryView.java b/app/src/main/java/com/hippo/ehviewer/gallery/gl/GalleryView.java index 92cb08d03..bf054bfeb 100644 --- a/app/src/main/java/com/hippo/ehviewer/gallery/gl/GalleryView.java +++ b/app/src/main/java/com/hippo/ehviewer/gallery/gl/GalleryView.java @@ -64,8 +64,8 @@ public class GalleryView extends GLView implements GestureRecognizer.Listener { private static final float[] LEFT_AREA = {0.0f, 0.0f, 1.0f / 3.0f, 1f}; private static final float[] RIGHT_AREA = {2.0f / 3.0f, 0.0f, 1.0f, 1f}; - private static final float[] MENU_AREA = {1.0f / 3.0f, 0.0f, 2.0f / 3.0f, 2.0f / 3.0f}; - private static final float[] SLIDER_AREA = {1.0f / 3.0f, 2.0f / 3.0f, 2.0f / 3.0f, 1.0f}; + private static final float[] MENU_AREA = {1.0f / 3.0f, 0.0f, 2.0f / 3.0f, 1.0f / 2.0f}; + private static final float[] SLIDER_AREA = {1.0f / 3.0f, 1.0f / 2.0f, 2.0f / 3.0f, 1.0f}; private static final int METHOD_ON_SINGLE_TAP_UP = 0; private static final int METHOD_ON_SINGLE_TAP_CONFIRMED = 1; diff --git a/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java b/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java index 87b7c945c..2b17f7774 100644 --- a/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java +++ b/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java @@ -130,9 +130,9 @@ public class GalleryGuideView extends ViewGroup implements View.OnClickListener mRightText.measure(MeasureSpec.makeMeasureSpec(widthSize / 3, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(heightSize, MeasureSpec.EXACTLY)); mMenuText.measure(MeasureSpec.makeMeasureSpec(widthSize / 3, MeasureSpec.EXACTLY), - MeasureSpec.makeMeasureSpec(heightSize * 2 / 3, MeasureSpec.EXACTLY)); + MeasureSpec.makeMeasureSpec(heightSize / 2, MeasureSpec.EXACTLY)); mProgressText.measure(MeasureSpec.makeMeasureSpec(widthSize / 3, MeasureSpec.EXACTLY), - MeasureSpec.makeMeasureSpec(heightSize / 3, MeasureSpec.EXACTLY)); + MeasureSpec.makeMeasureSpec(heightSize / 2, MeasureSpec.EXACTLY)); break; default: case 1: @@ -153,8 +153,8 @@ public class GalleryGuideView extends ViewGroup implements View.OnClickListener case 0: mLeftText.layout(0, 0, width / 3, height); mRightText.layout(width * 2 / 3, 0, width, height); - mMenuText.layout(width / 3, 0, width * 2 / 3, height * 2 / 3); - mProgressText.layout(width / 3, height * 2 / 3, width * 2 / 3, height); + mMenuText.layout(width / 3, 0, width * 2 / 3, height / 2); + mProgressText.layout(width / 3, height / 2, width * 2 / 3, height); break; default: case 1: @@ -179,9 +179,9 @@ public class GalleryGuideView extends ViewGroup implements View.OnClickListener mPoints[7] = h; mPoints[8] = w / 3; - mPoints[9] = h * 2 / 3; + mPoints[9] = h / 2; mPoints[10] = w * 2 / 3; - mPoints[11] = h * 2 / 3; + mPoints[11] = h / 2; } }