diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 1146c3f6d6..2e2266de45 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -255,9 +255,17 @@
+ android:value="com.mapswithme.maps.MwmActivity"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/res/layout/place_page_editor.xml b/android/res/layout/place_page_editor.xml
index 03ad49f049..1655638cc1 100644
--- a/android/res/layout/place_page_editor.xml
+++ b/android/res/layout/place_page_editor.xml
@@ -1,7 +1,6 @@
true
- @style/MwmTextAppearance.Body1
+
+
\ No newline at end of file
diff --git a/android/res/values/styles-text.xml b/android/res/values/styles-text.xml
index 6b62fe9adf..82b11e5a69 100644
--- a/android/res/values/styles-text.xml
+++ b/android/res/values/styles-text.xml
@@ -72,11 +72,12 @@
- true
-
-
-
+
+
@@ -87,7 +88,6 @@
diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java
index baa43c8d40..8cfbf203e1 100644
--- a/android/src/com/mapswithme/maps/MwmActivity.java
+++ b/android/src/com/mapswithme/maps/MwmActivity.java
@@ -47,6 +47,8 @@ import com.mapswithme.maps.editor.Editor;
import com.mapswithme.maps.editor.EditorActivity;
import com.mapswithme.maps.editor.EditorHostFragment;
import com.mapswithme.maps.editor.FeatureCategoryActivity;
+import com.mapswithme.maps.editor.ReportActivity;
+import com.mapswithme.maps.editor.ReportFragment;
import com.mapswithme.maps.location.LocationHelper;
import com.mapswithme.maps.location.LocationPredictor;
import com.mapswithme.maps.news.FirstStartFragment;
@@ -271,6 +273,14 @@ public class MwmActivity extends BaseMwmFragmentActivity
EditorActivity.start(this);
}
+ public void showReportForm()
+ {
+ if (mIsFragmentContainer)
+ replaceFragment(ReportFragment.class, null, null);
+ else
+ ReportActivity.start(this);
+ }
+
private void shareMyLocation()
{
final Location loc = LocationHelper.INSTANCE.getLastLocation();
diff --git a/android/src/com/mapswithme/maps/editor/ReportActivity.java b/android/src/com/mapswithme/maps/editor/ReportActivity.java
new file mode 100644
index 0000000000..51c8876506
--- /dev/null
+++ b/android/src/com/mapswithme/maps/editor/ReportActivity.java
@@ -0,0 +1,23 @@
+package com.mapswithme.maps.editor;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.support.annotation.NonNull;
+import android.support.v4.app.Fragment;
+
+import com.mapswithme.maps.base.BaseMwmFragmentActivity;
+
+public class ReportActivity extends BaseMwmFragmentActivity
+{
+ @Override
+ protected Class extends Fragment> getFragmentClass()
+ {
+ return ReportFragment.class;
+ }
+
+ public static void start(@NonNull Activity activity)
+ {
+ final Intent intent = new Intent(activity, ReportActivity.class);
+ activity.startActivity(intent);
+ }
+}
diff --git a/android/src/com/mapswithme/maps/editor/ReportFragment.java b/android/src/com/mapswithme/maps/editor/ReportFragment.java
new file mode 100644
index 0000000000..dd49eccc3b
--- /dev/null
+++ b/android/src/com/mapswithme/maps/editor/ReportFragment.java
@@ -0,0 +1,76 @@
+package com.mapswithme.maps.editor;
+
+import android.os.Bundle;
+import android.support.annotation.IntRange;
+import android.support.annotation.Nullable;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.EditText;
+
+import com.mapswithme.maps.R;
+import com.mapswithme.maps.base.BaseMwmToolbarFragment;
+import com.mapswithme.util.UiUtils;
+
+public class ReportFragment extends BaseMwmToolbarFragment implements View.OnClickListener
+{
+ private View mSimpleProblems;
+ private View mAdvancedProblem;
+ private EditText mProblemInput;
+
+ private boolean mAdvancedMode;
+ @IntRange(from = 0, to = 3)
+ private int mSelectedProblem;
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
+ {
+ return inflater.inflate(R.layout.fragment_report, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState)
+ {
+ super.onViewCreated(view, savedInstanceState);
+ mToolbarController.findViewById(R.id.save).setOnClickListener(this);
+ mSimpleProblems = view.findViewById(R.id.ll__problems);
+ mSimpleProblems.findViewById(R.id.problem_not_exist).setOnClickListener(this);
+ mSimpleProblems.findViewById(R.id.problem_closed_repair).setOnClickListener(this);
+ mSimpleProblems.findViewById(R.id.problem_duplicated_place).setOnClickListener(this);
+ mSimpleProblems.findViewById(R.id.problem_other).setOnClickListener(this);
+ mAdvancedProblem = view.findViewById(R.id.ll__other_problem);
+ mProblemInput = (EditText) mAdvancedProblem.findViewById(R.id.input);
+ refreshProblems();
+ }
+
+ private void refreshProblems()
+ {
+ UiUtils.showIf(mAdvancedMode, mAdvancedProblem);
+ UiUtils.showIf(!mAdvancedMode, mSimpleProblems);
+ }
+
+ @Override
+ public void onClick(View v)
+ {
+ switch (v.getId())
+ {
+ case R.id.problem_not_exist:
+ // TODO
+ break;
+ case R.id.problem_closed_repair:
+ // TODO
+ break;
+ case R.id.problem_duplicated_place:
+ // TODO
+ break;
+ case R.id.problem_other:
+ mAdvancedMode = true;
+ refreshProblems();
+ break;
+ case R.id.save:
+ // TODO
+ break;
+ }
+ }
+}
diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
index c2594fa828..5e293075ff 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
@@ -219,6 +219,7 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
mEmail.setOnLongClickListener(this);
mOperator.setOnLongClickListener(this);
mWiki.setOnLongClickListener(this);
+ mPpDetails.findViewById(R.id.ll__report_problem).setOnClickListener(this);
mEtBookmarkName = (EditText) mPpDetails.findViewById(R.id.et__bookmark_name);
mEtBookmarkName.setOnEditorActionListener(new TextView.OnEditorActionListener()
@@ -685,6 +686,11 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
((MwmActivity) getContext()).showEditor();
}
+ private void showReportForm()
+ {
+ ((MwmActivity) getContext()).showReportForm();
+ }
+
@Override
public void onClick(View v)
{
@@ -693,6 +699,9 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
case R.id.ll__place_editor:
showEditor();
break;
+ case R.id.ll__report_problem:
+ showReportForm();
+ break;
case R.id.iv__bookmark_color:
saveBookmarkNameIfUpdated();
selectBookmarkColor();