GithubHelp home page GithubHelp logo

giphy / giphy-android-sdk Goto Github PK

View Code? Open in Web Editor NEW
91.0 91.0 40.0 8.34 MB

Home of the GIPHY SDK Android example app, along with Android SDK documentation, issue tracking, & release notes.

Home Page: https://developers.giphy.com/

License: Mozilla Public License 2.0

Kotlin 95.63% Java 4.37%

giphy-android-sdk's People

Contributors

alexanderlonsky avatar cgmaier avatar crysis21 avatar shwetaatgiphy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

giphy-android-sdk's Issues

Limit results count

Is there any possible way to limit how many results are displayed/returned by GiphyDialogFragment?
I've checked in GPHSettings and couldn't find any property.
I saw that in the Web SDK there is a "limit" property.

NoClassDefFoundError in v1.2.8

Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/giphy/sdk/ui/r;
at com.giphy.sdk.ui.d.(:30)
at com.giphy.sdk.ui.c.(:17)
at com.giphy.sdk.ui.a.a(:45)
at com.giphy.sdk.ui.l.a(:98)
at com.giphy.sdk.ui.Giphy.configure(:22)
at tv.nexusgaming.streaming.NexplayApplication.onCreate(NexplayApplication.kt:69)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1183)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6479)
at android.app.ActivityThread.access$1300(ActivityThread.java:220)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1860)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7397)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

Vertical Scrolling not happening in Giphy android bottomsheet

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@android:color/transparent">

        <FrameLayout
            android:id="@+id/frameTopLine"
            android:layout_width="@dimen/dimens48"
            android:layout_height="@dimen/dimens4"
            android:background="@drawable/bottomsheet_top_indicator"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />


        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/backGroundColor"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dimens8"
            android:background="@drawable/top_round_rectangle"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/frameTopLine">


            <include
                android:id="@+id/searchViewAddress"
                layout="@layout/search_bar_commonlayout"
                android:layout_width="match_parent"
                android:layout_height="@dimen/_56"
                android:layout_marginTop="@dimen/_20"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
          <!--  <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/appCompatEditText"
                style="@style/fontRegular16"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="30dp"
                android:layout_marginTop="@dimen/dimens30"
                android:layout_marginEnd="30dp"
                android:background="@drawable/ic_search_box_background_upload_video"
                android:focusableInTouchMode="true"
                android:inputType="textVisiblePassword|textNoSuggestions|textCapSentences"
                android:hint="@string/search"
                android:padding="@dimen/dimens16"
                android:singleLine="true"
                android:textAlignment="center"
                android:textColor="?attr/primaryTextColor"
                android:textColorHint="?attr/primaryTextColor"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />-->

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recyclerViewCategory"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:clipToPadding="false"
                android:orientation="horizontal"
                android:paddingStart="@dimen/dimens24"
                android:paddingEnd="@dimen/dimens24"
                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/searchViewAddress"
                tools:listitem="@layout/upload_video_list_catgory_item" />

            <!--<ScrollView
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/recyclerViewCategory">-->

            <com.giphy.sdk.ui.views.GiphyGridView
                android:id="@+id/giphyGridView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dimens16"
                android:minHeight="@dimen/_100"
                app:gphCellPadding="@dimen/_12"
                app:gphDirection="vertical"
                app:gphShowCheckeredBackground="false"
                app:gphSpanCount="2"
                app:gphUseInExtensions="false"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/recyclerViewCategory"
                app:layout_constraintVertical_bias="1.0" />
            <!-- </ScrollView>-->

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

The `gphCellPadding` in GiphyGridView is not working as intended

According to docs, the gphCellPadding can be used in XML as follows:
app:gphCellPadding="12dp". Unfortunately, setting value with dp is not possible. I got the error: "Cannot resolve symbol". As I looked through the class, the variable is set to an integer, so I am setting it as 12.
This is not working either. The padding is still zero. I have checked the sample app and the cellPadding is not working for span = 1. When I set the span to 2, it is working fine.
Is there any solution for that?

giphy dialogFragment detached

when call GifsRecyclerview.configure,it will use fragment as ViewModelProvider lifecycle scope.
in some case,the fragment may be dettached,which cause exception.
And how can i aviod it, just check dialogFragment is attach before call show?
can this check logic handled by sdk?

GifSelectionListener is not set properly after process death occurs

In the following code:

https://github.com/Giphy/giphy-android-sdk-ui-example/blob/cebc9dd40cc7e45a5ba96b53b891de1dae9009a8/app/src/main/java/com/giphy/sdk/uidemo/DemoActivity.kt#L59

dialog.gifSelectionListener = getGifSelectionListener() is only executed only when the button is clicked.

However, the DialogFragment is recreated by the system after process death (refer to https://stackoverflow.com/questions/49046773/singleton-object-becomes-null-after-app-is-resumed/49107399#49107399), and the gifSelectionListener remains null.

DialogFragments are meant to use the setTargetFragment API to allow callbacks to be made to the caller reliably even after process death.


Another option is to use the tag provided to DialogFragment.show() method to use findFragmentByTag, and set the GifSelectionListener in onCreate if the dialog exists.

There is a good chance that the sample should represent that to avoid surprises.

GPHMediaView wrap_content is not effective outside RecyclerView

Hi, I am trying your example and it works well.
The example show images with GPHMediaView inside RecyclerView, but I don't need RecyclerView. I added GPHMediaView like this:

<com.giphy.sdk.ui.views.GPHMediaView
        android:id="@+id/mediaView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/composeContainer"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toolbar2" />

<android.support.v7.widget.RecyclerView
    android:id="@+id/messageFeed"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_marginBottom="8dp"
    app:layout_constraintBottom_toTopOf="@+id/composeContainer"
    app:layout_constraintTop_toBottomOf="@+id/toolbar2" />

and modifyed listener like this:

private fun getGifSelectionListener() = object : GiphyDialogFragment.GifSelectionListener {
    override fun onDismissed() {
        Log.d(TAG, "onDismissed")
    }

    override fun onGifSelected(media: Media) {
        Log.d(TAG, "onGifSelected")
        mediaView.setMedia(media)
    }
}

Then the image fills the screen like this:
device-2019-09-11-145751

What is the problem?

Thanks.

`cellPadding` not working for horizontal carousel

Hi,
as I mentioned in this issue: #36, the cellPadding is not working. Right now the do value is correct, but padding is still not displayed for horizontal single row carousel. I have double check in the sample.
Steps to reproduce:

  • Run the sample app
  • Go to grid settings
  • set span count to 1
  • set padding to 10
    The padding is missing

Expected behaviour:
The cellPadding should work as it is for double row.

Checked on following version:
1.2.6, 1.2.7, 1.2.8

setMediaWithId throws ConcurrentModificationException

Replacing itemView.gifView.setMedia(message.media) with itemView.gifView.setMediaWithId(message.media.id)
and ending https://giphy.com/gifs/southparkgifs-l2Sqj9ZOg8wAvW0Xm few times and scrolling results in this crash:

    Process: com.giphy.sdk.uidemo, PID: 16217
    java.util.ConcurrentModificationException
        at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:806)
        at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:839)
        at com.facebook.datasource.RetainingDataSourceSupplier.replaceSupplier(RetainingDataSourceSupplier.java:37)
        at com.giphy.sdk.ui.views.GifView.replaceImage(Unknown Source:44)
        at com.giphy.sdk.ui.views.GifView.loadCurrentStep(Unknown Source:83)
        at com.giphy.sdk.ui.views.GifView.loadMedia(Unknown Source:84)
        at com.giphy.sdk.ui.views.GifView.access$loadMedia(Unknown Source:0)
        at com.giphy.sdk.ui.views.GifView$media$1.run(Unknown Source:2)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

exception in proguard

I am using com.giphy.sdk:ui:1.0.1

