본문 바로가기

IT/Android103

안드로이드 스튜디오] animateCamera, moveCamera 차이 What is the difference b/w animateCamera and moveCamera in google V2 maps? Hi guys while doing a sample project on android v2 maps for setting the current location. I came across couple of lines //what does this line do? mMap.moveCamera(CameraUpdateFactory.newLatLng(lat... stackoverflow.com animateCamera는 애니메이션 사용하기에 화면 전환이 부드럽고 moveCamera는 해당 화면으로 바로 이동. #animateCamera GoogleMap | Android용 Goog.. 2021. 2. 5.
안드로이드 스튜디오] 파일명이 빨간색으로 나타날 때 File → Settings → Version Control → - → Ok 2020. 12. 18.
Kotlin] 안드로이드 스튜디오 AsyncTask ProgressDialog inner class ReadTask : AsyncTask() { val asyncDialog : ProgressDialog = ProgressDialog(this@MainActivity) override fun onPreExecute() { ....... asyncDialog.setProgressStyle(ProgressDialog.BUTTON_POSITIVE) asyncDialog.setMessage("지도 초기화 중...") asyncDialog.show() } .... override fun onPostExecute(result: String?) { // 종료 asyncDialog.dismiss() } } Use ProgressBar instead.. #참고 https://android--exam.. 2020. 8. 17.
Kotlin] 안드로이드 스튜디오 // 좌표로 거리구하기 myLoc에서 targetLoc까지의 거리를 구한다. 반환값은 float로 단위는 m이다. // 좌표로 거리구하기 fun getDistance( lat1: Double, lng1:Double, lat2:Double, lng2:Double) : Float{ val myLoc = Location(LocationManager.NETWORK_PROVIDER) val targetLoc = Location(LocationManager.NETWORK_PROVIDER) myLoc.latitude= lat1 myLoc.longitude = lng1 targetLoc.latitude= lat2 targetLoc.longitude = lng2 return myLoc.distanceTo(targetLoc) } https://.. 2020. 8. 13.