Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3712

Warning/Error message after adding YouTube player fragment to activity: AppCompat widget that can only be used with a Theme.AppCompat theme

$
0
0

Warning/error messages

E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView 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)............another 12 warnings.................

Actiyity layout structure

<scroll view><LinearLayout><textView><imageView><textView>-------<frameLayout id="container_a">------------<textView><imageView>

Fragment layout

<LinearLayout><frameLayout>

In Activity I use this to replace the existing frameLayout with the fragment one

VideoFragment mVideoFragment = new VideoFragment(Activity.this,this,videoID);            getSupportFragmentManager().beginTransaction()                    .replace(R.id.container_a, mVideoFragment)                    .commit(); 

The problem is that when the fragment layout is added to the activity I get 15 warning messages like the first 2 and the scroll view gets stuck for a 1-2 seconds.

It's like it gives me and warning message for every textView or ImageView in the ScrollView, while the fragment with Youtube player is added.

I tried different approaches, even integrating the Youtube api player in the Activity class and the result was the same. It looked something like this: How to use YouTube Android Player API with AppCompatActivity


Viewing all articles
Browse latest Browse all 3712

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>