From 220f32610fb17126e989ed121363021834912efc Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Thu, 7 Apr 2016 11:26:16 +0300 Subject: [PATCH] [android] House number validation. --- .../jni/com/mapswithme/maps/editor/Editor.cpp | 6 +++ android/res/layout/fragment_editor.xml | 1 + .../com/mapswithme/maps/editor/Editor.java | 2 + .../maps/editor/EditorFragment.java | 38 +++++++++++++++--- .../maps/editor/EditorHostFragment.java | 39 ++++++++++++++----- 5 files changed, 70 insertions(+), 16 deletions(-) diff --git a/android/jni/com/mapswithme/maps/editor/Editor.cpp b/android/jni/com/mapswithme/maps/editor/Editor.cpp index 75f9092ddc..c5d15bf060 100644 --- a/android/jni/com/mapswithme/maps/editor/Editor.cpp +++ b/android/jni/com/mapswithme/maps/editor/Editor.cpp @@ -356,4 +356,10 @@ Java_com_mapswithme_maps_editor_Editor_nativeCreateNote(JNIEnv * env, jclass cla Editor::Instance().CreateNote(ms::LatLon(lat, lon), jni::ToNativeString(env, text)); } +// static boolean nativeIsHouseValid(String houseNumber); +JNIEXPORT jboolean JNICALL +Java_com_mapswithme_maps_editor_Editor_nativeIsHouseValid(JNIEnv * env, jclass clazz, jstring houseNumber) +{ + return osm::EditableMapObject::ValidateHouseNumber(jni::ToNativeString(env, houseNumber)); +} } // extern "C" diff --git a/android/res/layout/fragment_editor.xml b/android/res/layout/fragment_editor.xml index 475dd167d3..ec6a1411e0 100644 --- a/android/res/layout/fragment_editor.xml +++ b/android/res/layout/fragment_editor.xml @@ -124,6 +124,7 @@ style="@style/MwmWidget.Editor.MetadataBlock">