val currentVisibleItemPx = dpToPxSize(40) vpMyRoute.addItemDecoration(object : RecyclerView.ItemDecoration() { override fun getItemOffsets( outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State ) { outRect.right = currentVisibleItemPx outRect.left = currentVisibleItemPx } }) val nextVisibleItemPx = dpToPxSize(20) val pageTranslationX = nextVisibleItemPx + currentVisibleItemP..
아래 블로그 참조 https://itandhumanities.tistory.com/27 [코틀린을 다루는 기술] Kotlin에서의 재귀 함수 사용 이 글은 '길벗'사의 '코틀린을 다루는 기술'을 보고 작성한 글입니다. 더 자세한 내용은 해당 책에서 참고하시면 좋을 것 같습니다. 재귀와 공재귀, 꼬리 호출 만약, 팩토리얼 함수를 구현하다고 itandhumanities.tistory.com 재귀함수를 알아보기 전에 팩토리얼 함수를 알아보자 . 팩토리얼 함수란 특정값에서 1까지 모두 곱하는 연산을 의미한다. 예를들어 특정함수가 10 이라고 한다면 10x9x8x7x6x5x4x3x2x1 의 값을 구하는 것을 의미한다. private fun factorial(n: Int): Long { return if (n ==..
완전 탐색 알고리즘은 모든 가능한 경우의 수를 탐색해서 최적의 결과를 찾는 알고리즘이다. 종류로는 아래와 같은 것 들이 있다. -브루트포스 -재귀함수 -비트마스크 -백트래킹 -순역 -DFS / BFS 아래의 블로그에 자세히 나와있다. https://hongjw1938.tistory.com/78 알고리즘 - 완전탐색(Exhaustive Search) 1. 완전탐색 알고리즘이란? 완전탐색은 간단히 가능한 모든 경우의 수를 다 체크해서 정답을 찾는 방법이다. 즉, 무식하게 가능한 거 다 해보겠다는 방법을 의미한다. 이 방법은 무식하게 한다는 hongjw1938.tistory.com ① Brute Force 기법 - 반복 / 조건문을 활용해 모두 테스트하는 방법 ② 순열(Permutation) - n개의 원소 ..

Meterial Design 사이트 https://m2.material.io/components/bottom-navigation/android#using-bottom-navigation Material Design Build beautiful, usable products faster. Material Design is an adaptable system—backed by open-source code—that helps teams build high quality digital experiences. m3.material.io // bottomNavigation = 객체 id 값 var badge = bottomNavigation.getOrCreateBadge(menuItemId) // menuItem..
뷰 화면을 캡쳐해서 이미지 뷰에 넣어보는 기능을 추가할 때 사용하는 코드이다. 간단한 레이아웃 만들기. 캡쳐 기능 메소드 및 사용 코드. (canvas 를 사용.) binding.captureScreenShot.setOnClickListener { capture() } private fun capture() { val now = SimpleDateFormat("yyyyMMdd_hhmmss").format(Date(System.currentTimeMillis())) val mPath = cacheDir.absolutePath + "/$now.jpg" var bitmap: Bitmap? = null val captureView = binding.captureScreenShot //캡처할 뷰 bitmap = ..
TextWatcher 를 Utils로 만들어서 따로 관리를 해줄 수 있다. (리사이클러뷰에서 사용해야 할 때 등등 ) https://onlyfor-me-blog.tistory.com/530 [Android] TextWatcher를 공통 클래스로 만드는 방법 앱을 만들면서 editText를 다룰 때 제법 많이 사용하는 것이 TextWatcher라는 인터페이스다. 이것에 대한 설명은 아래 포스팅을 참고하거나 다른 블로그를 먼저 보고 오는 걸 추천한다. https://onlyfor-me- onlyfor-me-blog.tistory.com 위의 블로그에 잘 나와있다. class CommonTextWatcher( private val afterChanged: ((Editable?) -> Unit) = {}, pr..
- Total
- Today
- Yesterday
- listener
- FCM
- API
- direction
- ios
- error
- node.js
- message
- Token
- ScrollView
- 알고리즘
- retrofit
- GitHub
- Hilt
- Kotlin
- 코딩테스트
- bitmap
- Firebase
- 재귀함수
- app bundle
- ec2
- android
- Custom
- ExoPlayer
- https
- java
- Flutter
- Crop
- Android Studio
- flutter_new_badger
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |