본문 바로가기

분류 전체보기

(17)
[Android] [Kotlin] Unit 1: Kotlin basics - import 자동 추가/삭제 설정 > 주제 import문을 자동으로 추가하고 사용하지 않는 import문을 자동으로 삭제하는 설정 알아보기 > 결론 unambiguous imports 설정은 Android 스튜디오가 사용할 문을 결정할 수 있는 한 import 문을 자동으로 추가하라고 Android 스튜디오에 지시합니다. optimize imports 설정은 Android 스튜디오에 코드에서 사용되지 않는 가져오기를 삭제하라고 지시합니다. > 방법 Windows File > Settings > Editor > General > Auto Import Java 및 Kotlin 섹션에서 아래 두항목을 체크하고 OK Add unambiguous imports on the fly(즉시 명확한 가져오기 추가) Optimize imports on t..
[Android] [Kotlin] Unit 1: Kotlin basics - 코드 연습하기 - Kotlin 플레이그라운드 > 주제 Kotlin 코드 연습하기 Kotlin 플레이그라운드라는 브라우저 기반의 프로그래밍 도구를 사용하여 코드를 실행해 볼 수 있다. > 방법 브라우저를 열고 코드입력 후 버튼은 클릭하여 실행한다. https://developer.android.com/training/kotlinplayground > 출처 Kotlin 플레이그라운드 https://developer.android.com/codelabs/basic-android-kotlin-training-first-kotlin-program?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-one&hl=ko#1
[Android] [Kotlin] 시작하기 - Android Basics in Kotlin > 주제 Kotlin 시작하기 안드로이드 개발자 사이트에 있는 강좌로 시작해본다. Android Basics in Kotlin 과정은 아래와 같이 나와있다. Unit 1: Kotlin basics Introduction to Kotlin Create your first app Create your first app Add a button to an app Unit 2: Layouts Unit 3: Navigation Unit 4: Connect to the internet Unit 5: Data persistence Unit 6: WorkManager > 출처 안드로이드 개발자 https://developer.android.com/courses/android-basics-kotlin/course
[Powershell] split 사용하기 > 주제 split 사용하기 > 방법 문자열을 스페이스로 분리한다. "0 12 345 6789" PS C:\> $tmp="0 12 345 6789" -split ' ' PS C:\> $tmp 0 12 345 6789 PS C:\> $tmp="0 12 345 6789" -split ' ', 3 PS C:\> $tmp 0 12 345 6789 변수 tmp에 분리해서 넣으면 배열로 사용이 가능하다. > 출처 Microsoft 문서 about_Split https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_split?view=powershell-7.3
[Android] 리스트에서 길게 누름 적용하기 - setOnLongClickListener > 주제 리스트 클릭 시에 적용하는 setOnClickListener 가 있다면 리스트를 길게 누름을 적용하는 메뉴는 확인한다. > 방법 setOnLongClickListener를 선택하면 기본적으로 만들어지는 onLongClick 함수는 return false 로 만들어지고 그대로 적용하면 클릭과 롱클릭이 모두 적용된다. return ture로 만들어 주면 길게 누름(롱클릭)만 적용할 수 있다. > 예제 public class RecycleTableViewHolder extends RecyclerView.ViewHolder { protected TextView tv; public RecycleTableViewHolder(@NonNull View itemView) { super(itemView); thi..
[Android] 리소스에 있는 문자열 가져다 쓰기 > 주제 리소스에 있는 문자열 가져다 쓰기 > 예제 두가지 모두 사용가능 하다. String string = getString(R.string.hello); or String string = getResources().getString(R.string.hello); > 출처 안드로이드 개발자 문서 문자열 리소스 https://developer.android.com/guide/topics/resources/string-resource?hl=ko
[Android] 리소스를 사용해서 배경색 처리하기 - setBackgroundResource > 주제 colors.xml에 있는 색상으로 레이아웃 또는 뷰의 색상을 변경함 > 정의 > 예제 xml 파일 : app> res> values> colors.xml xml 내용 ... #FBCBC7 ... java 파일 : MainActivity.java private LinearLayout llBook = new LinearLayout(); llBook.setBackgroundResource(R.color.orange); > 출처 안드로이드 개발자 문서 https://developer.android.com/reference/android/view/View#setBackgroundResource(int)
[Android] programmatically - TextView에 gravity 적용 > 주제 프로그램적으로 만든 TextView에 gravity를 적용하고 싶을때 > 환경 OS: Windows 10 Home 안드로이드 스튜디오 버전: Android Studio Chipmunk | 2021.2.1 > 방법 TextView tvTest = new TextView(); ... tvTest.setGravity(Gravity.CENTER); ... TextView tvTest = new TextView(); ... tvTest.setGravity(Gravity.CENTER); ... > 참고 https://developer.android.com/reference/android/view/Gravity#CENTER > 출처 How set the android:gravity to TextView fr..
[파이썬] Anaconda 설치 후 실행 및 기본 브라우저 변경 윈도우10 원도우키> Anaconda3> Jupyter Notebook (anaconda3) 실행 기본 브라우져가 Microsoft Edge로 되어있고 Chrome으로 변경하고 싶다면 설정> 앱> 기본 앱> 웹 브라우져 를 변경하면 된다.
[파이썬] Anaconda 다운로드 현재 윈도우10에 있는 파이썬 버전 확인 PS C:> py --version Python 3.10.4 원도우10에서 파이썬을 활용하기 위해서 Anaconda를 다운로드 한다. 다운로드 사이트 https://www.anaconda.com/ Data science technology for groundbreaking research.a competitive edge.a better world. Anaconda offers the easiest way to perform Python/R data science and machine learning on a single machine. Start working with thousands of open-source packages and libraries toda..