首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
首页标签drawable

#drawable

如何在InfoWindow上将drawable作为背景?

游王子讴歌灬简单而丰富
试试如下代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#80000000" android:orientation="vertical"> <ImageView android:src="@drawable/ic_launcher" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dp"/> </LinearLayout> </LinearLayout> googleMap.setInfoWindowAdapter(new InfoWindowAdapter() { public View getInfoWindow(Marker arg0) { View v = getLayoutInflater().inflate(R.layout.custom_infowindow, null); return v; } public View getInfoContents(Marker arg0) { return null; } });... 展开详请
领券