ImageGallery is an image gallery for Android. With this image gallery you can easly add a gallery to your app.
The gallery accepts a List<String>
or a String[]
containing image URL's and uses Picasso to load them.
ImageGallery is licensed under the friendly [Apache2 licence].
Various documentation is available:
android {
compileSdkVersion 25
buildToolsVersion "25.1.0"
defaultConfig {
minSdkVersion 17
targetSdkVersion 25
}
}
- All using a LanguageHelper. Defaults to english. See the example.
Init and use the view from your app:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageGallery imageGallery = (ImageGallery) findViewById(R.id.imageGallery);
imageGallery
.setImages(getImages())
//.setImages(getImagesAsArray())
.setLanguageHelper(new LanguageHelper(this)
.setNoImagesAvailable("No images are available!")
.setOutOf("out of"))
.setOnLargeImageClickCallback(new OnClickCallback() {
@Override
public void OnClick(String currentImageUrl) {
Toast.makeText(getApplicationContext(), "Clicked image", Toast.LENGTH_LONG).show();
}
})
.start();
}
[Release 0.7] is the current latest release. This release is considered a beta release.
Gradle configuration:
Add the following to your build.gradle:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
...
dependencies {
...
compile 'com.github.ChristianLJ:ImageGallery:0.7'
...
}
Please use GitHub issues and Pull Requests for support.
Issue tracking and active development is at GitHub.