When I run proguard, I have exceptions about json. So I added these:
-keep class com.giphy.sdk.core.models.** { ; }
-keep class com.giphy.sdk.core.network.response.
* { ; }
-keepattributes Annotation
-dontwarn com.giphy.sdk.core.
*
(You don't have any documents and your library does not have a proguard file. why?)

I can see images from your UI, but I see these exceptions a while later:
E/com.giphy.sdk.analytics.network.engine.NetworkSession: Unable to perform network request for url=https://pingback.giphy.com/pingback?api_key=RqqamE81lhXnj7tjKRHes16a8GUmRMX2&pingback_id=40d195b1-37d3-4a10-bd06-c6430e0e808c
java.lang.AssertionError: java.lang.NoSuchFieldException: FAVORITE
at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.(SourceFile:792)
at com.google.gson.internal.bind.TypeAdapters$30.create(SourceFile:818)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(SourceFile:53)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(SourceFile:53)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(SourceFile:53)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102)
at com.google.gson.Gson.getAdapter(SourceFile:458)
at com.google.gson.Gson.toJson(SourceFile:696)
at com.google.gson.Gson.toJson(SourceFile:683)
at com.google.gson.Gson.toJson(SourceFile:638)
at com.google.gson.Gson.toJson(SourceFile:618)
at com.giphy.sdk.analytics.network.engine.DefaultNetworkSession$postStringConnection$1.call(SourceFile:87)
at com.giphy.sdk.analytics.network.engine.DefaultNetworkSession$postStringConnection$1.call(SourceFile:31)
at com.giphy.sdk.analytics.threading.ApiTask$executeAsyncTask$1.run(SourceFile:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NoSuchFieldException: FAVORITE
at java.lang.Class.getField(Class.java:897)
at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.(SourceFile:781)
at com.google.gson.internal.bind.TypeAdapters$30.create(SourceFile:818) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(SourceFile:53) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(SourceFile:53) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(SourceFile:53) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(SourceFile:117) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(SourceFile:166) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(SourceFile:102) 
at com.google.gson.Gson.getAdapter(SourceFile:458) 
at com.google.gson.Gson.toJson(SourceFile:696) 
at com.google.gson.Gson.toJson(SourceFile:683) 
at com.google.gson.Gson.toJson(SourceFile:638) 
at com.google.gson.Gson.toJson(SourceFile:618) 
at com.giphy.sdk.analytics.network.engine.DefaultNetworkSession$postStringConnection$1.call(SourceFile:87) 
at com.giphy.sdk.analytics.network.engine.DefaultNetworkSession$postStringConnection$1.call(SourceFile:31) 
at com.giphy.sdk.analytics.threading.ApiTask$executeAsyncTask$1.run(SourceFile:55) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) 
at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154) 
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
at java.lang.Thread.run(Thread.java:818) 

It does not interrupt my app, but it makes me distracted. Could you check what it is?

Thanks.

scrolling issue with com.giphy.sdk.ui.views.GiphyGridView

scrolling not working

<com.giphy.sdk.ui.views.GiphyGridView
android:id="@+id/gifsGridView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:gphDirection="horizontal"
app:gphSpanCount="2"
app:gphCellPadding="12dp"
app:gphShowCheckeredBackground="false"/>

Remove network_security_config.xml

com.giphy.sdk:ui:1.2.8 (and earlier versions) includes network_security_config.xml which allows user-defined certificates for debug, and even worse allows cleartextTrafficPermitted.
This config applied to all apps which use the SDK, such behavior shouldn't be applied implicitly because decrease security level, it's true as for this sample, same as for SDK

StrictMode violation due to "Untagged socket detected"

We are getting a StrictMode violation. I've tried to ignore it by setting permitNetwork(), yet still failing.
We can't ignore this issue as we use a penaltyDeath in our StrictMode configuration.

StrictMode policy violation: android.os.strictmode.UntaggedSocketViolation: Untagged socket detected; use TrafficStats.setThreadSocketTag() to track all network usage
        at android.os.StrictMode.onUntaggedSocket(StrictMode.java:2042)
        at com.android.server.NetworkManagementSocketTagger.tag(NetworkManagementSocketTagger.java:98)
        at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:50)
        at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:313)
        at libcore.io.IoBridge.socket(IoBridge.java:640)
        at java.net.PlainSocketImpl.socketCreate(PlainSocketImpl.java:124)
        at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:128)
        at java.net.Socket.createImpl(Socket.java:489)
        at java.net.Socket.getImpl(Socket.java:552)
        at java.net.Socket.setSoTimeout(Socket.java:1180)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:139)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:26)
        at com.giphy.sdk.ui.r$b.call(Unknown Source:202)
        at com.giphy.sdk.ui.t$b.run(Unknown Source:6)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:784)
2020-06-29 22:24:52.797 29477-30125/com.perracolabs.test W/System.err: StrictMode VmPolicy violation with POLICY_DEATH; shutting down.
2020-06-29 22:24:52.797 29477-30125/com.perracolabs.test I/Process: Sending signal. PID: 29477 SIG: 9

lightweight GiphyDialogFragment or .... pass GiphyDialogFragment a search string

