I use the remove() function in this context:
Singelton.getInstanse().getArrayBitmap().get(position).remove(); But the remove() method is not recognized.
What method should I use to remove an object from an array cell?
Singelton.getInstanse().getArrayBitmap().remove(position); ArrayList<Bitmap> bmArrayList = Singelton.getInstanse().getArrayBitmap(); Bitmap bitmap = Singelton.getInstanse().getArrayBitmap().get(position); bmArrayList.remove(bitmap); So try
Try a method inside Singletone to write
public final class Singleton { private static ArrayList<Bitmap> bitmapArray; /** Single ton constructor. */ private Singleton() { } public static void removeByPosition(int position) { bitmapArray.remove(position); } } Source: https://ru.stackoverflow.com/questions/478585/
All Articles
removemethod on theBitmapobject itself, which it does not have. - temq