Firebase时间戳作为自定义键

时间:2018-06-16 14:31:01

标签: java android firebase firebase-realtime-database

有人可以帮助我,我如何从firebase获取时间戳密钥以将它们作为密钥放在Map<String, Marker> markers = new HashMap();上 这是我的架构

enter image description here

1 个答案:

答案 0 :(得分:0)

这应该是解决这个问题的方法

<Page class="page" navigatingTo="onNavigatingTo" 
    xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">

    <StackLayout class="p-5">
        <ScrollView>
            <StackLayout orientation="vertical">
                <GridLayout rows="*, *" columns="50%,40%,10%" width="100%" backgroundColor="#888">
                    <Label text="option" class="h2 m-y-auto" width="100%" textWrap="true" row="0" col="0" backgroundColor="#f00" />
                    <Label text="value" class="h2 text-primary m-y-auto" width="100%" row="0" col="1" backgroundColor="#0f0" />
                    <Button text="U" tap="{{openData}}" class="btn btn-primary btn-active p-0 m-0" width="100%" row="0" col="2" backgroundColor="#00f" />
                    <Button text="D" tap="{{openData}}" class="btn btn-primary btn-active p-0 m-0" width="100%" row="1" col="2" backgroundColor="#ff0" />
                </GridLayout>

            </StackLayout>
        </ScrollView>
    </StackLayout>
</Page>