모바일/Android

1.1 안드로이드 깨달음

늘근이 2017. 1. 1. 23:44

getApplicationContext() Application context is associated with the Applicaition and will always be the same throughout the life cycle.

getBasecontext() should not be used, just use Context instead of it which is associated with the activity and could possible be destroyed when the activity is destroyed.

getApplication() is available to Activity and Services only. Although in current Android Activity and Service implementations, getApplication() and getApplicationContext() return the same object, there is no guarantee that this will always be the case (for example, in a specific vendor implementation). So if you want the Application class you registered in the Manifest, you should never call getApplicationContext() and cast it to your application, because it may not be the application instance (which you obviously experienced with the test framework).

getParent() returns object of the activity if the current view is a child..In other words returns the activity object hosting the child view when called within the child.



String Calss 란?

JAVA에서 String 객체내 보관하는 문자열은 유니코드로 변형하여 보관하므로 HTML과 같이 마크업 문자를 입력하고 출력할 때 문제가 발생한다. 따라서 String 객체에 입력되는 문자열은 마크업 문자를 입력하여 사용할 수 없는 문자열인란 의미로 변경금지 문자라 부른다.

CharSequence 란?
반면에 CharSequence 객체내 보관하는 문자열은 같은 String 클래스와 같은 유니코드라 하더라도 마크업 문자를 사용하여 변형과 가공이 가능한 문자열이란 의미로 스타일 문자 또는 연속되는 문자라고 한다.


class loader

http://m.blog.naver.com/choigohot/40192701035



Parcelable.Creator

public static interface Parcelable.Creator 

android.os.Parcelable.Creator<T>
Known Indirect Subclasses



Interface that must be implemented and provided as a public CREATOR field that generates instances of your Parcelable class from a Parcel.

Summary


Public methods

abstract TcreateFromParcel(Parcel source)

Create a new instance of the Parcelable class, instantiating it from the given Parcel whose data had previously been written by Parcelable.writeToParcel().

abstract T[]newArray(int size)

Create a new array of the Parcelable class.


git rebase

reflog

'모바일 > Android' 카테고리의 다른 글

InfalteException  (0) 2017.01.04
mpchart 창고  (0) 2017.01.03
깨달음 (2016.12.30)  (0) 2016.12.29
TOUCH_EXPLORATION_ENABLED 관련  (0) 2016.12.29
getInfo from settings  (0) 2016.12.29