'm working on an app in which I'd like to show Gif content. I have obtained a test key and have successfully retrieved data from the search endPoint.
I am utilizing Speech to text as the search string.
My issues is how to display the data returned by the API on and Android phone. Attempting to use a gif url does not work well with Android ImageView or VideoViews (mp4). I was hoping the Giphy SDK would help, but that's got it's own search, which would confuse users as I want speech input. Is there a way to give GiphyDialogFragment the search string before it is created? Or maybe a smaller, subset UI to display a single media element?

contentDidUpdate return zero

Here is the code snippet of my giphyGrid with callback:

` binding.chatGiphyGrid.callback = object : GPHGridCallback {
override fun contentDidUpdate(resultCount: Int) {
Timber.i("Giphy carousel has been updated with quantity: $resultCount")
}

        override fun didSelectMedia(media: Media) {
            viewModel.addGiphyToChat(media)
        }
    }`

The contentDidUpdate function is called twice for every invoke of binding.chatGiphyGrid.content = GPHContent.searchQuery(query, MediaType.gif)

The first value is always 0. I understand that giphyView is cleared every time a new query is made, but it would be nice to have additional info like LoadingStatus to know which zeros are the cleared state and which is actual final result of the query.

Use SDK from Xamarin?

Hi, we'd like to apply for a production key for a chat app we're developing, we're investigating generating a verification code but our application is based on Xamarin Forms so we can't use your SDKs for iOS or Android directly at the moment as they are native-only.

Do you know of any way we could use for accessing your SDKs from Xamarin? Ideally a wrapper that allows the SDKs to be called from Xamarin using C# / Mono?

Thanks!

java.lang.ClassCastException: com.giphy.sdk.ui.pagination.c cannot be cast to com.giphy.sdk.core.models.Media

when there is no data,click the empty block,it will crash.
version: android v1.2.0
stack is:
Process: com.videoeditorpro.android, PID: 18652
java.lang.ClassCastException: com.giphy.sdk.ui.pagination.c cannot be cast to com.giphy.sdk.core.models.Media
at com.giphy.sdk.ui.views.GiphyDialogFragment.onGifPressed(Unknown Source:29)
at com.giphy.sdk.ui.views.GiphyDialogFragment.access$onGifPressed(Unknown Source:0)
at com.giphy.sdk.ui.views.GiphyDialogFragment$setupGifsRecycler$3.invoke(Unknown Source:9)
at com.giphy.sdk.ui.views.GiphyDialogFragment$setupGifsRecycler$3.invoke(Unknown Source:8)
at com.giphy.sdk.ui.universallist.c$f.onLongClick(Unknown Source:25)
at android.view.View.performLongClickInternal(View.java:6756)
at android.view.View.performLongClick(View.java:6714)
at android.view.View.performLongClick(View.java:6732)
at android.view.View$CheckForLongPress.run(View.java:26110)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)

SDK Demo not Available in Java

I'm trying to implement GIPHY SDK into my android app however I'm finding that your demo is pure Kotlin, half your documentation is in Java and also feels incomplete in term of missing steps. Can anyone give me any help on this one?

Tabs are overlapping when using long text localizations

As Giphy isn't localized besides english, we are making the translations ourselves by overriding the "gph_" related strings for all our supported languages.
We've found that the tabs will span over the others when the text is too long. See the next example with a Russian localization. The "results" string overlaps the "recents" string

Recents = Недавние
Results = результатов

image

Giphy setMediaTypeConfig Order

I am setting the media type configuration via this code in Android using java:
settings.setMediaTypeConfig(new GPHContentType[]{GPHContentType.emoji,GPHContentType.gif,GPHContentType.sticker,GPHContentType.text});

I want the emojis to be the first ones to load in the Giphy dialog, so I have added them in the array first. However, when I show the dialog, the gifs load first and I have to click on the Emoji tab again for the emojis to load correctly. Here is a screenshot of what I mean:

On first load:
image

After clicking the emoji tab:
image

How can I load the emojis when the dialog is first opened?

iphy/giphy-ios-sdk-ui-example] Binary XML file line #33: Binary XML file line #33: Error inflating class com.giphy.sdk.ui.views.GPHMediaView

i got this when i am trying to view animated gif in a

<com.giphy.sdk.ui.views.GifView
android:layout_width=""
android:layout_height=""

Process: com.example.smeschat, PID: 30706
android.view.InflateException: Binary XML file line #54: Binary XML file line #54: Error inflating class com.giphy.sdk.ui.views.GifView
Caused by: android.view.InflateException: Binary XML file line #54: Error inflating class com.giphy.sdk.ui.views.GifView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:334)

