android-target-tooltip icon indicating copy to clipboard operation
android-target-tooltip copied to clipboard

java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x0/d=0x0}

Open firaskafri opened this issue 7 years ago • 10 comments

firaskafri avatar Nov 04 '16 19:11 firaskafri

Seems you didnt use theme or you use this library in widnowManger so add Them to your Context

bag7dad avatar Dec 02 '16 18:12 bag7dad

@medozeus @firasalkafri I am also getting the same issue. Here is my code where I displayed tooltip.

Tooltip.make(MainActivity.this,
                            new Tooltip.Builder()
                                    .anchor(v, Tooltip.Gravity.BOTTOM)
                                    .closePolicy(new Tooltip.ClosePolicy()
                                            .insidePolicy(true, false)
                                            .outsidePolicy(true, false), 3000)
                                    .activateDelay(800)
                                    .showDelay(300)
                                    .text(strToDisplay)
                                    .typeface(Typeface.DEFAULT)
                                    .withArrow(true)
                                    .withOverlay(true)
                                    .floatingAnimation(Tooltip.AnimationBuilder.DEFAULT)
                                    .build()
                    ).show();

But I am getting error:

java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x3/d=0x1d1 "res/drawable/ic_menu_moreoverflow_material.xml" a=1 r=0x10803d6} at android.content.res.TypedArray.getColor(TypedArray.java:447) at it.sephiroth.android.library.tooltip.TooltipOverlayDrawable.(TooltipOverlayDrawable.java:54) at it.sephiroth.android.library.tooltip.TooltipOverlay.init(TooltipOverlay.java:25) at it.sephiroth.android.library.tooltip.TooltipOverlay.(TooltipOverlay.java:37) at it.sephiroth.android.library.tooltip.Tooltip$TooltipViewImpl.(Tooltip.java:472) at it.sephiroth.android.library.tooltip.Tooltip.make(Tooltip.java:71) at com.cwa.eltekiq8quadselector.MainActivity$5.onClick(MainActivity.java:218) at android.view.View.performClick(View.java:5198) at android.view.View$PerformClick.run(View.java:21147) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

kevalpatel2106 avatar Jan 12 '17 10:01 kevalpatel2106

@kevalpatel2106 did you use the code in activity or in window manger you must have an theme in your context and seems you don't have theme #fb.com/deluxezeus998

bag7dad avatar Jan 13 '17 15:01 bag7dad

@medozeus I used the tooltip in activity. I did not add theme to my style file.

kevalpatel2106 avatar Jan 14 '17 09:01 kevalpatel2106

@kevalpatel2106 just try appcompatactivity theme

bag7dad avatar Jan 14 '17 11:01 bag7dad

News about this issue?

michelelacorte avatar Sep 06 '17 20:09 michelelacorte

add them to your activity or Context

On Wed, Sep 6, 2017 at 11:14 PM, Michele Lacorte [email protected] wrote:

News about this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sephiroth74/android-target-tooltip/issues/65#issuecomment-327599997, or mute the thread https://github.com/notifications/unsubscribe-auth/AOgiGXZ1UdMEpIiigqJh6CehyH4s5t1Mks5sfv0KgaJpZM4Kp5Pn .

bag7dad avatar Sep 06 '17 22:09 bag7dad

@medozeus I've do this!

michelelacorte avatar Sep 07 '17 07:09 michelelacorte

Hi! I have the same issue. Have anyone solved it? Using API level 19. Thanks. @michelelacorte have you solved it?

Fatal Exception: java.lang.RuntimeException
Failed to resolve attribute at index 96
android.content.res.TypedArray.getColor (TypedArray.java:401)
androidx.appcompat.widget.AppCompatTextView.<init> (AppCompatTextView.java:79)
it.sephiroth.android.library.xtooltip.Tooltip.preparePopup (Tooltip.kt:309)
it.sephiroth.android.library.xtooltip.Tooltip.show (Tooltip.kt:624)
......
Uo.handleMessage (PG:64)

yozhik avatar Nov 08 '19 09:11 yozhik

Hi! I have the same issue. Have anyone solved it? Using API level 19. Thanks. @michelelacorte have you solved it?

Fatal Exception: java.lang.RuntimeException
Failed to resolve attribute at index 96
android.content.res.TypedArray.getColor (TypedArray.java:401)
androidx.appcompat.widget.AppCompatTextView.<init> (AppCompatTextView.java:79)
it.sephiroth.android.library.xtooltip.Tooltip.preparePopup (Tooltip.kt:309)
it.sephiroth.android.library.xtooltip.Tooltip.show (Tooltip.kt:624)
......
Uo.handleMessage (PG:64)

I'm having the same issue

anhanh11001 avatar Jan 21 '20 16:01 anhanh11001