Page 309 - MDP2020-1
P. 309
················································································ 명장양성프로젝트 【MDP】 과제발표회 자료집 Ⅰ | 303
public static final Creator<ClothesData> CREATOR = new Creator<ClothesData>() {
@Override
public ClothesData createFromParcel(Parcel in) {
return new ClothesData(in);
}
@Override
public ClothesData[] newArray(int size) {
return new ClothesData[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.name);
dest.writeString(this.name);
dest.writeInt(this.imageViewId);
}
}
(옷 관리창 코드)
package com.example.smartstyler;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;