コード例 #1
0
ファイル: POIMapLayer.java プロジェクト: rogere66/Osmand
 private StringBuilder buildPoiInformation(StringBuilder res, Amenity n) {
   String format =
       OsmAndFormatter.getPoiSimpleFormat(
           n, view.getContext(), view.getSettings().USE_ENGLISH_NAMES.get());
   res.append(" " + format);
   if (n.getOpeningHours() != null) {
     res.append("\n")
         .append(view.getContext().getString(R.string.opening_hours))
         .append(" : ")
         .append(n.getOpeningHours()); // $NON-NLS-1$ //$NON-NLS-2$
   }
   if (n.getPhone() != null) {
     res.append("\n")
         .append(view.getContext().getString(R.string.phone))
         .append(" : ")
         .append(n.getPhone()); // $NON-NLS-1$ //$NON-NLS-2$
   }
   if (n.getSite() != null && n.getType() != AmenityType.OSMWIKI) {
     res.append("\n")
         .append(view.getContext().getString(R.string.website))
         .append(" : ")
         .append(n.getSite()); // $NON-NLS-1$ //$NON-NLS-2$
   }
   return res;
 }
コード例 #2
0
ファイル: POIMapLayer.java プロジェクト: rogere66/Osmand
 private void showDescriptionDialog(Amenity a) {
   Builder bs = new AlertDialog.Builder(view.getContext());
   bs.setTitle(
       OsmAndFormatter.getPoiSimpleFormat(
           a, view.getContext(), view.getSettings().USE_ENGLISH_NAMES.get()));
   bs.setMessage(a.getDescription());
   bs.show();
 }