일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Kotlin FCM
- OkHttp Interceptor
- 66챌린지
- Android DataBinding
- 안드로이드 카카오 로그인
- 안드로이드 갤러리 접근
- 안드로이드 fcm
- Android ProgressBar
- Android Jetpack
- 프로그래머스 알고리즘
- Android 12
- 습관만들기
- Android WebView
- Android
- 안드로이드
- Android ViewPager2
- 영어독립365
- WebView
- 카카오 알고리즘
- Android 12 대응
- 알고리즘 자바
- scope function
- MVP Architecture
- Kotlin
- Android Interceptor
- DataBinding
- 영어공부
- Java
- android recyclerview
- Android Navigation
- Today
- Total
목록분류 전체보기 (133)
Developer Geek
개요 상품의 이미지, 이름 그리고 가격들을 리스트로 뿌려준다. View Binding 을 사용한다. 실행 화면 프로젝트 구조 Code - Example product_item.xml layout\product_item.xml ProductModel.kt (DataClass) data class ProductModel( val id: Long, var thumbnail: Drawable, var title: String, var price: String, )ProductAdapter.kt (ListAdapter) class ProductAdapter : ListAdapter(diffUtil) { inner class ViewHolder(var binding: ProductItemBinding) : Recy..
개요 (실행화면, 간단한 앱 설명) RecyclerView를 이용하여 최상단과 하단에만 여백을 두려고 할 때가 있었다. 그래서 xml 파일에서 RecyclerView에 android:paddingVertical="10dp" 속성 값을 주었지만 스크롤 시 상단과 하단의 여백이 사라지지 않았다. 이를 해결하기 위해서 사용한 속성 값이 android:clipToPadding="false"이다. android:clipToPadding="false"를 속성값으로 지정해주면 스크롤 시 상단과 하단의 여백 없이 아이템들이 보여진다. Code - Example activity_main.xml 질문과 잘못된 점에 대해 말씀해주시는 건 언제나 환영입니다. zero5.two4@gmail.com
Retrofit Configuration Retrofit is the class through which your API interfaces are turned into callable objects. By default, Retrofit will give you sane defaults for your platform but it allows for customization. @Headers 아래와 같은 형식으로 요청에 필수적인 값들을 Header에 담을 수 있다. BookService.kt @Headers( "Key-1: Value-1", "Key-2: Value-2", ..., "Key-N: Value-N" ) @GET("/books") fun getBooks(): Call Programmatica..
개요 게시판에 글이 보여질 때, 내용이 많은 글에 대해서는 글줄임(...)을 통해 내용의 일부만 보여주고, 게시글 아이템의 높이를 일정하게 유지한다. 유기적으로 사용자가 내용 전체를 보고 일부만 볼 수 있도록, 글줄임(...) 설정 이벤트를 구현한다. 실행화면 프로젝트 구조(이미지) DataBinding을 사용함. Code [DataBinding 셋팅] build.gradle(:app) DataBinding 사용을 위해 gradle에 dataBinding { endabled true }를 추가한다. android { compileSdk 31 ... dataBinding{ enabled true } }[게시글 데이터] PostModel.kt data class PostModel( var id: Long, ..
개요 (실행화면, 간단한 앱 설명) 이슈 화면 RecyclerView를 공부한 중 EditText에 텍스트를 입력하고 저장 버튼을 눌렀을 때, 키보드가 닫히지 않는 불편함이 있었다. 해결 화면 해당 포커스를 갖는 EditText를 제외한 영역을 누르면 키보드가 내려가도록 했다. Code - Example MainActivity.kt 해당 Activity에서 dispatchTouchEvent() 함수를 오버라이드 해준다. override fun dispatchTouchEvent(ev: MotionEvent?): Boolean { val focusView = currentFocus if (focusView != null && ev != null) { val rect = Rect() focusView.getG..
실행화면 프로젝트 구조(이미지) Code - Example menu\bottom_navigation_menu.xml 하단 내비게이션에 들어갈 텍스트와 아이콘을 설정하기 위해 menu\bottom_navigation_menu.xml 파일을 만든다. 아래와 같이 res 디렉토리 안에서 Android Resource Directory 를 클릭하여 menu 디렉토리를 만들고, 해당 디렉토리에서 bottom_navigation_menu.xml 파일을 만든다. bottom_navigation_menu.xml activity_main.xml MainActivity의 Layout 파일에 와 프레그먼트가 들어갈 을 추가한다. activity_main.xml 만든 메뉴를 바텀 내비게이션에 적용하기 위해 app:menu="..
실행화면 프로젝트 구조 Code - Example activity_main.xml 공유하기 버튼 을 만든다. MainActivity.kt 공유하기 기능을 구현한다. class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) initShareButton() } private fun initShareButton() { val shareButton = findViewById(R.id.btnShare) shareButton.setOnClickListener { val s..
개요 - 실행화면 초기 셋팅(NCloud에 Application 등록) Android 앱에서 Naver Map 을 사용하기 위해서는 https://www.ncloud.com/product/applicationService/maps 에 접속하여 앱을 등록해야 한다. 로그인 후, 이용 신청하기 버튼을 클릭한다. 아래와 같은 페이지로 접속하게 된다. Application 등록 버튼을 클릭한다. 아래와 같은 페이지로 접속하게 된다. Application 이름 에는 앱 이름을 자유롭게 지어주면 된다.(ex. MyNaverMapExample) Service 선택 에서 Maps > Mobile Dynamic Map 을 체크한다. 서비스 환경 등록 에서 Android 앱 패기지 이름 에 작업하려는 프로젝트의 Packa..