NoClassDefFoundError: Failed resolution of: Lcom/giphy/sdk/ui/r;

Details:
implementation 'com.giphy.sdk:ui:1.2.6'
Pixel 3a API 29 Emulator

Code:

 Giphy.configure(
                    context,
                    Settings.giphy_api(),
                    verificationMode = false
                )

Stack:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/giphy/sdk/ui/r;
        at com.giphy.sdk.ui.d.<init>(Unknown Source:30)
        at com.giphy.sdk.ui.c.<init>(Unknown Source:17)
        at com.giphy.sdk.ui.a.a(Unknown Source:45)
        at com.giphy.sdk.ui.l.a(Unknown Source:98)
        at com.giphy.sdk.ui.Giphy.configure(Unknown Source:81)

Giphy Proguard Issue

Hi,

We are using a latest version of GIPHY and alongside we are using socket client (https://github.com/socketio/socket.io-client-java) in our android app. When the network is fluctuating and the socket looses connection in socket connections callback information we are getting strange giphy sdk paths such as "com.giphy.sdk.ui.aq1: websocket error". What might be the issue here.?

Issue is not there until 1.2.0 version of GIPHY Android SDK.

Thanks in Advance.

No Class Def Exception

I got this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/giphy/sdk/ui/r
that is pointing to my Giphy.configure(this, BuildConfig.GIPHY_SDK_KEY).
I believe the library is conflicting in some way with my other dependencies. When I made a clean new project with just basic dependencies, giphy SDK works as intended. In my big project with a lot of dependencies, it works only after cleaning /build, invalidate the cache and fresh install on the device.

ClassCastException

version: android v1.2.0
Exception:
com.giphy.sdk.ui.pagination.c cannot be cast to com.giphy.sdk.core.models.Media

the stack is:
com.giphy.sdk.ui.views.GiphyDialogFragment.onGifPressed (GiphyDialogFragment.java:29)
com.giphy.sdk.ui.views.GiphyDialogFragment.access$onGifPressed (GiphyDialogFragment.java)
com.giphy.sdk.ui.views.GiphyDialogFragment$setupGifsRecycler$3.invoke (GiphyDialogFragment.java:9)
com.giphy.sdk.ui.views.GiphyDialogFragment$setupGifsRecycler$3.invoke (GiphyDialogFragment.java:8)
com.giphy.sdk.ui.universallist.c$f.onLongClick (c.java:25)

StrictMode vilation due to LeakedClosableViolation

We discovered a new StrictMode violation. This one is due to a resources not being closed.
The issue happens none-stop when scrolling through the GiphyDialogFragment.

Stacktrace:

2020-07-08 18:19:15.885 26915-26924/com.perracolabs.test D/StrictMode: StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
        at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1803)
        at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:264)
        at java.util.zip.Inflater.finalize(Inflater.java:398)
        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
        at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
        at java.lang.Daemons$Daemon.run(Daemons.java:103)
        at java.lang.Thread.run(Thread.java:784)
     Caused by: java.lang.Throwable: Explicit termination method 'end' not called
        at dalvik.system.CloseGuard.open(CloseGuard.java:221)
        at java.util.zip.Inflater.<init>(Inflater.java:114)
        at com.android.okhttp.okio.GzipSource.<init>(GzipSource.java:62)
        at com.android.okhttp.internal.http.HttpEngine.unzip(HttpEngine.java:473)
        at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:648)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:471)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:26)
        at com.giphy.sdk.ui.r.a(Unknown Source:0)
        at com.giphy.sdk.ui.r.a(Unknown Source:0)
        at com.giphy.sdk.ui.r$b.call(Unknown Source:209)
        at com.giphy.sdk.ui.t.a(Unknown Source:2)
        at com.giphy.sdk.ui.p$c.call(Unknown Source:80)
        at com.giphy.sdk.ui.t$b.run(Unknown Source:6)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:784) 

Loading a gif overwrites rounded corners

Loading a gif with
itemView.attachmentGifView.setMediaWithId(giphyMediaId)
shows the rounded corners specified in the xml, but overwrites them with a rectangular image when it is loaded. Adding a cardView and clipping doesn't fix the issue.

<androidx.cardview.widget.CardView
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="end"
   app:cardCornerRadius="20dp"
   app:cardPreventCornerOverlap="false"
   app:cardUseCompatPadding="false" 
   app:elevation="0dp">

   <com.giphy.sdk.ui.views.GPHMediaView
       android:id="@+id/attachmentGifView"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:maxWidth="200dp" />

