본문 바로가기

개발/모바일

(16)
CS 193A 16sp Lecture 07: Fragments 강의 링크 : https://www.youtube.com/watch?v=2DuvPuPR_c0&list=PLYKXDWkoIMUH088iBEr_B2WPfbPwtaG-V&index=7 1. 화면에 따라 다른 레이아웃/리소스 : 앱은 해당 suffix를 가진 폴더를 탐색한다. new layout > 같은 파일 이름 > Available qualifiers 에서 orientaton, screen size, screen density 등을 설정 * screen density : (e.g. drawable-hdpi) xhdpi, hdpi, mdpi ... * screen size : (e.g. layout-large) small, normal, large * orientation : (e.g. layout-land)..
stanford CS 193A 16sp Lecture 04: Files, Stanford Library, Styles 강의 링크 : https://www.youtube.com/watch?v=PKnWgQsbwuw&t=465s 1. Files and Storage- 안드로이드는 두 장소에서 파일을 읽어올 수 있다 : 내부/외부 저장소. 둘 다 persistent storage이며, 전원을 꺼도 데이터는 유지된다- internal storage : Built into device * guaranteed to be present * typically smaller * can't be expanded to removed * specific and private to each app * wiped out when the app is uninstalled - 내부 저장수에 파일을 넣고 싶으면? res/raw폴더 2. File and..
stanford CS 193A 16sp Lecture 03: More widgets and lists 강의 링크 : https://www.youtube.com/watch?v=0R98iUX5Wxo&index=3&list=PLYKXDWkoIMUH088iBEr_B2WPfbPwtaG-V xml : declare the thingjava code : handle events 1. ImageButton : clickable -> event이미지 파일은 /res/drawable에 넣음key attributesandroid:clickable = "true" 2. ImageView + RadioButton + Toast or Logpackage com.example.han.lec3ninjaturtles; import android.os.Bundle; import android.support.v7.app.AppCompat..
stanford CS 193A 16sp Lecture 15: Databases and SQL 강의링크 : https://www.youtube.com/watch?v=6p_P6zMVsno&index=15&list=PLYKXDWkoIMUH088iBEr_B2WPfbPwtaG-V 1. 데이터베이스란?관계형 데이터베이스 (Relational Database) : 관련된 표(table)로 구조화 된 데이터. But it's not only data but also operations. - 엑셀 시트의 집합같은 것 - CRUD(create, read, update, delete) + 빠른 검색 등 유용한 연산을 지원함 - class 와 database class called student & database called studentcolumns : fields of class, rows : object of..
안드로이드 스튜디오 회원가입&로그인프로젝트 Lec1, 2 강의 링크 : https://youtu.be/f7_ORwhSx2E 1.처음 생성하는 액티비티 이름을 LoginActivity 로 하여 프로젝트를 생성 2. 라이브러리 추가GradleScripts/ build.gradle(Module:app) apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "com.example.han.management" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJU..
안드로이드 스튜디오 Lec10 레이아웃(Layout) 강의 링크 : https://youtu.be/5SS3Xm3y_8g - 리니어 레이아웃 : 한 쪽 방향(수평, 수직)으로 정렬 activity_main.xml - 렐러티브 레이아웃 : 다른 위젯 기준으로 상대적인 위치를 정의* android:layout_alignParentTop="true" 부모 엘리먼드의 top에 위치* android:layout_centerHorizontal="true" 중앙정렬 activity_main.xml - 테이블 레이아웃 : 표* android:layout_span="2" 몇 칸 차지할지* android:layout_column="2" 어디서 시작할지 activity_main.xml - 그리드 레이아웃 : 테이블 레이아웃과 비슷. 더 활용도가 높음* android:layout..
안드로이드 스튜디오 Lec9 이미지 슬라이더(Image Slider) 강의 링크 : https://youtu.be/Z7IeH2LXgBs - view pager를 이용해서 이미지 슬라이더 만들기 1. activity_main.xml에 advanced/ 를 추가 & ViewPager를 선택. id:view 2. app/res/drawable 폴더에 원하는 사진들 업로드. 3. app/res/layout 폴더에 slider.xml 파일 생성 후 다음과 같이 코드 작성 4. MainActivity와 같은 폴더에 Adapter 파일 추가 후 다음과 같이 코드 작성 package com.example.han.tutorial9; import android.content.Context; import android.support.v4.view.PagerAdapter; import andr..
안드로이드 스튜디오 Lec8 버튼 이미지 애니메이션(Image Button) 강의 링크 : https://youtu.be/xmfFTgfOMdg - 이미지로 버튼 만들기- focused, pressed 일 때의 이미지 지정하기 1.app/res/drawable 폴더에 버튼의 이미지를 넣어준다. 같은 폴더에 button1.xml(이미지의 이름과 중복되면 안됨!) 파일을 만들고 다음과 같이 코드를 작성한다. button1.xml 2.activity_main.xml파일에 Images>ImageButton 을 하나 넣어주고, button파일을 지정해준다.이 ImageButton의 속성 중 srcCompat 이 이 버튼이 가리키고 있는 xml 파일을 뜻한다. => srcCompat : @drawable/button1 지정.이렇게 하면 button1.xml파일을 그대로 가져와서 버튼의 이미지..