GOOGLE Place Api: how to add more place names against single place by google place actions -
how add 1 place name primary in english , different names on different languages same place google place actions. primary or not primary on different languages. or google same us.
thanks.
you can make own windowadapter marker has 2 line of name (for example)
here myinfowindowadapter
public class myinfowindowadapter implements infowindowadapter { private final view mview; public myinfowindowadapter(activity activity) { mview = activity.getlayoutinflater().inflate(r.layout.custom_info_window, null); } @override public view getinfocontents(marker marker) { string title = marker.gettitle(); final string snippet = marker.getsnippet(); final textview titleui1 = (textview) mview.findviewbyid(r.id.title); final textview titleui2 = (textview) mview.findviewbyid(r.id.title2); titleui1.settext(title); titleui2.settext("second name"); return mview; } @override public view getinfowindow(marker marker) { return null; } } the custom_info_window:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" > <textview android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:ellipsize="end" android:paddingbottom="@dimen/padding_small" android:singleline="true" android:textcolor="@color/map_info_title" android:textsize="@dimen/map_info_window_text" android:textstyle="bold" /> <textview android:id="@+id/title2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:ellipsize="end" android:paddingbottom="@dimen/padding_small" android:singleline="true" android:textcolor="@color/map_info_title" android:textsize="@dimen/map_info_window_text" android:textstyle="bold" /> <textview android:id="@+id/snippet" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="@color/map_info_snippet" android:textsize="@dimen/map_info_window_text" /> </linearlayout> on mapfragment, add @ oncreate
mmap.setinfowindowadapter(new myinfowindowadapter(getactivity()));
Comments
Post a Comment