</androidx.cardview.widget.CardView>

I didn't find a way to specify rounded corners in code or make them stay after specifying them in xml. Any help would be appreciated!

Didn't find class "com.giphy.sdk.ui.r

Create and tested a release apk, crashed at startup.

Giphy SDK version: 1.2.6

Caused by java.lang.ClassNotFoundException: Didn't find class "com.giphy.sdk.ui.r" on path: DexPathList[[zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/android.test.runner.jar", zip file "/data/app/tv.nexusgaming.streaming-i0j0xGQt80eliRqsu-oI6g==/base.apk", zip file "/data/app/tv.nexusgaming.streaming-i0j0xGQt80eliRqsu-oI6g==/split_config.armeabi_v7a.apk", zip file "/data/app/tv.nexusgaming.streaming-i0j0xGQt80eliRqsu-oI6g==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/tv.nexusgaming.streaming-i0j0xGQt80eliRqsu-oI6g==/lib/arm, /data/app/tv.nexusgaming.streaming-i0j0xGQt80eliRqsu-oI6g==/base.apk!/lib/armeabi-v7a, /data/app/tv.nexusgaming.streaming-i0j0xGQt80eliRqsu-oI6g==/split_config.armeabi_v7a.apk!/lib/armeabi-v7a, /data/app/tv.nexusgaming.streaming-i0j0xGQt80eliRqsu-oI6g==/split_config.xxhdpi.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
       at com.giphy.sdk.ui.d.<init>(:30)
       at com.giphy.sdk.ui.c.<init>(:17)
       at com.giphy.sdk.ui.a.a(:45)
       at com.giphy.sdk.ui.l.a(:98)
       at com.giphy.sdk.ui.Giphy.configure(:81)
       at tv.nexusgaming.streaming.NexplayApplication.onCreate(NexplayApplication.kt:66)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1127)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6111)
       at android.app.ActivityThread.-wrap1()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1801)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:7025)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

HTTP CLEARTEXT issue

Since I have implemented Giphy in app, my app api's does not working its gives below error. its working once I removed Giphy dependency from gradle in android. Giphy api's are working fine but my server api's getting cleartext issue because of Giphy. Please Help......

Error:
HTTP FAILED: java.net.UnknownServiceException: CLEARTEXT communication to xyz.com not permitted by network security policy

**COMPILE_SDK_VERSION = 28
BUILD_TOOL_VERSION = "28.0.3"

MIN_SDK_VERSION = 23
TARGET_SDK_VERSION = 28**

my manifest application node

<application
       android:usesCleartextTraffic="true"
       android:name=".RootApplication"
       android:allowBackup="false"
       android:hardwareAccelerated="true"
       android:icon="@mipmap/ic_launcher"
       android:label="@string/app_name"
       android:largeHeap="true"
       android:roundIcon="@mipmap/ic_launcher"
       android:supportsRtl="true"
       android:theme="@style/AppTheme"

Error inflating GiphyGridView

2020-06-11 14:34:07.068 28829-28829/com.momentsnap.android.stag E/AndroidRuntime: FATAL EXCEPTION: main Process: com.momentsnap.android.stag, PID: 28829 android.view.InflateException: Binary XML file line #62 in com.momentsnap.android.stag:layout/dialog_gif: Binary XML file line #62 in com.momentsnap.android.stag:layout/dialog_gif: Error inflating class com.giphy.sdk.ui.views.GiphyGridView Caused by: android.view.InflateException: Binary XML file line #62 in com.momentsnap.android.stag:layout/dialog_gif: Error inflating class com.giphy.sdk.ui.views.GiphyGridView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:854) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084) at android.view.LayoutInflater.inflate(LayoutInflater.java:682) at android.view.LayoutInflater.inflate(LayoutInflater.java:534) at android.view.LayoutInflater.inflate(LayoutInflater.java:481) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:438) at com.momentsnap.android.BaseDialogFragment.onCreateDialog(BaseDialogFragment.kt:35) at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:419) at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1484) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:320) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1187) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1356) at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1434) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1497) at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447) at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2169) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1992) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1947) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849) at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.ExceptionInInitializerError at com.giphy.sdk.ui.views.GiphyGridView.<init>(Unknown Source:15) at com.giphy.sdk.ui.views.GiphyGridView.<init>(Unknown Source:10) at com.giphy.sdk.ui.views.GiphyGridView.<init>(Unknown Source:6) at java.lang.reflect.Constructor.newInstance0(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:343)  at android.view.LayoutInflater.createView(LayoutInflater.java:854)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)  at android.view.LayoutInflater.inflate(LayoutInflater.java:682)  at android.view.LayoutInflater.inflate(LayoutInflater.java:534)  at android.view.LayoutInflater.inflate(LayoutInflater.java:481)  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:438)  at com.momentsnap.android.BaseDialogFragment.onCreateDialog(BaseDialogFragment.kt:35)  at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:419)  at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1484)  at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:320)  at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1187)  at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1356)  at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1434)  at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1497)  at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)  at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2169)  at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1992)  at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1947)  at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849)  at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)  at android.os.Handler.handleCallback(Handler.java:883)  at android.os.Handler.dispatchMessage(Handler.java:100)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7356)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)  Caused by: kotlin.UninitializedPropertyAccessException: lateinit property apiClient has not been initialized at a.a.a.b.b.b(Unknown Source:6) at com.giphy.sdk.ui.pagination.GPHContent.<init>(Unknown Source:24)

