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