본문 바로가기

전체 글311

Android] Preference 구분선 넣기 app:allowDividerAbove="true" app:allowDividerBelow="true" 위 pref에는 allowDividerBelow 아래 pref에는 allowDividerAbove 넣어준다. How to manage dividers in a PreferenceFragment? I started dealing with preferences in a PreferenceFragment. Here's what I have: I'm trying to: get rid of the dividers between items. I suppose this can be defined from styles, but I can't figure... stackoverflow.com Note, a divide.. 2022. 9. 5.
Kotlin] 문자열합치기 joinToString https://kkh0977.tistory.com/682 53. (kotlin/코틀린) joinToString 사용해서 배열 데이터 출력 형식 변경 실시 - arrayOf , ArrayList /* =========================== */ [개발 환경 설정] ​ 개발 툴 : Eclipse 개발 언어 : kotlin /* =========================== */ ​ /* =========================== */ [소스 코드] package ex1 //===== [코.. kkh0977.tistory.com https://themach.tistory.com/188 [Kotlin 기초] String 배열을 String으로 합치기 String Array로 형성한 데이터를.. 2022. 6. 20.
Android] Targeting s+ (version 31 and above) requires that one of flag_immutable or flag_mutable 대응 / 안드로이드 12 https://developer.android.com/about/versions/12/behavior-changes-12?hl=ko 동작 변경사항: Android 12를 타겟팅하는 앱 | Android Developers Android 12를 타겟팅하는 앱에 영향을 주는 Android 12의 변경사항을 알아봅니다. developer.android.com 0 대신 PendingIntent.FLAG_MUTABLE를 추가한다. val pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_MUTABLE) https://onedaycodeing.tistory.com/159 안드로이드 12 PendingIntent 이슈 및 대응 .. 2022. 6. 16.
Android] Retrofit2로 데이터받아오기 Retrofit : Retrofit is a REST Client for Java and Android Retrofit uses the OkHttp library for HTTP requests. Retrofit쓰는 이유 Http개발을 빠르고 쉽게한다 통신 속도가 빠르다 . Json 구조의 데이터를 쉽게 가져올 수 있다. >> 서버와 통신하기 위한 라이브러리로 사용하면 서버와 통신 작업이 편해진다. 사용법 1. 라이브러리 추가 2. 권한 설정 >> 인터넷 권한 3. 데이터 모델 클라스 생성 >> @SerialzedName JSON으로 serialize 될 때 매칭되는 이름을 명시하는 목적으로 사용 @Expose object 중 해당 값이 null일 경우, json으로 만들 필드를 자동 생략해 준다. 4... 2022. 5. 16.
Android Studio] Api 키 숨기기 #gitIgnore API키 같은 중요 정보는 Git에 올리기 조심스럽다. 그래서 gitIgnore를 사용한다 gitIgnore에는 local.properties가 자동으로 들어가있다. local.properties서 api키를 추가해준다 Properties properties = new Properties() properties.load(project.rootProject.file('local.properties').newDataInputStream()) android { defaultConfig { ... buildConfigField "String", "API_KEY", properties["api_key"] } app 수준 gradle에 properties 정의해주고 buildConfigField에도 api키를 적어.. 2022. 5. 11.
Android] 키보드 보이기 숨기기 #windowSoftInputMode Activity 실행시 키보드가 바로 나타나게 하고 싶었다. manifest에서 해당 activity의 windowSoftInputMode 설정하면 끝. android:windowSoftInputMode="stateVisible" adjustUnspecified, adjustNothing도 가능하다. editText도 같은 방식으로 적용가능하다. 하지만 text가 여러개 있을때는 focus에 대한 설정이 따로 있어야할거 같다. 역시 문서에 친절하게 나와있다. Android 개발자 | Android Developers 애플리케이션의 시각적 사용자 인터페이스 일부를 구현하는 활동(Activity 서브클래스)을 선언합니다. 모든 활동은 매니페스트 파일의 {@code} 요소로 나타내야 합니다. 여기에 선언되지 .. 2022. 5. 5.