Skip to content

GiphyLibrary is an android library that allows for the integration of the GIPHY API through a simple interface.

License

Notifications You must be signed in to change notification settings

muehlemann/GiphyLibrary

Repository files navigation

GiphyLibrary

Created on Oct. 7th, 2017 by Matt Muehlemann

Screenshots

GiphyLibrary

Dependency

Add dependency to build.gradle of your app

dependencies {
    implementation 'com.muehlemann:giphy:1.0.1'
}

Usage

Add the GiphyLibrary activity to your projects android manifest

    <activity 
        android:name="com.muehlemann.giphy.GiphyActivity"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar" />

Create a GiphyLibrary object in your activity.

GiphyLibrary giphyLibrary = new GiphyLibrary();

To start the GiphyLibrary picker call:

giphyLibrary.start(context, listener, API_KEY);

Then delegate the onActivityResult to the GiphyLibrary object and implement the GiphyLibrary listener.

public class MainActivity implements GiphyLibrary.Listener {
        
    ...

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        giphyLibrary.onActivityResult(requestCode, resultCode, data);
    }

    @Override
    public void onGiphySelected(String url) {
        Glide.with(MainActivity.this).load(url).into(imageView);
    }

}

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

GiphyLibrary is an android library that allows for the integration of the GIPHY API through a simple interface.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages