뷰 화면을 캡쳐해서 이미지 뷰에 넣어보는 기능을 추가할 때 사용하는 코드이다. 간단한 레이아웃 만들기. 캡쳐 기능 메소드 및 사용 코드. (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..
TextInputLayout 을 사용해야 할 때 코드입니다. 기본 코드 TextInputLayout 테두리 색상변경 parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" 이 부분 중요합니다. selector (selector_color) 추가 // editText 에 입력할 수 있을 때 // focused 와 똑같은 역할 (맴돌다 라는 뜻) // 터치나 클릭 이벤트를 사용할 수 있을 때 // 기본 색상 Radius 추가 Error 메세지 사용할 시 Hint 설정 (true 로 설정할 시 테두리 안에 힌트가 들어감. false 선택시 안들어가게 설정 ) false TextInputLayout 전체 코드
- Total
- Today
- Yesterday
- Flutter
- GitHub
- ScrollView
- Firebase
- flutter_new_badger
- API
- Custom
- listener
- Token
- retrofit
- ExoPlayer
- Hilt
- Android Studio
- android
- ec2
- FCM
- node.js
- 코딩테스트
- https
- app bundle
- Crop
- message
- error
- direction
- bitmap
- 재귀함수
- java
- ios
- 알고리즘
- Kotlin
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |