I want to pass my String and Image value to my another Fragment.
Here is my value (These value is called from my Fragment Home)
private GridView grid;
String[] nama_barang_rek = {
"Batu Bata",
"Semen Holcim",
"Cat Avitex",
"Toilet Duduk TOTO"};
int[] gambar_barang_rek = {
R.drawable.batu_bata,
R.drawable.semen_holcim,
R.drawable.cat_avitex,
R.drawable.closet_duduk_toto};
And these a the code for my GridView, and i wanna pass those value to my CheckOutActivity
grid = (GridView) rootview.findViewById(R.id.gv_rekomendasi);
grid.setAdapter(new CustomGrid(getActivity(), nama_barang_rek, gambar_barang_rek));
grid.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(getActivity(), nama_barang_rek[position], Toast.LENGTH_SHORT).show();
}
});
I hope u guys could help me to fix my problem.