Since Arabic and Hebrew create problems, but not in English and Russian, I'm going to assume that something is broken in the implementation of the default info window regarding languages ββfrom right to left (RTL). In particular, if you run tests on Android 4.2, it is possible that the contents of the default info window content in Maps V2 incorrectly applied various RTL attributes.
Fortunately, you can provide your own content in the info window by executing the InfoWindowAdapter and having getInfoContents() return the View you want to use in the info window.
For example, this sample project (from tomorrow's update to my book) shows how to set up an info window using this InfoWindowAdapter :
class PopupAdapter implements InfoWindowAdapter { LayoutInflater inflater=null; PopupAdapter(LayoutInflater inflater) { this.inflater=inflater; } @Override public View getInfoWindow(Marker marker) { return(null); } @Override public View getInfoContents(Marker marker) { View popup=inflater.inflate(R.layout.popup, null); TextView tv=(TextView)popup.findViewById(R.id.title); tv.setText(marker.getTitle()); tv=(TextView)popup.findViewById(R.id.snippet); tv.setText(marker.getSnippet()); return(popup); } }
If you want to replace the entire window, you must have getInfoWindow() to return a View . If getInfoWindow() returns null , getInfoContents() used for the contents of the window. Then you attach the InfoWindowAdapter instance via setInfoWindowAdapter() to the GoogleMap .
In your case, you can use your own layout to make sure that you are using RTL correctly. This should basically solve this problem. It is possible that Maps V2 is doing something weird that breaks the RTL code, which normally should work, in which case you need to create a file .
CommonsWare
source share