Q:

GridView displaying items incorrect

I have a GridView and it is displaying items incorrect.
I am trying to load Images with Retrofit and show them by GridView in 2 columns.
When Phones display screen shows 4 images, if total images are 8, by scrolling down repeats first 4 images. Not showing all 8 images correct.
LinerLayout:
<LinearLayout
    android:id="@+id/panelBody"
    android:layout_width="270dp"
    android:layout_height="470dp"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true"
    android:orientation="vertical"
    android:paddingTop="120dp"
    android:paddingLeft="10dp"
    android:paddingRight="10dp">

    <Button
        android:id="@+id/photosAddButton"
        android:layout_width="match_parent"
        android:layout_height="35dp"
        android:layout_marginBottom="10dp"
        android:background="@drawable/drw_button_sign"
        android:text="@string/add_photo"
        android:textColor="@color/colorWhite"/>

    <GridView
        android:id="@+id/imagesGalleryGridView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="50dp"
        android:paddingBottom="5dp"
        android:verticalSpacing="0dp"
        android:horizontalSpacing="0dp"
        android:numColumns="2"
        android:stretchMode="columnWidth"
        android:background="@color/colorPrimary"></GridView>

    <Button
        android:id="@+id/photosUpdateButton"
        android:layout_width="match_parent"
        android:layout_height="35dp"
        android:layout_marginTop="-45dp"
        android:background="@drawable/drw_button_sign"
        android:text="@string/update_profile"
        android:textColor="@color/colorWhite"/>

</LinearLayout>

Load Photos function: 
public void loadPhotos() {
    API_RETROFIT retrofit = this.getRetrofit();
    Call<List<PROVIDER_PHOTOS>> call = retrofit.getPhotos(providerID);
    call.enqueue(new Callback<List<PROVIDER_PHOTOS>>() {
        @Override
        public void onResponse(Call<List<PROVIDER_PHOTOS>> call, Response<List<PROVIDER_PHOTOS>> response) {
            if(response.isSuccessful() && response.body() != null) {
                List<PHOTO_ITEM> photoItemList = new ArrayList<PHOTO_ITEM>();
                photoItemList.clear();
                photoses = response.body();
                for (PROVIDER_PHOTOS items : photoses) {
                    photoItemList.add(new PHOTO_ITEM(items.getID(), items.getPath()));
                }
                galleryImageAdapter = new GalleryImageAdapter(PhotosProvider.this, photoItemList);
                imagesGalleryGridView.setAdapter(galleryImageAdapter);
                loading.dismiss();
            }
        }
        @Override
        public void onFailure(Call<List<PROVIDER_PHOTOS>> call, Throwable t) {
            call.cancel();
            Toast.makeText(getApplicationContext(), R.string.checkConnection, Toast.LENGTH_LONG).show();
            loading.dismiss();
        }
    });
}

GalleryImageAdapter: 
public class GalleryImageAdapter extends BaseAdapter {
private Context context;
private List<PHOTO_ITEM> images;
public GalleryImageAdapter(PhotosProvider c, List<PHOTO_ITEM> items) {
    context = c;
    images = items;
}
// returns the number of images
public int getCount() {
    return images.size();
}
// returns the ID of an item
public Object getItem(int position) {
    return images.get(position);
}
// returns the ID of an item
public long getItemId(int position) {
    return position;
}
// returns an ImageView view
public View getView(final int position, View convertView, ViewGroup parent) {
    final PHOTO_ITEM pitem = getItems(position);
    ImageView imageView;
    LayoutInflater inflater = (LayoutInflater) context
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    if (convertView == null) {
        convertView = inflater.inflate(R.layout.provider_photos_item, null);
        imageView = (ImageView) convertView.findViewById(R.id.grid_item_image408);
        Picasso.with(context).load(REQUEST.UPLOADS_PATH + pitem.URL).resize(110, 110).into(imageView);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(context, ProviderGalleryView.class);
                intent.putExtra("setURL", pitem.URL);
                context.startActivity(intent);
            }
        });
        ImageButton deletePhoto = (ImageButton) convertView.findViewById(R.id.deletePhoto);
        deletePhoto.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) { // DELETE PHOTO }
        });
    }
    return convertView;
}
PHOTO_ITEM getItems(int position) {
    return ((PHOTO_ITEM) getItem(position));
}
}

A:

Move the lines of code after you inflate the view outside the if condition:
   View row = convertView;
 if (row == null) {
        row = inflater.inflate(R.layout.provider_photos_item, null);

    }

       ImageView imageView = (ImageView) row.findViewById(R.id.grid_item_image408);

        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(context, ProviderGalleryView.class);
                intent.putExtra("setURL", pitem.URL);
                context.startActivity(intent);
            }
        });
        ImageButton deletePhoto = (ImageButton) row.findViewById(R.id.deletePhoto);
        deletePhoto.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) { // DELETE PHOTO }
        });

return row;

