I deal with these collections, still doing something wrong.
viewHolder.photo.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { v.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { List<String> images = new ArrayList<>(); Intent intent = new Intent(context, FullScreenViewActivity.class); intent.putExtra("position", position); images.add(imageUploads.get(position).getUrl().toString()); intent.putStringArrayListExtra("items_to_parse", new ArrayList<String>()); context.startActivity(intent); } }); By clicking on the photo (I have a list of them), the collection type is created, then we are working with the intent and FullScreenViewActivity.class , after which I will TRY to add from the model the position of the LINK of this photo. Then putStringArrayListExtra again in the collection.
Class FullScreenViewActivity
public class FullScreenViewActivity extends Activity { private FullScreenImageAdapter adapter; private ViewPager viewPager; ArrayList<String> photo = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fullscreen_view); viewPager = (ViewPager) findViewById(R.id.pager); int position = 0; Intent i = getIntent(); if (i != null) { position = i.getIntExtra("position", 0); photo.addAll(getIntent().getExtras().getStringArrayList("items_to_parse")); } Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); int width = size.x; adapter = new FullScreenImageAdapter(FullScreenViewActivity.this, photo,width); viewPager.setAdapter(adapter); viewPager.setCurrentItem(position); } I onClick trying to make changes only in onClick . This activity works correctly (but for other activities). Please tell onClick'e what I'm doing wrong in this onClick'e .
images, and transfer the empty (another, again created) list. - post_zeew