YouTubePlayerFragment CollapsingToolbarLayout में काम नहीं कर रहा (बजाना) में काम नहीं कर रहा है (बजाना)।YouTubePlayerFragment CollapsingToolbarLayout
मैं यूट्यूब एंड्रॉइड एपीआई से यूट्यूब वीडियो खेलना चाहता हूं। CollapsingToolbarLayout के अंदर, YouTubePlayerFragment नहीं खेलता है, केवल थंबनेल आता है और 1 सेकंड के बाद यह बंद हो जाता है।
मैं अन्य लेआउट के अंदर ठीक काम करता हूं। मैं यूट्यूब वीडियो के साथ सामग्री डिजाइन ढहने लेआउट चाहता हूँ। क्रिप्या मेरि सहायता करे।
<android.support.design.widget.CoordinatorLayout
android:id="@+id/root_coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<!--<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="250dp"
android:src="@drawable/ic_launcher"
android:visibility="visible"
app:layout_collapseMode="parallax" />-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutYoutube"
android:layout_width="match_parent"
android:layout_height="250dp"
android:visibility="visible"
app:layout_collapseMode="parallax">
<fragment
android:id="@+id/youtube_fragment"
android:name="com.google.android.youtube.player.YouTubePlayerFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_collapseMode="pin">
<include
layout="@layout/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/frameContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="1dp"
android:background="@android:color/white"
android:paddingTop="2dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
ऐसा लगता है कि कोऑर्डिनेटरलाइट त्रुटि AUTHORIZED_OVERLAY त्रुटि का कारण बनता है। क्या आपने अपनी समस्या हल की? –