Android 39

[Android Studio] Font Setting

[안드로이드 스튜디오] 폰트 설정 글꼴 모음을 리소스로 추가하기 일부 아이템만 글꼴 바꾸기 // layout xml 파일에서 해당 아이템 하위에 아래처럼 코드 작성 android:fontFamily="@font/leeseoyun" 일괄 적용하기 // themes.xml 파일에서 style 하위에 아래처럼 코드 작성 @font/leeseoyun 참고 XML의 글꼴 | Android 개발자 | Android Developers XML의 글꼴 Android 8.0(API 수준 26)에는 새로운 기능인 XML의 글꼴이 도입되어 글꼴을 리소스로 사용할 수 있습니다. res/font/ 폴더에 font 파일을 추가하여 글꼴을 번들로 묶어 리소스로 사용할 수 있습 developer.android.com

[Android Studio/Kotlin] Singleton Pattern

[안드로이드 스튜디오/코틀린] 싱글톤/싱글턴 패턴 MainActivity.kt package com.shinyelee.android_study2 import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.View import android.widget.Button import android.widget.Toast // 메인화면 class MainActivity : AppCompatActivity() { val TAG: String = "로그" // 뷰 생성 override fun onCreate(save..

[Android Studio/Kotlin] Custom Dialog, Interface

[안드로이드 스튜디오/코틀린] 커스텀 다이얼로그, 인터페이스 MainActivity.kt package com.shinyelee.android_study2 import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.View import android.widget.Button import android.widget.Toast // 메인화면 class MainActivity : AppCompatActivity(), MyCustomDialogInterface { val TAG: String = "로그" // ..

[Android Studio/Kotlin] Listener, Method, Click Event

[안드로이드 스튜디오/코틀린] 리스너, 메소드, 클릭 이벤트 activiti_main.xml MainActivity.kt package com.shinyelee.android_study2 import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.widget.Button // 메인화면 class MainActivity : AppCompatActivity() { val TAG: String = "로그" // 뷰 생성 override fun onCreate(savedInstanceState: Bundle?) { su..

[Android Studio/Kotlin] Life Cycle of Activity

[안드로이드 스튜디오/코틀린] 액티비티의 생명주기(활동 수명 주기) MainActivity.kt package com.shinyelee.androidlifecycle import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.View import android.widget.TextView class MainActivity : AppCompatActivity() { val TAG: String = "로그" private lateinit var text_view: TextView // Lifecycle of Activity(액티비티의 생명주기) // // on..

[Android Studio/Kotlin] Gradient View

[안드로이드 스튜디오/코틀린] 그라데이션 뷰 아이콘(SVG, PSD 등) 삽입 및 색깔 변경하기 그라데이션 만들기 참고 Colors HEX W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. www.w3schools.com How to make gradient background in android I want to create gradient background where the gradient is in..

[Android Studio/Kotlin syntax] Coroutine

[안드로이드 스튜디오/코틀린 문법] 코루틴 // Coroutine(코루틴) // // 메인 루틴과 별도로 진행 가능한 루틴 // 개발자가 루틴의 실행과 종료를 마음대로 제어할 수 있는 단위 // 사용시 아래와 같이 임포트 import kotlinx.coroutines.* fun main() { // 제어 범위와 실행 범위(스코프) 지정 가능 // // Global Scope(글로벌 스코프) -> 프로그램의 어디서나 제어 동작이 가능한 코루틴의 범위 // Coroutine Scope(코루틴 스코프) -> 특정한 목적의 dispatcher(디스패처)를 지정해 제어 및 동작이 가능한 새로운 코루틴 범위 생성 val scope = GlobalScope // 새로운 코루틴 생성 // // launch -> 반환값..

반응형