본문 바로가기
반응형

Android23

구글맵 맵상에서 거리구하기 지구는 둥구니까 지도상에서 거리구하는것이 아주 복잡하다. Area(GeoPoint c,GeoPoint r) { this.c = c; this.r= r; Location lc = new Location("gps"); lc.setLatitude(c.getLatitudeE6()/1E6); lc.setLongitude(c.getLongitudeE6()/1E6); Location lr = new Location("gps"); lr.setLatitude(r.getLatitudeE6()/1E6); lr.setLongitude(r.getLongitudeE6()/1E6); radius = lc.distanceTo(lr); } distanceTo함수를 사용하면 미터 단위로 값이 나오게된다. 그런데 구글맵에서는 확대 축소가.. 2010. 11. 24.
failed to find provider info for settings 확인 1. debug.keystore를 사용해 md5를 받고 apikey를 다시 받는다. keytool.exe -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android (arg들을 똑같이 써준다) apikey를 받는다. http://code.google.com/android/maps-api-signup.html 2. lib과 permission 확인 3. 프로젝트를 clean하고 다시 생성 2010. 11. 17.
PopupWindow : BackKey 나 BackGround touch로 dismiss시키기 PopupWindow를 제거를 하려고하면 밖에를 터치해도 backkey를 눌러도 반응이없다. KeyEvent로 받으려고 해도 받아지지가 않는다. popupview = View.inflate(this, R.layout.dialog_popup, null); popup = new PopupWindow(popupview,200,100,true); popup.setOutsideTouchable(true); popup.setBackgroundDrawable(new BitmapDrawable()) ; This is because the popup window does not respond to onTouchr onKey events unless it t has a background that != null. Chec.. 2010. 11. 7.