Verification mode does not print out a Verification ID

I'm using the Verification Instructions from https://developers.giphy.com/docs/sdk/ which state that I should do the following to verify Giphy Integration:

The first step is to obtain your Verification ID. Note that this is not the same as your API key. To get your ID, add the verificationMode parameter to the configure function like so:

The following sample code is suggested:

GiphyCoreUI.configure(context = yourContext,
 apiKey = “your api key”, verificationMode = true)

The first issue is that GiphyCoreUI is not a class, so I am doing this instead with my actual api key:

Giphy.configure(activity, "[myapikey]", verificationMode = true)

This runs successfully but does not print out any kind of verification ID to logcat. How do I get a verification ID?

Here is the logcat output I see when running this command:

D/SoLoader: init start
D/SoLoader: adding system library source: /vendor/lib
D/SoLoader: adding system library source: /system/lib
D/SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.berd.qscore-t-5FRvLxzpQffvSQ89qtbg==/lib/arm64 flags = 0]
D/SoLoader: adding backup source from : com.facebook.soloader.ApkSoSource[root = /data/data/com.berd.qscore/lib-main flags = 1]
D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.berd.qscore-t-5FRvLxzpQffvSQ89qtbg==/lib/arm64 flags = 0]
D/SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.berd.qscore/lib-main flags = 1]
I/fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.berd.qscore/lib-main
D/SoLoader: init finish: 4 SO sources prepared
D/SoLoader: init exiting
D/MOAT: b0           configure
D/MOAT: b0           loadLibrary

I am testing on:
Pixel 2
Android 10
Giphy SDK version 1.2.6

Translate Search Bar

How can I change the editText's hint in the GiphyDialogFragment to my own string value so that it is displayed in different languages?

image

JPG link

Hi ,I'm using 'com.giphy.sdk:ui:1.0.1'
any idea how to get the JPG link of the GIF selected i didn't find it in the "Media" Object returned by the sdk while its available in the api response under the tag "480w_still"
and also its possible to access the physical file path stored of the selected GIF
thank you

No Matrix scaling support please add it

mGphMediaView..scaleType = ScalingUtils.ScaleType.Matrix

Please add support for matrix scaling

if your are providing below imageMatrix then why not scaling please add support for it

(view as GPHMediaView).imageMatrix = matrix

GPHSettings "dimBackground = false" not working

I'm applying the settings found below and the dialog pops up fine and works great but the background of the application where the dialog is, is still dimmed. Does anyone know why it's not working?

    val settings = GPHSettings(gridType = GridType.waterfall, theme = DarkTheme, dimBackground = false)

Thanks so much in advance for your help!

How to set the default active GPHContentType?

When configuring GiphyDialogFragment with a list of GPHContentType(s), how to define which is the default active one?

The ideal would be to be able to restore the most recently used content type the next time GiphyDialogFragment gets opened again, as the user may have predilection for such specific content type.

Maybe a solution would be to add a new extra parameter in GPHSettings.setMediaTypeConfig(), defining the default active index from the passed GPHContentType array?

By the way, not sure if this is a bug, but in the callback onGifSelected the Media parameter always returns a MediaType set to GIF, never to emoji, text, etc., which would help to know what the user selected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.