Skip to content

getColor throws exception -> Target SDK 23 #36

Open
@pbertsch

Description

@pbertsch

In the TooltipTextDrawable Class line 42 thows an exception

int backgroundColor = theme.getColor(styleable.TooltipLayout_ttlm_backgroundColor, 0);
It looks like an issue by not using the ContextCompat Class

This is the code I use to create the Tooltip

Tooltip.make(_ctx, new Tooltip.Builder(101)
                        .anchor(this, Tooltip.Gravity.CENTER)
                                .closePolicy(new Tooltip.ClosePolicy().insidePolicy(true,true).outsidePolicy(true,true),3000)
                                .activateDelay(800)
                                .showDelay(300)
                                .maxWidth(300)
                                .floatingAnimation(Tooltip.AnimationBuilder.DEFAULT)
                                .text(getBubbleText())
                                .withArrow(true)
                                .withOverlay(true)
                                .build()).show();

04-04 16:20:41.200 16638-16638/com.bansi.pagomovil E/InputEventReceiver: Exception dispatching input event.
04-04 16:20:41.200 16638-16638/com.bansi.pagomovil E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
04-04 16:20:41.220 16638-16638/com.bansi.pagomovil E/MessageQueue-JNI: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 24: TypedValue{t=0x3/d=0x8dd "res/drawable-xxhdpi-v4/list_divider_holo_light.9.png" a=1 r=0x108048d}
at android.content.res.TypedArray.getColor(TypedArray.java:447)
at it.sephiroth.android.library.tooltip.TooltipTextDrawable.(TooltipTextDrawable.java:42)
at it.sephiroth.android.library.tooltip.Tooltip$TooltipViewImpl.(Tooltip.java:477)
at it.sephiroth.android.library.tooltip.Tooltip.make(Tooltip.java:71)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions