From 2b746f0bf7db1dd8ab3f3afb548ac76ac6af6aa1 Mon Sep 17 00:00:00 2001 From: Hemang Manhas Date: Tue, 4 Feb 2025 10:52:46 +0530 Subject: [PATCH] [Editor] Adds icons to editor (Fixes #6933) Signed-off-by: Hemang Manhas --- .../java/app/organicmaps/editor/EditorFragment.java | 6 +++--- android/app/src/main/res/drawable/ic_building.xml | 9 +++++++++ android/app/src/main/res/drawable/ic_floor.xml | 11 +++++++++++ .../app/src/main/res/drawable/ic_operating_hours.xml | 2 +- .../app/src/main/res/drawable/ic_street_address.xml | 9 +++++++++ android/app/src/main/res/layout/fragment_editor.xml | 2 +- 6 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 android/app/src/main/res/drawable/ic_building.xml create mode 100644 android/app/src/main/res/drawable/ic_floor.xml create mode 100644 android/app/src/main/res/drawable/ic_street_address.xml diff --git a/android/app/src/main/java/app/organicmaps/editor/EditorFragment.java b/android/app/src/main/java/app/organicmaps/editor/EditorFragment.java index 53b883f7c4..86ab7b1e7d 100644 --- a/android/app/src/main/java/app/organicmaps/editor/EditorFragment.java +++ b/android/app/src/main/java/app/organicmaps/editor/EditorFragment.java @@ -422,14 +422,14 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe view.findViewById(R.id.block_street).setOnClickListener(this); mStreet = view.findViewById(R.id.street); View blockHouseNumber = view.findViewById(R.id.block_building); - mHouseNumber = findInputAndInitBlock(blockHouseNumber, 0, R.string.house_number); + mHouseNumber = findInputAndInitBlock(blockHouseNumber, R.drawable.ic_building, R.string.house_number); mInputHouseNumber = blockHouseNumber.findViewById(R.id.custom_input); - initBlock(view, Metadata.MetadataType.FMD_POSTCODE, R.id.block_zipcode, 0, R.string.editor_zip_code, 0); + initBlock(view, Metadata.MetadataType.FMD_POSTCODE, R.id.block_zipcode, R.drawable.ic_address, R.string.editor_zip_code, 0); // Details View mBlockLevels = view.findViewById(R.id.block_levels); - mBuildingLevels = findInputAndInitBlock(mBlockLevels, 0, + mBuildingLevels = findInputAndInitBlock(mBlockLevels, R.drawable.ic_floor, getString(R.string.editor_storey_number, Editor.nativeGetMaxEditableBuildingLevels())); mBuildingLevels.setInputType(InputType.TYPE_CLASS_NUMBER); mInputBuildingLevels = mBlockLevels.findViewById(R.id.custom_input); diff --git a/android/app/src/main/res/drawable/ic_building.xml b/android/app/src/main/res/drawable/ic_building.xml new file mode 100644 index 0000000000..c2424cc1f0 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_building.xml @@ -0,0 +1,9 @@ + + + diff --git a/android/app/src/main/res/drawable/ic_floor.xml b/android/app/src/main/res/drawable/ic_floor.xml new file mode 100644 index 0000000000..4b2a27afb2 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_floor.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/android/app/src/main/res/drawable/ic_operating_hours.xml b/android/app/src/main/res/drawable/ic_operating_hours.xml index 682253e6f6..2ce8a142ba 100644 --- a/android/app/src/main/res/drawable/ic_operating_hours.xml +++ b/android/app/src/main/res/drawable/ic_operating_hours.xml @@ -4,6 +4,6 @@ android:viewportWidth="24" android:viewportHeight="24"> diff --git a/android/app/src/main/res/drawable/ic_street_address.xml b/android/app/src/main/res/drawable/ic_street_address.xml new file mode 100644 index 0000000000..85d5766f30 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_street_address.xml @@ -0,0 +1,9 @@ + + + diff --git a/android/app/src/main/res/layout/fragment_editor.xml b/android/app/src/main/res/layout/fragment_editor.xml index 92f53510ef..9ea65f5cb9 100644 --- a/android/app/src/main/res/layout/fragment_editor.xml +++ b/android/app/src/main/res/layout/fragment_editor.xml @@ -91,7 +91,7 @@ android:paddingTop="@dimen/margin_half">