skydoves / Balloon

:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android.
https://skydoves.github.io/libraries/balloon/html/balloon/com.skydoves.balloon/index.html
Apache License 2.0
3.73k stars 291 forks source link

com.skydoves.balloon.vectortext.VectorTextView is an AppCompat widget #178

Closed NurAlif closed 3 years ago

NurAlif commented 3 years ago

Please complete the following information:

When creating and showing a balloon, In android studio 'run' window shows (with red-colored text): E/ThemeUtils: View class com.skydoves.balloon.vectortext.VectorTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).

Code used to create and show balloon:

myBalloon = new Balloon.Builder(ctx)
                .setArrowSize(10)
                .setArrowOrientation(ArrowOrientation.BOTTOM)
                .setArrowPositionRules(ArrowPositionRules.ALIGN_ANCHOR)
                .setWidth(BalloonSizeSpec.WRAP)
                .setHeight(50)
                .setPaddingLeft(12)
                .setPaddingRight(12)
                .setTextSize(15f)
                .setCornerRadius(4f)
                .setText(text)
                .setTextColor(ContextCompat.getColor(ctx, R.color.white))
                .setTextIsHtml(true)
                .setBackgroundColor(ContextCompat.getColor(ctx, R.color.blue_ocean))
                .build();

        myBalloon.show(view, 0, -10);

However, the balloon actually shows correctly.

skydoves commented 3 years ago

Check your styles.xml and extends Theme.AppCompat theme. References

NurAlif commented 3 years ago

I don't have styles.xml on my project, Instead, I changed the theme to Theme.AppCompat.DayNight.DarkActionBar in themes.xml but those red texts still appear.

massimilianochiodi commented 3 years ago

have the same problem ...

E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class com.skydoves.balloon.vectortext.VectorTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). I/easyWallbox: Scrivo: $DATA,READ,AD I/easyWallbox: Ricevo : $DATA,READ,AD,205,69,118,1000,7,0,0,0,0,100,100,0,0,0,0,210,0,17,0,0,0,0 E/ThemeUtils: View class com.skydoves.balloon.vectortext.VectorTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class com.skydoves.balloon.vectortext.VectorTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). I/easyWallbox: Scrivo: $DATA,READ,AD I/easyWallbox: Ricevo : $DATA,READ,AD,205,69,118,1000,7,0,0,0,0,100,100,0,0,0,0,205,0,17,0,0,0,0 E/ThemeUtils: View class com.skydoves.balloon.vectortext.VectorTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class com.skydoves.balloon.vectortext.VectorTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). I/easyWallbox: Scrivo: $DATA,READ,AD