1
我有經緯度和經度從谷歌AutoComplete片段到Realm DB的問題。我在文本視圖中獲取數據,但無法將此數據作爲Double傳遞給Realm DB。 horse.setLocationLatitude在境界谷歌地方的自動完成片段通過雙緯度/經緯DB
private void saveHorseInRealm() {
getRealm().beginTransaction();
Horse horse = getRealm().createObject(Horse.class);
Long tsLong = System.currentTimeMillis()/1000;
String ts = tsLong.toString();
horse.setID(ts);
horse.setName(mNameEditText.getText().toString());
horse.setLocationName(mLocationNam.getText().toString());
horse.setLocationLatitude(mLocationLat);
horse.setLocationLongitude(mLocationLon);
getRealm().commitTransaction();
getActivity().onBackPressed();
}
這是什麼版本的Realm? – EpicPandaForce