Computer Science

    Android Thread 처리 방법

    new Thread() 생성해서 사용 ↓ ↓ Executor의 클래스를 통해 thread 기능별 분리하여 처리 ↓ ↓ Rxjava를 통한 (reactive programming) 비동기처리 ≡ Kotlin의 coroutine 을 통한 비동기처리

    background thread 에서 UI thread 접근하기

    1. Handler + Looper.getMainLooper() 일반적인 쓰레드간 상호작용하는 방법인 Handler 이용 new Handler(Looper.getMainLooper()).post(new Runnable() { @Override public void run() { // UI 스레드 작업 imageView3.setImageBitmap(bitmap); } }); 람다식으로 간단하게 표현하면 다음과 같다 new Handler(Looper.getMainLooper()).post(() -> imageView3.setImageBitmap(bitmap)); 2. Activity.runOnUiThread UI 쓰레드의 메시지큐에 작업을 전달(post)하는 방법 activity 인스턴스에 액세스할 수 있는..

    Rest api 연습용 서비스- Json placeholder , Mockend

    json placeholder 사용할 수 있는 데이터소스들 JSONPlaceholder comes with a set of 6 common resources: /posts 100 posts /comments 500 comments /albums 100 albums /photos 5000 photos /todos 200 todos /users 10 users posts [ { "userId": 1, "id": 1, "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nr..

    intelij - this file dose not belong to the project

    이렇게 뜨면서 xml 미리보기가 안될때 해결 >>>>>>>>> 해당 안드로이드 프로젝트의 .idal 파일에 있는 workspace 파일을 지우고 안드로이드 스튜디오 재 시작 잘 나옴~~!!

    android studio 깃허브 연동

    먼저 안드로이드 프로젝트를 생성합니다. 1. VCS > import into version controal > create git repository 2. VCS > Git > Add 3. VCS > import into Version Control > Share Project on GitHub

    구글 드라이브를 이미지 서버로 사용하기

    1. 구글 드라이브에 이미지를 올립니다. 2. 오른쪽버튼 클릭후 "링크 생성"을 클릭합니다. 3. 링크가 있는 모든 사용자에게 공개 를 선택 후 링크 복사를 클릭합니다. 4. 복사한 이 주소에서 /file/d/ 뒷 부분부터 /view 전까지의 1wX21Vzn_5XjLy_K9Cje8O9VEjljlJK2A 글자조합을 복사합니다. 더보기 drive.google.com/file/d/1wX21Vzn_5XjLy_K9Cje8O9VEjljlJK2A/view?usp=sharing 5. 글자조합 내용을 https://drive.google.com/uc?id= 뒷 부분에 붙여 넣습니다. 그러면 이 주소가 구글 드라이브에 올린 이미지를 웹페이지에서 사용할 수 있는 주소가 됩니다. 더보기 https://drive.google...