diff --git a/app/src/main/java/net/gsantner/markor/format/ActionButtonBase.java b/app/src/main/java/net/gsantner/markor/format/ActionButtonBase.java index 59d92c884f..4331ae1d58 100644 --- a/app/src/main/java/net/gsantner/markor/format/ActionButtonBase.java +++ b/app/src/main/java/net/gsantner/markor/format/ActionButtonBase.java @@ -322,6 +322,7 @@ public boolean onTouch(final View v, final MotionEvent event) { final int action = event.getAction(); if (action == MotionEvent.ACTION_DOWN) { + delay = initialDelay; onClick(v); return true; } else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) { diff --git a/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java b/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java index 1353f5b33a..1cab913585 100644 --- a/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java +++ b/app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java @@ -710,7 +710,7 @@ private static String makeSortKey(final String sortBy, final File file) { return file.lastModified() + name; } case SORT_BY_FILESIZE: { - return file.length() + name; + return String.format("%015d", file.length()) + name; } case SORT_BY_MIMETYPE: { return getMimeType(file).toLowerCase() + name;