android - 谷歌地图信息窗口背景不适用于边框
问题描述
我的自定义信息窗口有问题。我所做的只是将背景设置为@color/wallet_holo_blue_light。这是我的 xml 和 java 自定义窗口的源代码:
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/wallet_holo_blue_light"
>
private Context context;
public CustomInfoWindowAdapter(Context ctx){
context = ctx;
}
@Override
public View getInfoWindow(Marker marker) {
return null;
}
@Override
public View getInfoContents(Marker marker) {
View view = ((Activity)context).getLayoutInflater()
.inflate(R.layout.custom_info_window, null);
TextView name_tv = view.findViewById(R.id.windowinfo_title);
TextView adress = view.findViewById(R.id.windowinfo_adress);
TextView infotext = view.findViewById(R.id.windowinfo_text);
name_tv.setText(marker.getTitle());
adress.setText(marker.getSnippet());
return view;
}
我想找到一种方法也将边框和小底箭头设置为相同的颜色。
提前致谢 !
解决方案
推荐阅读
- python - 如何在目录中搜索文件满足条件?
- javascript - 如何为回调函数设置默认值?
- reporting-services - SSRS 数据返回但未在 Tablix 中显示
- javascript - 从没有方法的字符(for循环)javascript创建一个字符串
- ios - 在 iOS 的 MapKit 中显示一张特定的国家地图
- typescript - 即使之前有检查,VSCode TypeScript Map get 仍然被认为是未定义的
- java - 用于执行 Java 控制台应用程序的 Bash 脚本
- excel - 比较单元格中逗号分隔的字母数字字符
- java - 我的 spring-boot 程序在属性中没有 JavaBuilder
- android - 突然在下载 maven-metadata.xml Android Studio 时构建卡住了