Fix build.gradle + small context menu fix

This commit is contained in:
Alexey Kulish 2015-11-30 17:39:07 +03:00
parent 51234689df
commit 252f821eb9
2 changed files with 11 additions and 9 deletions

View file

@ -185,15 +185,17 @@ task updateNoTranslate(type: Copy) {
}
task validateTranslate {
new java.io.File("res").eachFileRecurse groovy.io.FileType.FILES, {
if(it.name == "strings.xml" || it.name == "phrases.xml") {
println "Validating translations"
file("res").eachFileRecurse groovy.io.FileType.FILES, {
if (it.name == "strings.xml" || it.name == "phrases.xml") {
it.eachLine { line ->
if( line.contains("\$ s") || line.contains("\$ d") || line.contains("\$ f") ||
line.contains(" \$s") || line.contains(" \$d") || line.contains(" \$f") ||
line.contains("1\$ ") || line.contains("2\$ ") || line.contains("3\$ ") ||
(line.contains("% \$") || line.contains("% 1") ||
line.contains("% 2") || line.contains("% 3") )) {
throw new GradleException("Incorrect translation " + it.getAbsolutePath() + " " + line);
if (line.contains("\$ s") || line.contains("\$ d") || line.contains("\$ f") ||
line.contains(" \$s") || line.contains(" \$d") || line.contains(" \$f") ||
line.contains("1\$ ") || line.contains("2\$ ") || line.contains("3\$ ") ||
(line.contains("% \$") || line.contains("% 1") ||
line.contains("% 2") || line.contains("% 3"))) {
throw new GradleException("Incorrect translation " + it.getAbsolutePath() + " " + line);
}
}
}

View file

@ -702,7 +702,7 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents {
menuFullHeight = view.findViewById(R.id.context_menu_main).getHeight();
int dy = 0;
if (!menu.isLandscapeLayout() && menuTopViewHeight != 0) {
if (!menu.isLandscapeLayout() && menuTopViewHeight != 0 && menu.getCurrentMenuState() == MenuState.HEADER_ONLY) {
dy = Math.max(0, newMenuTopViewHeight - menuTopViewHeight);
}
menuTopViewHeight = newMenuTopViewHeight;