핀수로그
728x90
반응형
  • 게시글 대표 이미지 썸네일 주소
    [ pinslog/Log.daily() ]
    [Android] EditText 바깥 영역 터치 시 키보드를 숨기기
    2023-10-25 22:16:00
    Kotlin override fun dispatchTouchEvent(ev: MotionEvent?): Boolean { val currentFocusView: View? = currentFocus if (currentFocusView != null && (ev?.action == MotionEvent.ACTION_UP) || ev?.action == MotionEvent.ACTION_MOVE && currentFocusView is EditText && currentFocusView.javaClass.name.startsWith("android.webkit.")) { val scored = IntArray(2) currentFocusView.getLocationOnScreen(scored) val x:..
  • [ pinslog/Log.daily() ]
    [Kotlin] 함수 탈출하기
    2023-10-21 17:35:23
    지난 글에서 반복문을 탈출한 것 처럼 함수도 탈출할 수가 있다. 우린 그걸 return 이라고 부르지... 마찬가지로 함수에도 라벨을 지정할 수 있을까? val human = Human("홍길동", "1995-01-01", Hobby("골프", "운동")) human.hobby?.let { hobby -> if (hobby.type == "운동") { println("${human.name}(은/는) ${hobby.name}(을/를) 즐겨한다.") } println("${human.name}의 취미는 ${hobby.name}이다.") } println("${human.name}(은/는) ${human.birth}에 태어났다.") // 홍길동(은/는) 골프(을/를) 즐겨한다. // 홍길동의 취미는 골프이다..
  • 게시글 대표 이미지 썸네일 주소
    [ pinslog/Log.daily() ]
    튼튼한 집 짓기
    2023-10-19 02:26:17
    튼튼한 집을 지으려면...자재가 좋아야된다... 벽돌부터 단단해야 될 듯 예전에 짠 알고리즘 너무 엉망이라서 수정하는데 메소드 하나하나에 문제가 숨어 있었다. 이래서 유닛 테스트를 하는구나 하나씩 고쳐나가면서 점점 나아지는 것이 보였지만 처음부터 제대로 짰다면 이럴 일이 줄었겠죠 역시 부딪혀봐야 아픈줄 알고 예방이 필요한 법을 알게되나보다 좋은 경험이었다!
  • 게시글 대표 이미지 썸네일 주소
    [ pinslog/Log.daily() ]
    [Android] compileSdk 32 to 33 issue
    2023-10-18 23:07:37
    플레이스토어에 업로드 할 것이기 때문에 WW의 타겟버전을 32에서 33으로 변경했다. 그러자 아래와 같은 오류가 발생하였음 We recommend using a newer Android Gradle plugin to use compileSdk = 33 This Android Gradle plugin (7.2.1) was tested up to compileSdk = 32 This warning can be suppressed by adding android.suppressUnsupportedCompileSdk=33 to this project's gradle.properties. The build will continue, but you are strongly encouraged to update you..
  • 게시글 대표 이미지 썸네일 주소
    [ pinslog/Log.daily() ]
    [Kotlin] 반복문 탈출하기
    2023-10-17 21:07:04
    for (i in prevLinkIndex until linkList.size - 1) { val link = linkList[i] link.forEach { segment -> if (isLocationOnPath(candidate.latLng, listOf(segment.start, segment.end), 5.0)) { // 후보 값이 존재하는 선분을 찾으면 distance += segment.start.distanceTo(candidate.latLng) break } else { distance += segment.start.distanceTo(segment.end) } } } 중첩된 반복문에서 특정 조건을 만족할 경우 반복문 전체를 탈출하려고 할 때, 다음과 같이 코드를 작성하면 break 부분..
  • 게시글 대표 이미지 썸네일 주소
    [ pinslog/Log.daily() ]
    [Android] 디버그 가능 APK 또는 Android App Bundle을 업로드했습니다. 보안상의 이유로 Google Play에 게시하기 전에 디버그를 사용 중지해야 합니다.
    2023-10-16 21:55:14
    앱 출시 과정 중 debuggable을 false로 지정해야하는 것은 익히 알고 있어서 처리를 해두고 build.gradle(:app) buildTypes { ... release { ... debuggable false ... } } aab를 업로드했는데 계속해서 디버그 가능 APK 또는 Android App Bundle을 업로드했습니다. 보안상의 이유로 Google Play에 게시하기 전에 디버그를 사용 중지해야 합니다. 문구가 뜨며 업로드가 안되는 것이다. 아 도대체 뭐지 하고 별 짓을 다하다가 깨달았다. manifest....! AndroidMenifest.xml
728x90
반응형