Commit 036441c9c03e56c46c3ddcd60abf164c12270e0a
1 parent
f2c156ea
补充提交资源文件,添加CNPlayerActivityNew启动
Showing
6 changed files
with
19 additions
and
3 deletions
.idea/gradle.xml
| @@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
| 5 | <GradleProjectSettings> | 5 | <GradleProjectSettings> |
| 6 | <option name="distributionType" value="DEFAULT_WRAPPED" /> | 6 | <option name="distributionType" value="DEFAULT_WRAPPED" /> |
| 7 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | 7 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> |
| 8 | + <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.14.1" /> | ||
| 8 | <option name="modules"> | 9 | <option name="modules"> |
| 9 | <set> | 10 | <set> |
| 10 | <option value="$PROJECT_DIR$" /> | 11 | <option value="$PROJECT_DIR$" /> |
.idea/misc.xml
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | <ConfirmationsSetting value="0" id="Add" /> | 37 | <ConfirmationsSetting value="0" id="Add" /> |
| 38 | <ConfirmationsSetting value="0" id="Remove" /> | 38 | <ConfirmationsSetting value="0" id="Remove" /> |
| 39 | </component> | 39 | </component> |
| 40 | - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | 40 | + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
| 41 | <output url="file://$PROJECT_DIR$/build/classes" /> | 41 | <output url="file://$PROJECT_DIR$/build/classes" /> |
| 42 | </component> | 42 | </component> |
| 43 | <component name="ProjectType"> | 43 | <component name="ProjectType"> |
app/src/main/AndroidManifest.xml
| @@ -28,7 +28,12 @@ | @@ -28,7 +28,12 @@ | ||
| 28 | android:name=".CNPlayerActivity" | 28 | android:name=".CNPlayerActivity" |
| 29 | android:configChanges="keyboardHidden|screenSize|orientation" | 29 | android:configChanges="keyboardHidden|screenSize|orientation" |
| 30 | android:screenOrientation="portrait" /> | 30 | android:screenOrientation="portrait" /> |
| 31 | - | 31 | + <activity |
| 32 | + android:name=".CNPlayerActivityNew" | ||
| 33 | + android:configChanges="keyboardHidden|screenSize|orientation" | ||
| 34 | + android:launchMode="singleTask" | ||
| 35 | + android:screenOrientation="portrait" | ||
| 36 | + android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> | ||
| 32 | <activity | 37 | <activity |
| 33 | android:name=".PlayerActivity" | 38 | android:name=".PlayerActivity" |
| 34 | android:configChanges="keyboardHidden|screenSize|orientation" | 39 | android:configChanges="keyboardHidden|screenSize|orientation" |
app/src/main/java/com/cnlive/demo/video/MainActivity.java
| @@ -18,6 +18,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe | @@ -18,6 +18,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe | ||
| 18 | findViewById(R.id.play).setOnClickListener(this); | 18 | findViewById(R.id.play).setOnClickListener(this); |
| 19 | findViewById(R.id.playCnlive).setOnClickListener(this); | 19 | findViewById(R.id.playCnlive).setOnClickListener(this); |
| 20 | findViewById(R.id.barrageBtn).setOnClickListener(this); | 20 | findViewById(R.id.barrageBtn).setOnClickListener(this); |
| 21 | + findViewById(R.id.videoId).setOnClickListener(this); | ||
| 21 | } | 22 | } |
| 22 | 23 | ||
| 23 | @Override | 24 | @Override |
| @@ -31,6 +32,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe | @@ -31,6 +32,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe | ||
| 31 | intent.putExtra("id",editText.getText().toString()); | 32 | intent.putExtra("id",editText.getText().toString()); |
| 32 | startActivity(intent); | 33 | startActivity(intent); |
| 33 | break; | 34 | break; |
| 35 | + case R.id.videoId: | ||
| 36 | + startActivity(new Intent(this, CNPlayerActivityNew.class)); | ||
| 37 | + break; | ||
| 34 | case R.id.barrageBtn: | 38 | case R.id.barrageBtn: |
| 35 | startActivity(new Intent(this,CNBarrageActivity.class)); | 39 | startActivity(new Intent(this,CNBarrageActivity.class)); |
| 36 | break; | 40 | break; |
app/src/main/res/drawable-xxhdpi/cnlive_video_bottom_bg.png
0 → 100644
1.34 KB
app/src/main/res/layout/activity_main.xml
| @@ -29,10 +29,16 @@ | @@ -29,10 +29,16 @@ | ||
| 29 | android:layout_toRightOf="@+id/playCnlive" | 29 | android:layout_toRightOf="@+id/playCnlive" |
| 30 | android:layout_alignBottom="@+id/playCnlive"/> | 30 | android:layout_alignBottom="@+id/playCnlive"/> |
| 31 | 31 | ||
| 32 | + <Button android:id="@+id/videoId" | ||
| 33 | + android:layout_width="wrap_content" | ||
| 34 | + android:layout_height="wrap_content" | ||
| 35 | + android:text="播放视讯云视频 点播/直播 ID" | ||
| 36 | + android:layout_below="@+id/playCnlive"/> | ||
| 37 | + | ||
| 32 | <Button | 38 | <Button |
| 33 | android:id="@+id/barrageBtn" | 39 | android:id="@+id/barrageBtn" |
| 34 | android:layout_width="wrap_content" | 40 | android:layout_width="wrap_content" |
| 35 | android:layout_height="wrap_content" | 41 | android:layout_height="wrap_content" |
| 36 | android:text="弹幕" | 42 | android:text="弹幕" |
| 37 | - android:layout_below="@+id/playCnlive"/> | 43 | + android:layout_below="@+id/videoId"/> |
| 38 | </RelativeLayout> | 44 | </RelativeLayout> |