Android jwplayer视频不';我不能参加我的活动
当活动启动时,我可以在他离开之前短暂地看到一个装载标志,但之后什么也没有发生。我遵循所有的步骤,但没有任何效果 我的xml页面在线性布局中有一个TextView和Imageview。 我检查请求的响应,如果有视频,我捕获url并将其添加到playerConfig:Android jwplayer视频不';我不能参加我的活动,android,android-activity,jwplayer,Android,Android Activity,Jwplayer,当活动启动时,我可以在他离开之前短暂地看到一个装载标志,但之后什么也没有发生。我遵循所有的步骤,但没有任何效果 我的xml页面在线性布局中有一个TextView和Imageview。 我检查请求的响应,如果有视频,我捕获url并将其添加到playerConfig: PlayerConfig playerConfig = new PlayerConfig.Builder() .file("http://videos.videos-mdr.com/20170108/s
PlayerConfig playerConfig = new PlayerConfig.Builder()
.file("http://videos.videos-mdr.com/20170108/sparrow-frozen-to-fence-rescue.mp4")
.autostart(true)
.build();
// Instantiate a new JWPlayerFragment using the playerConfig
JWPlayerView playerView = new JWPlayerView(this, playerConfig);
linearLayout.addView(playerView);
post.xml:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/llayout_article"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorVideoMdr"
app:titleTextColor="@color/colorWhite"
android:elevation="4dp"
android:theme="@style/AppTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</android.support.v7.widget.Toolbar>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/title_article"
android:layout_marginBottom="5dp"
android:textSize="20dp"
android:textStyle="bold"
android:padding="5dp"
android:textColor="#000000"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/date_article"
android:layout_marginBottom="5dp"
android:textSize="13dp"
android:textStyle="italic"
android:padding="5dp"
android:textColor="#000000"/>
</LinearLayout>
</ScrollView>
在linearLayout.addView(playerView)之前;
问题是当我切换到全屏模式时,它会保持最大高度。。。
有没有其他方法来固定特定高度而不是设置最小高度?添加xml代码好的,我刚刚添加了我的post.xml
playerView.setMinimumHeight(this.convertPxInDpi(300, context));