일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Firebase
- gradle
- firebase-database
- Flavors
- AWS
- Kotlin
- TIZEN
- cloud-firestore
- BottomSheetDialog
- socket.io
- Galaxy Watch
- mosquitto
- NoSuchMethodError
- ozd
- OZViewer
- Dva
- git-push
- 워치
- google-login
- mqtt
- firebase-storage
- ActivityResult-API
- hung-up
- Java8
- 오즈뷰어
- git
- Android
- socket-client
- JNI
- socket-server
- Today
- Total
목록Android (22)
Hyeyeon blog
if(imageView.drawable is BitmapDrawable) { val bitmap = (imageView.drawable as BitmapDrawable).bitmap } else { val drawable = binding.profileIv.drawable val bitmap = Bitmap.createBitmap(drawable.intrinsicWidth, drawable.intrinsicHeight, Bitmap.Config.ARGB_8888) }

최상단 Activity혹은 적용하려는 Activity에 추가 - Preview 화면의 색상은 변경 불가[참고] window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)

1. ObjectAnimator 사용을 위해 Java1.8 설정 // build.gradle(app) android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = "1.8" } } 2. Fade In (나타나는 효과) val fadeOut = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1f) fadeOut.duration = 1500 fadeOut.start() 3. Fade Out (사라지는 효과) val fadeOut = ObjectAnimator.ofFloat(i..

val color = getColor(R.color.colorPrimaryDark) // 변경하려는 색상 val str1 = "Black" val str2 = "Purple" val spannable = SpannableString("$str1$str2") spannable.setSpan(ForegroundColorSpan(color), str1.length, str1.length + str2.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) textView.setText(spannable, TextView.BufferType.SPANNABLE)
1. LinearLayoutManager 1-1. 코드에서 지정 layoutManager = LinearLayoutManager(context) 1-2. xml에서 지정 2. GridLayoutManager 2-1. 코드에서 지정 layoutManager = GridLayoutManager(view.context, 2 /* 열 갯수 */) 2-2. xml에서 지정
1. Dependecy 설정 Room 버전 정보 implementation "android.arch.persistence.room:runtime:$room_version" kapt "android.arch.persistence.room:compiler:$room_version" testImplementation "android.arch.persistence.room:testing:$room_version" 2. Entity [링크] Room에서 사용할 Entity Class생성 tableName : 사용할 테이블 명 지정 @PrimaryKey: 해당 필드를 기본키로 설정 autoGenerate: autoIncrement 설정 @ColumnInfo: 해당 필드의 테이블 컬럼명 지정(미지정 시 해당 필드와 ..