小编Vin*_*DSL的帖子

在google maps api v2中更改标记的InfoWindow视图的边距颜色

您好我尝试将(白色)的默认颜色更改为黑色,这在google maps api v2中,有谁知道我怎么做到这一点?

PD:是infowindow的边际

我的问题的大纲

这是我的代码,我更改了infowindow的内容,但需要更改边距:S

 GoogleMap map = ....
    map.setInfoWindowAdapter(new InfoWindowAdapter() {

            @Override
            public View getInfoContents(Marker marker) {
                View v = getLayoutInflater().inflate(   
                        R.layout.info_window_layout, null);
                v.setBackgroundColor(Color.BLACK);
                return v;
            }
        });
Run Code Online (Sandbox Code Playgroud)

谢谢你的答复

android google-maps infowindow google-maps-markers

9
推荐指数
2
解决办法
6153
查看次数

可以在样式上使用xmlns来定义cardView转角半径吗?

我想做这样的事情:

<style name="cardViewInfo">
    <item name="android:layout_marginLeft">@dimen/small_padding_card_view</item>
    <item name="android:layout_marginRight">@dimen/small_padding_card_view</item>
    <item name="android:layout_marginBottom">@dimen/small_padding_card_view</item>
    <item name="android:layout_marginTop">@dimen/large_padding_card_view</item>
    <item name="card_view:cardCornerRadius">2dp</item>
</style>
Run Code Online (Sandbox Code Playgroud)

但是我的名字card_view有问题没有定义,我的问题是我是否可以在布局上使用这个命名空间:

xmlns:card_view="http://schemas.android.com/apk/res-auto"
Run Code Online (Sandbox Code Playgroud)

最好的祝福.

xml android android-styles android-cardview

7
推荐指数
1
解决办法
794
查看次数

Android Firebase查询

我有这个结构 在此输入图像描述 现在,我正在进行这样的查询:

 DatabaseReference myRef = database.getReference("users");
        myRef.equalTo("6991580","ci").addListenerForSingleValueEvent(new ...
Run Code Online (Sandbox Code Playgroud)

我期待第二个节点的结果..然后我得到:

DataSnapshot {key = users,value = null}

那么,这个查询有什么问题?或者我做错了什么?

致以最诚挚的问候和感谢.

android firebase firebase-realtime-database

7
推荐指数
1
解决办法
1万
查看次数