Dev/Android125 Android - SharedPreferences / Developing Android App SharedPreferences - SharedPreferences 는 앱의 환경설정을 위해서 만들어졌다.- 앱을 지우지 않는 이상 사라지지 않는 데이터 역할을 한다.- 간단한 데이터만 저장한다. 2017. 3. 10. Android - Activity LifeCycle / Developing Android App 안드로이드 액티비티 생명주기Activity Life Cycle 안드로이드 액태비티 생명주기 1. onCreate() -> 액티비티(Activity)를 생성한다. 2. onStart() -> 액티비티(Activity)를 보이게 한다. 3. onResume() -> 액티비티(Activity)의 포커스를 가지게 한다. 4. onPause() -> 액티비티(Activity)의 포커스를 잃게 한다. 5. onStop() -> 액티비티(Activity)를 보이지 않게 한다. 6. onDestroy() -> 액티비티(Activity)를 없애므로써 라이프 싸이클을 종료한다. 화면이 회전할때의 액티비티 생명주기(Activity Life Cycle) 1. 처음에 화면 생성onCreate -> onStart -> onRes.. 2017. 3. 7. Android - webPage 띄우기 / Developing Android App 안드로이드에서 WebPage 띄우기Developing Android App 1. 호출할 웹페이지 url 을 가져온다.2. Uri 타입으로 파싱!!3. 웹 페이지 가능한 애플리케이션 호출 12345678String url = "http://www.naver.com";Uri uri = Uri.parse(url);Intent intent = new Intent(Intent.ACTION_VIEW, uri);// 암시적 인텐트를 받을 수 있는 앱이 기기에 없을 경우, 여러분의 앱이// startActivity()를 호출하면 작동 중단되기에 인텐트를 수신할 앱이 있는지를 먼저 확인if (intnet.resolveActivity(getPackageManager()) != null) { startActivity(int.. 2017. 3. 7. Android - Intent에 관해서 / Developing Android App / 공부내용 복기 안드로이드는 Intent 라는 메세지 객체를 통해서 Activity 간의 통신을 가능하게 한다. class 이름을 활용해서 바로 Activity 를 이동하는 대신 Intent 를 이용해서 이동하는 이유는 정보를 담아서 보낼 수 있기 때문이다.새로운 Activity 가 가질 정보를 전달받을 수 있다 2017. 3. 6. Android - Adapter 의 역활 Android - RecyclerView 에서 Adapter 의 역활 The adapter does create ViewHolder objects and inflates item views in its onCreateViewHolder function, it also returns the number of items in the data source, and binds data from the data source to each item (even if we pass the responsibility to the ViewHolder). It doesn't cache views associated with each item (that's the job of the ViewHolder class) nor d.. 2017. 3. 4. Android - URL 생성 / Developing Android Apps 수업 Android - URL 생성 / Developing Android Apps 수업 Android 에서 기본 라이브러리만 사용해서 URL 생성하는 방법기본적으로 Android 는 URI.builder framework class 를 이용해서 어려움 없이 잘 짜여진 URI 생성을 돕는다. 1234567891011121314151617181920212223public static URL buildUrl(String query) { Uri builtUri = Uri.parse("https://andfun-weather.udacity.com/staticweathe") .buildUpon() .appendQueryParameter("q", query) .appendQueryParameter("mode", "json.. 2017. 3. 3. 이전 1 ··· 15 16 17 18 19 20 21 다음