안드로이드와 개발툴과
피씨와 함께 하는중
Bundle,
Parcelable,
Serializable
객체가 필요해 만들었으나
사용처가 사라졌다.
차후에 쓸 곳이 있으리라.
public class MyParcelable extends SumClass implements Parcelable {
public MyParcelable(Plus mPlus) {
super(mPlus);
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(mPlus);
}
// public static final must be gone. Because this disappear is caused from Inner class... I guess.
public final Parcelable.Creator<MyParcelable> CREATOR = new Parcelable.Creator<MyParcelable>() {
public MyParcelable createFromParcel(Parcel in) {
Plus plus = (Plus) in.readValue(null);
return new MyParcelable(Plus);
}
public MyParcelable[] newArray(int size) {
return new MyParcelable[size];
}
};
}
'Android 안드로이드' 카테고리의 다른 글
Failed to create the Java Virtual Machine. (0) | 2014.12.17 |
---|---|
ArrayList 요소 모두 제거 (0) | 2014.12.15 |
구글맵과 프래그먼트 배치 오류 (0) | 2014.12.05 |
Call requires API level 5 (current min is 3): (0) | 2014.12.04 |
이클립스 단축키, 안드로이드 AVD 단축키 (0) | 2014.12.04 |