[android] poi name in wikipedia page header

Signed-off-by: Harry Bond <hrbond@pm.me>
This commit is contained in:
Harry Bond 2024-02-10 00:19:27 +00:00 committed by Viktor Govako
parent 586a8ff78a
commit e5a852f680
2 changed files with 13 additions and 3 deletions

View file

@ -10,16 +10,26 @@ import app.organicmaps.base.BaseToolbarActivity;
public class PlaceDescriptionActivity extends BaseToolbarActivity
{
private static final String EXTRA_TITLE = "title";
@Override
protected Class<? extends Fragment> getFragmentClass()
{
return PlaceDescriptionFragment.class;
}
public static void start(@NonNull Context context, @NonNull String description)
public static void start(@NonNull Context context, @NonNull String title, @NonNull String description)
{
Intent intent = new Intent(context, PlaceDescriptionActivity.class)
.putExtra(PlaceDescriptionFragment.EXTRA_DESCRIPTION, description);
.putExtra(PlaceDescriptionFragment.EXTRA_DESCRIPTION, description)
.putExtra(EXTRA_TITLE, title);
context.startActivity(intent);
}
@Override
protected void onStart() {
super.onStart();
String toolbarTitle = getIntent().getStringExtra(EXTRA_TITLE);
this.getToolbar().setTitle(toolbarTitle);
}
}

View file

@ -63,7 +63,7 @@ public class PlacePageWikipediaFragment extends Fragment implements Observer<Map
private void showDescriptionScreen()
{
PlaceDescriptionActivity.start(requireContext(), mMapObject.getDescription());
PlaceDescriptionActivity.start(requireContext(), mMapObject.getName(), mMapObject.getDescription());
}
private Spanned getShortDescription()