Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this is my mainactivity.java
- am sending data to another activity.
- private void productItemClick() {
- ItemClickSupport.addTo(recyclerView).setOnItemClickListener(
- new ItemClickSupport.OnItemClickListener() {
- @Override
- public void onItemClicked(RecyclerView recyclerView, int position, View v) {
- // do it
- Intent intent=new Intent(getApplicationContext(),DisplayProductImage.class);
- // Bundle bundle=new Bundle();
- // bundle.putInt("image",position);
- intent.putExtra("image",position);
- // intent.putExtras(bundle);
- startActivity(intent);
- }
- }
- );
- }
- ProductDisplayActivity.java
- am recieving data here
- int image =intent.getExtras().getInt("image");
- imageView.setImageResource(image);
Add Comment
Please, Sign In to add comment