[android] Add "Report a bug" button to main menu

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This commit is contained in:
Roman Tsisyk 2021-08-15 20:25:01 +03:00
parent 629782ceeb
commit aa02e3d81a
5 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group
android:pivotX="12"
android:pivotY="12"
android:scaleX="0.65"
android:scaleY="0.65">
<path
android:fillColor="#000000"
android:pathData="M12,5.99L19.53,19L4.47,19L12,5.99M12,2L1,21h22L12,2zM13,16h-2v2h2v-2zM13,10h-2v4h2v-4z" />
</group>
</vector>

View file

@ -68,6 +68,12 @@
android:drawableStart="@drawable/ic_menu_settings"
android:text="@string/settings"
tools:background="#20FF0000" />
<TextView
android:id="@+id/report"
style="@style/MwmTheme.Menu.Content.ListItem"
android:drawableStart="@drawable/ic_menu_report"
android:text="@string/report_a_bug"
tools:background="#20FF0000" />
<TextView
android:id="@+id/share"
style="@style/MwmTheme.Menu.Content.ListItem"

View file

@ -2209,6 +2209,12 @@ public class MwmActivity extends BaseMwmFragmentActivity
closeMenu(MwmActivity.this::shareMyLocation);
}
@Override
public void onReportOptionSelected()
{
closeMenu(() -> Utils.sendFeedback(getActivity()));
}
@Override
public void onSubwayLayerOptionSelected()
{

View file

@ -6,6 +6,7 @@ public interface MainMenuOptionListener
void onDownloadMapsOptionSelected();
void onSettingsOptionSelected();
void onShareLocationOptionSelected();
void onReportOptionSelected();
void onSubwayLayerOptionSelected();
void onTrafficLayerOptionSelected();
void onIsolinesLayerOptionSelected();

View file

@ -83,6 +83,9 @@ public class MainMenuRenderer implements MenuRenderer
TextView share = view.findViewById(R.id.share);
share.setOnClickListener(v -> mListener.onShareLocationOptionSelected());
Graphics.tint(share);
TextView report = view.findViewById(R.id.report);
report.setOnClickListener(v -> mListener.onReportOptionSelected());
Graphics.tint(report);
}
private void initLayersRecycler(@NonNull View view)