편집 기록

편집 기록
  • 프로필 알 수 없는 사용자님의 편집
    날짜2018.06.21

    안드로이드에서 Object 타입의자료를 List 로 변환하는 것이 궁금합니다


    제가 google firebase database 에서 값을 getvalue 로 가져오는데요. setvalue 로 저장할때 list 였던 자료가 저장하면 Object 타입으로 되있더라구요 getValue 로 불러오는데 Object 인 자료를 다시 List 타입으로 바꿔야 하는데 그걸 못하겠어요 ㅜㅜ

    Object 인 타입 안에 들어있던 Double 형 자료 2개랑 String 자료를 뽑아내고 싶은데.. 그걸 못해서 고민중입니다.. 부탁드려요...

    이게 저장할 클래스이구요

    ///////////////////////

    package com.eum.ssrgo;

    import com.google.firebase.database.IgnoreExtraProperties;

    /**

    • Created by KHR on 2016-10-19. */ @IgnoreExtraProperties public class GetRidingList {

      public Double latitude; public Double longitude; public String time;

      public Double getlatitude(){ return latitude; }

      public Double getlongitude(){ return longitude; }

      public String gettime(){ return time; }

      public GetRidingList(Double latitude, Double longitude) { this.latitude = latitude; this.longitude = longitude;

      }

      public GetRidingList(Double latitude, Double longitude, String time) { this.latitude = latitude; this.longitude = longitude; this.time = time; }

    } ////////////////////////////////////

    메인엑티비티에서 어떻게 써야하는지를 모르겠어서 다시 글을 남깁니다. 부탁드려요 ㅜㅜ