전체 글 208

Flexbox + Recyclerview

- 준비물 - 1. 준비된 Recyclerview , Adapter (추후 작성 예정) 2. library implementation 'com.google.android.flexbox:flexbox:3.0.0' 1. 준비된 RecyclerView 를 아래와 같이 세팅해 준다 2. 클래스단 세팅 ... val rcvMyList = findViewById(R.id.rcvMyList) rcvMyList.layoutManager = FlexboxLayoutManager(this).apply { flexWrap = FlexWrap.WRAP flexDirection = FlexDirection.ROW justifyContent = JustifyContent.FLEX_START } //myAdapter 는 준비된 사..

Android Study 2023.08.31

GlideApp 사용시 웹상에 나와있는 대부분 코드가 안될때 시도 방법

1. build.gradle(:app) kapt 사용 추가 plugins { ... id 'kotlin-kapt' } 2. build.gradl(:app) dependency 추가 dependencies { ... implementation 'com.github.bumptech.glide:glide:4.12.0' kapt 'com.github.bumptech.glide:compiler:4.12.0' ... } 3. Glide Module 파일 생성 MyGlideModule.kt (그냥 파일 생성해서 사용 가능하게끔만 해주면 끝) @GlideModule class MyGlideModule: AppGlideModule() - 위의 셋팅과 작업을 해 주어야만 아래의 코드 사용이 가능하다 (웹상 자료 중에는 세..

Android Study 2023.08.30

Android WebView 연동시키기 step-1

안드로이드 웹뷰 연동은 아래 3가지가 필요함 * 단순하게 디바이스의 기본 브라우저로 웹뷰를 보여주기만 하기 위함은 더욱 간단함 보통 웹뷰를 네이티브에 붙일때에는 아래와 같이 사용함 1. WebClient : 웹페이지 url load 의 시작, 진행, 끝 의 호출 되는 함수 연동시 사용함 2. AndroiBridge : 웹페이지와 통신할때 사용함 3. WebChromeClient : 웹페이지 파일 전송 , 웹페이지 팝업 창 연동할때 사용함 !! 웹뷰와 통신하거나 웹페이지 팝업 등의 컨트롤이 필요하지 않다면 1. 만 적용해도 됨 1-1. 기본적으로 필요한 WebClient 클래스 생성 (CustomWebview.kt) class CustomWebviewClient(val context: Context, va..

Android Study 2023.08.28

TextView 문자열, 클래스에서 원하는 부분만 스타일 변경하여 적용시키기(Feat. Kotlin)

1. strings.xml 준비 Your email : %1$s 2. color.xml 준비 #FA8428 3. textview 에 적용 val tempEmail = "aaabbb@email.com" /* 변경시킬 text string 값, html 색상 적용 */ val convetHtmlText = "${tempEmail}" /* 끼워넣을 string 가져오기 */ val tmepValue = String.format(resources.getString(R.string.test_content), convetHtmlText) /* Html string 형식 인식되게 변환 */ val spannedText = HtmlCompat.fromHtml(tmepValue, HtmlCompat.FROM_HTML_M..

Android Study 2023.08.17

Git StudyPrivate remote Repository clone 방법(feat. GitHub ,Sourcetree, Mac)_2023ver

이전에 작성햇던 방법은 SourceTreee 내부에 PuTTY key Generator 툴이 있어서 이를 사용해서 여기저기 설정 해주어야 해서 약간 복잡 했엇다(참고 : https://85chong.tistory.com/179) 최근 SourceTree 에서는 간편하게 변경 되었다. * SourceTree Version 4.2.3(252) 1. Github 계정 SourceTree 연동 후 계정 설정 팝업창 에서 CreateGenerator 클릭 2. 비번 입력후 완료 > 끝 3. 생성되었는지 확인 Github 설정 > SSH and GPG keys > SSH Key 항목에 오늘 날짜로 SHA-256 key 가 자동으로 생성되어 등록되어있는걸 확인하면 끝 *그냥 참고 : copy clipboard 하면 ..

Git Study 2023.06.21