Page 310 - MDP2020-1
P. 310
| 인천전자마이스터고등학교 ·············································································································
304
public class ClothesActivity extends AppCompatActivity {
ImageView imageView;
TextView textView_explaination;
String[] name = "구찌,아디다스,나이키".split(",");
String[] explaination = "슬렉스,반팔,최애템".split(",");
int[] imageViewId = {1,2,3};
ArrayList<ClothesData> clothesData;
RecyclerView recyclerView;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_clothes);
Intent intent = getIntent();
imageView = findViewById(R.id.imageView);
recyclerView = findViewById(R.id.recyclerView);
textView_explaination = findViewById(R.id.explaination_explaination);
ArrayList<ClothesData> clothesData = new ArrayList<>();
for (int i = 0; i < explaination.length; i++) {
clothesData.add(new ClothesData(name[i], explaination[i], imageViewId[i]));
}
ClothesAdapter clothesAdapter = new ClothesAdapter(clothesData);
recyclerView.setAdapter(clothesAdapter);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this,
RecyclerView.VERTICAL,false);
recyclerView.setLayoutManager(layoutManager);
}
public void magage(View view) {
Intent manage1 = new Intent(this, ManageActivity.class);
manage1.putParcelableArrayListExtra("clothesData",clothesData);
startActivity(manage1);
}
}
Tensorflow2(버전)