Class ImageLoadingThread
- java.lang.Object
-
- fi.metropolia.herbreferenceguide.camera.ImageLoadingThread
-
- All Implemented Interfaces:
java.lang.Runnable
public class ImageLoadingThread extends java.lang.Object implements java.lang.Runnable
This background thread is defined for loading images from MediaStore- Since:
- 2022-02-28
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MSG_IMAGES
static java.lang.String
MSG_SIZE
-
Constructor Summary
Constructors Constructor Description ImageLoadingThread(android.os.Handler objHandler, ImageGalleryActivity imageGalleryActivity)
This constructor is used to initialise the instance of background thread
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
Overrides run function, get called when the thread is started.
-
-
-
Field Detail
-
MSG_IMAGES
public static final java.lang.String MSG_IMAGES
- See Also:
- Constant Field Values
-
MSG_SIZE
public static final java.lang.String MSG_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ImageLoadingThread
public ImageLoadingThread(android.os.Handler objHandler, ImageGalleryActivity imageGalleryActivity)
This constructor is used to initialise the instance of background thread- Parameters:
objHandler
- HandlerimageGalleryActivity
- ImageGalleryActivity
-
-
Method Detail
-
run
public void run()
Overrides run function, get called when the thread is started. This threads executes loadImages(), puts ArrayList of images to Bundle, sets that Bundle to Message and sends that Message to Handler to proceed with main application. Code reference to run android tasks in background thread:- Specified by:
run
in interfacejava.lang.Runnable
- See Also:
- Running android tasks in background thread
-
-