Skip to content

Instantly share code, notes, and snippets.

@CodeBoy722
Created May 12, 2019 23:53
Show Gist options
  • Save CodeBoy722/7a5f34f8eed0c327a2e07f5ad6d84e76 to your computer and use it in GitHub Desktop.
Save CodeBoy722/7a5f34f8eed0c327a2e07f5ad6d84e76 to your computer and use it in GitHub Desktop.
package com.androidcodeman.simpleimagegallery.utils;
/**
* author CodeBoy722
*
* Custom Class that holds information of a folder containing images
* on the device external storage, used to populate our RecyclerView of
* picture folders
*/
public class imageFolder {
private String path;
private String FolderName;
private int numberOfPics = 0;
private String firstPic;
public imageFolder(){
}
public imageFolder(String path, String folderName) {
this.path = path;
FolderName = folderName;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getFolderName() {
return FolderName;
}
public void setFolderName(String folderName) {
FolderName = folderName;
}
public int getNumberOfPics() {
return numberOfPics;
}
public void setNumberOfPics(int numberOfPics) {
this.numberOfPics = numberOfPics;
}
//this method increments the numberOfPics varaible, it is used to get
//the total count of images in the given folder
public void addpics(){
this.numberOfPics++;
}
public String getFirstPic() {
return firstPic;
}
//this method gets the path to the first picture in the folder
//the picture is the used in the recyclerview adapter to represent
//the whole folder
public void setFirstPic(String firstPic) {
this.firstPic = firstPic;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment