본문 바로가기

개발일지

검색하기
개발일지
프로필사진 강태종

  • Programming (프로그래밍) (212)
    • Android (안드로이드) (99)
      • RecyclerView (14)
      • Room (7)
      • Databinding (6)
      • CoordinatorLayout (4)
      • Lifecycle (5)
      • HTTP (4)
      • Hilt (4)
      • Navigation (5)
      • View (8)
      • OAuth (4)
      • Paging (4)
      • Notification (5)
      • GestureLayout (0)
      • Widget (2)
    • 삽질 (18)
    • Algorithm (알고리즘) (34)
    • Kotlin (코틀린) (38)
    • Computer Science (4)
    • Design Pattern (디자인 패턴) (5)
    • Problem Solving (6)
    • Database (3)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
  • 안드로이드
  • Algorithm
  • 코틀린
  • HTTP
  • hilt
  • lifecycle
  • CollapsingToolbarLayout
  • AppBarLayout
  • ViewModel
  • Navigation
  • LiveData
  • room
  • kotlin
  • recyclerview
  • CustomView
  • 알림
  • notification
  • DataBinding
  • 백준
  • View
  • onLayout
  • Android
  • onMeasure
  • activity
  • BOJ
  • CoordinatorLayout
  • Coroutine
  • sqlite
  • Behavior
  • 알고리즘
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Number (1)

개발일지

삽질 - Gson Conver Int to Double

Gson을 사용하여 Number Type을 변경할 때 Int형을 Double로 자동으로 변경하는 경우가 있다. Gson은 Number Type을 기본으로 Double로 변경하기 때문인데 TypeToken을 통해 Type을 지정해주자! Gson().fromJson(json, object : TypeToken() {}.type)

삽질 2021. 9. 30. 13:36
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바