Commit 036441c9c03e56c46c3ddcd60abf164c12270e0a

Authored by 朱显松
1 parent f2c156ea

补充提交资源文件,添加CNPlayerActivityNew启动

.idea/gradle.xml
... ... @@ -5,6 +5,7 @@
5 5 <GradleProjectSettings>
6 6 <option name="distributionType" value="DEFAULT_WRAPPED" />
7 7 <option name="externalProjectPath" value="$PROJECT_DIR$" />
  8 + <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.14.1" />
8 9 <option name="modules">
9 10 <set>
10 11 <option value="$PROJECT_DIR$" />
... ...
.idea/misc.xml
... ... @@ -37,7 +37,7 @@
37 37 <ConfirmationsSetting value="0" id="Add" />
38 38 <ConfirmationsSetting value="0" id="Remove" />
39 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 41 <output url="file://$PROJECT_DIR$/build/classes" />
42 42 </component>
43 43 <component name="ProjectType">
... ...
app/src/main/AndroidManifest.xml
... ... @@ -28,7 +28,12 @@
28 28 android:name=".CNPlayerActivity"
29 29 android:configChanges="keyboardHidden|screenSize|orientation"
30 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 37 <activity
33 38 android:name=".PlayerActivity"
34 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 18 findViewById(R.id.play).setOnClickListener(this);
19 19 findViewById(R.id.playCnlive).setOnClickListener(this);
20 20 findViewById(R.id.barrageBtn).setOnClickListener(this);
  21 + findViewById(R.id.videoId).setOnClickListener(this);
21 22 }
22 23  
23 24 @Override
... ... @@ -31,6 +32,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
31 32 intent.putExtra("id",editText.getText().toString());
32 33 startActivity(intent);
33 34 break;
  35 + case R.id.videoId:
  36 + startActivity(new Intent(this, CNPlayerActivityNew.class));
  37 + break;
34 38 case R.id.barrageBtn:
35 39 startActivity(new Intent(this,CNBarrageActivity.class));
36 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 29 android:layout_toRightOf="@+id/playCnlive"
30 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 38 <Button
33 39 android:id="@+id/barrageBtn"
34 40 android:layout_width="wrap_content"
35 41 android:layout_height="wrap_content"
36 42 android:text="弹幕"
37   - android:layout_below="@+id/playCnlive"/>
  43 + android:layout_below="@+id/videoId"/>
38 44 </RelativeLayout>
... ...