전체 글 528

Flutter - PackageInfo

PackageInfo Flutter 에서 앱의 버전 정보를 얻어오기 우해서 PackageInfo 를 얻으려 한다면 Plus Plugins 의 라이브러리를 추가해야한다. pubspec.yaml 에서 필요한 라이브러리만 추가하면 된다. 1. 라이브러리를 디펜던시에 추가한다. dependencies: flutter: sdk: flutter battery_plus: "^2.0.1" connectivity_plus: "^2.0.2" device_info_plus: "^3.1.0" network_info_plus: "^2.0.2" package_info_plus: "^1.3.0" sensors_plus: "^1.2.1" share_plus: "^3.0.4" android_alarm_manager_plus: "^2...

Dev/Flutter 2021.11.09

Mac Path 경로 설정

* 터미널 설정에 따라서 bash_profile or zshrc 에 경로 설정을 해야한다. 필자와 같이 터미널이 zsh 로 기본 으로 되어 있다면 bash_profile 을 할 경우에는 매번 source ~/.bash_profile 처리를 해야하기 때문에 zshrc 로 처리하는게 편할 것이다. bash_profile 과 zshrc 의 차이 설명 링크 1. open (1) bash_profile 열기 (새 창으로 뜬다) open -e ~/.bash_profile or open -e ~/.zshrc (2) bash_profile 에서 경로 추가 export PATH=$PATH:{플러터 폴더 경로}/bin 필자의 경우 export PATH=$PATH:/Users/hoon/flutter/bin (3) 변경된 b..

Dev/Mac모닝 2021.11.03

Android Gradle 빌드파일 - build.gradle.kts 참고

Android KTS 로 작성된 적용한 Gradle 빌드 파일 - build.gradle 파일 참고 https://github.com/google/iosched/blob/main/mobile/build.gradle.kts google/iosched The Google I/O Android App. Contribute to google/iosched development by creating an account on GitHub. github.com /* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complian..

Dev/Android 2021.07.13

AndroidX 로 바뀌면서 Activity, Fragment 에 유용한 작업 기능

참고 한 Medium 글 How AndroidX changes the way we work with Activities and Fragments Over the last couple of months, many improvements to the Activity/Fragment APIs have been introduced via the AndroidX packages. medium.com 1. Fragment 에서 OnBackPressed 관리 class MyFragment : Fragment() { override fun onAttach(context: Context) { super.onAttach(context) val callback = object : OnBackPressedCallback(tr..

Dev/Android 2021.06.29

이슈 리포팅 - 파프리카케어 이슈 리포팅

홈화면 상단 배너 이슈 - 상단 배너내의 순위대로 롤링되면서 변경되는 텍스트가 조금씩 올라가는 현상 - 배너 내의 롤링되는 텍스트의 마지막 위치의 텍스트(오늘 하루 가낭 많이 등록된 질병은? 5위 불안장애)가 바뀌자마자 바로 제일 처음 텍스트(1위)로 바뀌는 이슈 테스트 환경 디바이스 : Android Emulator - Pixel 4 화면 : 1080x2280: 440dpi OS : Android R (API 30) ps. 하.. 이놈의 오지랖.... 복약관련 기능 레퍼런스 참고하려다가... 자꾸 눈에 밟혀서.. 기어이 이슈 리포팅까지...

관심 2021.05.31

XML 에서 뷰모델을 활용해서 텍스트 변경, ViewModel Pattern

작업 설명 ViewModel 을 활용해서 XML 상에서 TextView 의 text attribute 를 변경하는 작업을 해볼 예정입니다. 1. 시나리오 복약정보를 나타내는 Dialog에서 Switch버튼에 따라서 특정 텍스트 변경하도록 처리 2. 해결 방법 처음에는 xml 에서만 처리하는 방법을 찾았는데 찾지 못했습니다. 그래서 Switch버튼의 checked 여부를 viewModel 에 전달해서 해당 정보를 xml 에 전달하도록 했다. ViewModel val switchMedication = ObservableField() ... fun updateSwitchMedication(isMedication: Boolean) { switchMedication.set(isMedication) } xml ....

Dev/Android 2021.05.18