Skip to content

Commit

Permalink
- update to SDK 2.3.5 (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
ALexanderLonsky authored May 24, 2023
1 parent f6ac6cf commit 97df02f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
27 changes: 26 additions & 1 deletion Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The latest release is available on [Maven Central](https://search.maven.org/arti

Add the GIPHY SDK dependency in the module ```build.gradle``` file:
```
implementation 'com.giphy.sdk:ui:2.3.4'
implementation 'com.giphy.sdk:ui:2.3.5'
```

### Configure your API key
Expand Down Expand Up @@ -168,6 +168,31 @@ val dialog = GiphyDialogFragment.newInstance(settings)
dialog.show(supportFragmentManager, "gifs_dialog")
```

Version 2.3.5 offers a wider range of colors for customization. We have made modifications to the color names, but we have prepared a [visual scheme](https://github.com/Giphy/giphy-android-sdk/blob/main/assets/Android_theme_scheme.pdf) to assist you with this update.

Two new convenient functions are now available in the GPHCustomTheme.
```kotlin
applyLightThemeProps() / applyDarkThemeProps()
```

If you want to modify only certain color properties, you should use these functions:
```kotlin
GPHCustomTheme.apply {
val currentNightMode = this@DemoActivity?.let {
this@DemoActivity.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
}
val lightMode = (listOf(Configuration.UI_MODE_NIGHT_NO, Configuration.UI_MODE_NIGHT_UNDEFINED).contains(currentNightMode))
defaultTextColor = Color.Black.hashCode()
if (lightMode) {
applyLightThemeProps()
searchButtonIcon = ContextCompat.getDrawable(this@DemoActivity, com.giphy.sdk.ui.R.drawable.gph_ic_search_black)
} else {
applyDarkThemeProps()
searchButtonIcon = ContextCompat.getDrawable(this@DemoActivity, com.giphy.sdk.ui.R.drawable.gph_ic_search_white)
}
}
```

### _Media Types_

Set the content type(s) you'd like to show by setting the `mediaTypeConfig` property, which is an array of `GPHContentType`s
Expand Down
4 changes: 3 additions & 1 deletion Docs_Java.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The latest release is available on [Maven Central](https://search.maven.org/arti

Add the GIPHY SDK dependency in the module ```build.gradle``` file:
```
implementation 'com.giphy.sdk:ui:2.3.4'
implementation 'com.giphy.sdk:ui:2.3.5'
```

### Configure your API key
Expand Down Expand Up @@ -180,6 +180,8 @@ final GiphyDialogFragment dialog = GiphyDialogFragment.Companion.newInstance(set
dialog.show(getSupportFragmentManager(), "giphy_dialog");
```

Version 2.3.5 offers a wider range of colors for customization. We have made modifications to the color names, but we have prepared a [visual scheme](https://github.com/Giphy/giphy-android-sdk/blob/main/assets/Android_theme_scheme.pdf) to assist you with this update.

### _Media Types_

Set the content type(s) you'd like to show by setting the `mediaTypeConfig` property, which is an array of `GPHContentType`s
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation "com.google.android.material:material:1.1.0"
implementation "com.giphy.sdk:ui:2.3.4"
implementation "com.giphy.sdk:ui:2.3.5"
implementation("com.google.android.exoplayer:exoplayer-core:2.18.1")
implementation("com.google.android.exoplayer:exoplayer-ui:2.18.1")
implementation 'com.github.bumptech.glide:glide:4.12.0'
Expand Down
Binary file added assets/Android_theme_scheme.pdf
Binary file not shown.

0 comments on commit 97df02f

Please sign in to comment.