在没有重复值的实时数据库上添加值

时间:2018-02-22 12:50:56

标签: android firebase firebase-realtime-database

我为用户进行了私聊,想要阅读我与他们聊天的所有用户的列表,所以我在列表中添加了用户,但它重复了用户: -

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
    <shape>
        <solid android:color="@color/colorAccent" />
    </shape>
</item>
<item android:state_checked="true">
    <shape>
        <solid android:color="@color/colorAccent" />
    </shape>
</item>
<item  android:state_focused="true">
    <shape>
        <solid android:color="@color/colorAccent" />
    </shape>
</item>
<item android:state_activated="true">
    <shape>
        <solid android:color="@color/colorAccent" />
    </shape>
</item>
<item>
<shape>
    <solid android:color="@color/bg_land" />
</shape>
</item>
</selector>

0 个答案:

没有答案