Adjust gallery gesture area
This commit is contained in:
1 parent
5c179a4e5d
commit
8a1c0c0766
3 files changed
+17
-8
No files matched your search
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user