Class CameraImage
- java.lang.Object
-
- fi.metropolia.herbreferenceguide.camera.CameraImage
-
- All Implemented Interfaces:
android.os.Parcelable
public class CameraImage extends java.lang.Object implements android.os.Parcelable
Defines CameraImage class- Since:
- 2022-03-01
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<CameraImage>
CREATOR
Regenerates a CameraImage object from parcel.
-
Constructor Summary
Constructors Modifier Constructor Description CameraImage(int imageId, java.lang.String imageName, android.graphics.Bitmap bitmap, java.lang.String path)
Defines constructor that initializes the instance of this classprotected
CameraImage(android.os.Parcel in)
Constructor to initialize CameraImage with data from parcel
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.android.graphics.Bitmap
getBitmap()
Gets bitmapjava.lang.String
getPath()
Gets image pathvoid
setPath(java.lang.String path)
Sets image pathvoid
writeToParcel(android.os.Parcel parcel, int i)
Writes object data to a parcel
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<CameraImage> CREATOR
Regenerates a CameraImage object from parcel. Study source and reference from Android Studio and Stack Overflow
-
-
Constructor Detail
-
CameraImage
public CameraImage(int imageId, java.lang.String imageName, android.graphics.Bitmap bitmap, java.lang.String path)
Defines constructor that initializes the instance of this class- Parameters:
imageId
- intimageName
- Stringbitmap
- Bitmappath
- String
-
CameraImage
protected CameraImage(android.os.Parcel in)
Constructor to initialize CameraImage with data from parcel- Parameters:
in
- parcel- See Also:
- Stack Overflow: How to send an object from one Android Activity to another using Intents?
-
-
Method Detail
-
getBitmap
public android.graphics.Bitmap getBitmap()
Gets bitmap- Returns:
- Bitmap
-
getPath
public java.lang.String getPath()
Gets image path- Returns:
- String path
-
setPath
public void setPath(java.lang.String path)
Sets image path- Parameters:
path
- String
-
describeContents
public int describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.- Specified by:
describeContents
in interfaceandroid.os.Parcelable
- Returns:
- int 0
- See Also:
- Stack Overflow: How to send an object from one Android Activity to another using Intents?
-
writeToParcel
public void writeToParcel(android.os.Parcel parcel, int i)
Writes object data to a parcel- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Parameters:
parcel
- parcel to sendi
- flags- See Also:
- Stack Overflow: How to send an object from one Android Activity to another using Intents?
-
-