1. Multi Process 하나의 프로그램을 여러개의 Process로 나누어 처리하는 방식 장점 : 하나의 Process가 잘못되어도 다른 Process가 처리하기 때문에 문제가 발생되지 않는다 단점 : Context Switching 비용이 발생한다 2. Multi Thread 프로그램을 여러개의 Thread로 구성하고 작업을 처리한다 장점 : 시스템 자원 소모 감소, 처리비용 감소(실행속도향상), 쓰레드간 자원 공유(stack을 제외한 영역) 단점 : 디버깅이 어렵다, 동기화 이슈발생, 하나의 쓰레드의 오류로 전체 프로세스 오류 3. Thread Safe 멀티 스레드 프로그래밍에서 일반적으로 어떤 함수나 변수, 혹은 객체가 여러 스레드로부터 동시에 접근이 이루어져도 프로그램의 실행에 문제가 없음을..
1. Importance 채널 생성에 앞서 Importance에 따른 채널 중요도를 설정할 수 있다. 여기서 중요한 점은 헤드업 알람의 유무 2. 인자 id : 임의의 채널 id name : 알람 이름 importance level : 알람 중요도 3. 순서 Channel과 NotificationManager 초기화 후 마지막에 .createNotificationChannel을 해야한다. 4. 코드 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notific..
Code public static Bitmap getBitmapCircleCrop(Bitmap bitmap, int Width, int Height) { Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(output); final int color = 0xff424242; final Paint paint = new Paint(); final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); paint.setAntiAlias(true); canvas.drawAR..
Cursor란? Cursor는 데이터베이스에 저장되어있는 테이블의 행을 참조하여 데이터를 가져온다 ex) Cursor.getString(1); 은 Name에 있는 James 반환 메서드 종류 Cursor.getColumnIndex(String columnName); 해당 컬럼 이름에 인덱스를 반환, 없으면 -1 반환 Cursor.getPosition(String columnName); 커서가 가리키는 행의 포지션 반환 Cursor.getColumnName(int columnIndex); index의 필드 이름 반환 Cursor.getCount(); 테이블의 행 갯수 반환 Cursor.getColumnNames(); 필드 명들을 순서대로 배열로 반환 Cursor.getColumnCount(); 필드 갯수 ..
1. 예제(1) TwoWeekSecondEx1class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { val onClick : () -> Unit = {} PrimaryButton(enabled = true, text = "확인", onClick = onClick) } }}//실습 1@Composablefun PrimaryButton( onClick: () -> Unit, modifier: Modifier =..