Commit 92982f93a9569e526a6d0c4146113290b02d32e5
0 parents
添加娱票儿demo
Showing
149 changed files
with
3830 additions
and
0 deletions
.gitignore
0 → 100644
.idea/compiler.xml
0 → 100644
| 1 | +++ a/.idea/compiler.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project version="4"> | |
| 3 | + <component name="CompilerConfiguration"> | |
| 4 | + <resourceExtensions /> | |
| 5 | + <wildcardResourcePatterns> | |
| 6 | + <entry name="!?*.java" /> | |
| 7 | + <entry name="!?*.form" /> | |
| 8 | + <entry name="!?*.class" /> | |
| 9 | + <entry name="!?*.groovy" /> | |
| 10 | + <entry name="!?*.scala" /> | |
| 11 | + <entry name="!?*.flex" /> | |
| 12 | + <entry name="!?*.kt" /> | |
| 13 | + <entry name="!?*.clj" /> | |
| 14 | + <entry name="!?*.aj" /> | |
| 15 | + </wildcardResourcePatterns> | |
| 16 | + <annotationProcessing> | |
| 17 | + <profile default="true" name="Default" enabled="false"> | |
| 18 | + <processorPath useClasspath="true" /> | |
| 19 | + </profile> | |
| 20 | + </annotationProcessing> | |
| 21 | + </component> | |
| 22 | +</project> | |
| 0 | 23 | \ No newline at end of file | ... | ... |
.idea/copyright/profiles_settings.xml
0 → 100644
.idea/gradle.xml
0 → 100644
| 1 | +++ a/.idea/gradle.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project version="4"> | |
| 3 | + <component name="GradleSettings"> | |
| 4 | + <option name="linkedExternalProjectsSettings"> | |
| 5 | + <GradleProjectSettings> | |
| 6 | + <option name="distributionType" value="DEFAULT_WRAPPED" /> | |
| 7 | + <option name="externalProjectPath" value="$PROJECT_DIR$" /> | |
| 8 | + <option name="modules"> | |
| 9 | + <set> | |
| 10 | + <option value="$PROJECT_DIR$" /> | |
| 11 | + <option value="$PROJECT_DIR$/app" /> | |
| 12 | + </set> | |
| 13 | + </option> | |
| 14 | + <option name="resolveModulePerSourceSet" value="false" /> | |
| 15 | + </GradleProjectSettings> | |
| 16 | + </option> | |
| 17 | + </component> | |
| 18 | +</project> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
.idea/misc.xml
0 → 100644
| 1 | +++ a/.idea/misc.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project version="4"> | |
| 3 | + <component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
| 4 | + <OptionsSetting value="true" id="Add" /> | |
| 5 | + <OptionsSetting value="true" id="Remove" /> | |
| 6 | + <OptionsSetting value="true" id="Checkout" /> | |
| 7 | + <OptionsSetting value="true" id="Update" /> | |
| 8 | + <OptionsSetting value="true" id="Status" /> | |
| 9 | + <OptionsSetting value="true" id="Edit" /> | |
| 10 | + <ConfirmationsSetting value="0" id="Add" /> | |
| 11 | + <ConfirmationsSetting value="0" id="Remove" /> | |
| 12 | + </component> | |
| 13 | + <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"> | |
| 14 | + <output url="file://$PROJECT_DIR$/build/classes" /> | |
| 15 | + </component> | |
| 16 | + <component name="ProjectType"> | |
| 17 | + <option name="id" value="Android" /> | |
| 18 | + </component> | |
| 19 | + <component name="masterDetails"> | |
| 20 | + <states> | |
| 21 | + <state key="ProjectJDKs.UI"> | |
| 22 | + <settings> | |
| 23 | + <last-edited>1.8</last-edited> | |
| 24 | + <splitter-proportions> | |
| 25 | + <option name="proportions"> | |
| 26 | + <list> | |
| 27 | + <option value="0.2" /> | |
| 28 | + </list> | |
| 29 | + </option> | |
| 30 | + </splitter-proportions> | |
| 31 | + </settings> | |
| 32 | + </state> | |
| 33 | + </states> | |
| 34 | + </component> | |
| 35 | +</project> | |
| 0 | 36 | \ No newline at end of file | ... | ... |
.idea/modules.xml
0 → 100644
| 1 | +++ a/.idea/modules.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project version="4"> | |
| 3 | + <component name="ProjectModuleManager"> | |
| 4 | + <modules> | |
| 5 | + <module fileurl="file://$PROJECT_DIR$/CNPlayerDemo.iml" filepath="$PROJECT_DIR$/CNPlayerDemo.iml" /> | |
| 6 | + <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | |
| 7 | + </modules> | |
| 8 | + </component> | |
| 9 | +</project> | |
| 0 | 10 | \ No newline at end of file | ... | ... |
.idea/runConfigurations.xml
0 → 100644
| 1 | +++ a/.idea/runConfigurations.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project version="4"> | |
| 3 | + <component name="RunConfigurationProducerService"> | |
| 4 | + <option name="ignoredProducers"> | |
| 5 | + <set> | |
| 6 | + <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" /> | |
| 7 | + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" /> | |
| 8 | + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" /> | |
| 9 | + </set> | |
| 10 | + </option> | |
| 11 | + </component> | |
| 12 | +</project> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
app/.gitignore
0 → 100644
app/build.gradle
0 → 100644
| 1 | +++ a/app/build.gradle | |
| 1 | +apply plugin: 'com.android.application' | |
| 2 | + | |
| 3 | +android { | |
| 4 | + compileSdkVersion 23 | |
| 5 | + buildToolsVersion '23.0.3' | |
| 6 | + defaultConfig { | |
| 7 | + applicationId "com.wepiao.star.starlive" | |
| 8 | + minSdkVersion 16 | |
| 9 | + targetSdkVersion 22 | |
| 10 | + versionCode 1 | |
| 11 | + versionName "1.0" | |
| 12 | + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
| 13 | + } | |
| 14 | + buildTypes { | |
| 15 | + release { | |
| 16 | + minifyEnabled false | |
| 17 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
| 18 | + } | |
| 19 | + } | |
| 20 | +} | |
| 21 | + | |
| 22 | +dependencies { | |
| 23 | + compile fileTree(include: ['*.jar'], dir: 'libs') | |
| 24 | + compile 'com.android.support:appcompat-v7:23.4.0' | |
| 25 | + compile 'com.android.support:recyclerview-v7:23.4.0' | |
| 26 | + compile 'org.igniterealtime.smack:smack-android-extensions:4.1.4' | |
| 27 | + compile 'org.igniterealtime.smack:smack-tcp:4.1.4' | |
| 28 | + compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3' | |
| 29 | + compile files('libs/cnvideo_2.0.jar') | |
| 30 | +} | ... | ... |
app/libs/cnvideo_2.0.jar
0 → 100644
No preview for this file type
app/proguard-rules.pro
0 → 100644
| 1 | +++ a/app/proguard-rules.pro | |
| 1 | +# Add project specific ProGuard rules here. | |
| 2 | +# By default, the flags in this file are appended to flags specified | |
| 3 | +# in C:\Users\bjwan\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt | |
| 4 | +# You can edit the include path and order by changing the proguardFiles | |
| 5 | +# directive in build.gradle. | |
| 6 | +# | |
| 7 | +# For more details, see | |
| 8 | +# http://developer.android.com/guide/developing/tools/proguard.html | |
| 9 | + | |
| 10 | +# Add any project specific keep options here: | |
| 11 | + | |
| 12 | +# If your project uses WebView with JS, uncomment the following | |
| 13 | +# and specify the fully qualified class name to the JavaScript interface | |
| 14 | +# class: | |
| 15 | +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | |
| 16 | +# public *; | |
| 17 | +#} | ... | ... |
app/src/main/AndroidManifest.xml
0 → 100644
| 1 | +++ a/app/src/main/AndroidManifest.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + package="com.wepiao.star.starlive"> | |
| 4 | + | |
| 5 | + <uses-permission android:name="android.permission.INTERNET" /> | |
| 6 | + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
| 7 | + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |
| 8 | + <uses-permission android:name="android.permission.READ_PHONE_STATE"/> | |
| 9 | + | |
| 10 | + <uses-permission android:name="android.permission.READ_PHONE_STATE" /> | |
| 11 | + <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> | |
| 12 | + <uses-permission android:name="android.permission.INTERNET" /> | |
| 13 | + <uses-permission android:name="android.permission.READ_PHONE_SINTERNETWIFI_STATE" /> | |
| 14 | + <uses-permission android:name="android.permission.CAMERA" /> | |
| 15 | + <uses-permission android:name="android.permission.RECORD_AUDIO" /> | |
| 16 | + <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> | |
| 17 | + <uses-permission android:name="android.permission.FLASHLIGHT" /> | |
| 18 | + <uses-permission android:name="android.permission.VIBRATE" /> | |
| 19 | + <!-- 硬件特性 --> | |
| 20 | + <uses-feature android:name="android.hardware.camera" /> | |
| 21 | + <uses-feature android:name="android.hardware.camera.autofocus" /> | |
| 22 | + <uses-feature android:name="android.hardware.camera.flash" /> | |
| 23 | + <!----> | |
| 24 | + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |
| 25 | + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
| 26 | + | |
| 27 | + <application | |
| 28 | + android:name="com.wepiao.star.starlive.TestApplication" | |
| 29 | + android:allowBackup="true" | |
| 30 | + android:icon="@mipmap/ic_launcher" | |
| 31 | + android:label="@string/app_name" | |
| 32 | + android:supportsRtl="true" | |
| 33 | + android:theme="@style/AppTheme"> | |
| 34 | + <activity android:name="com.wepiao.star.starlive.MainActivity"> | |
| 35 | + <intent-filter> | |
| 36 | + <action android:name="android.intent.action.MAIN" /> | |
| 37 | + | |
| 38 | + <category android:name="android.intent.category.LAUNCHER" /> | |
| 39 | + </intent-filter> | |
| 40 | + </activity> | |
| 41 | + | |
| 42 | + <activity | |
| 43 | + android:name="com.wepiao.star.starlive.ui.PlayerActivity" | |
| 44 | + android:configChanges="keyboardHidden|screenSize|orientation" | |
| 45 | + android:launchMode="singleTask" | |
| 46 | + android:screenOrientation="portrait" | |
| 47 | + android:theme="@style/Theme.AppCompat.Light.NoActionBar" | |
| 48 | + android:windowSoftInputMode="adjustResize"/> | |
| 49 | + | |
| 50 | + <activity | |
| 51 | + android:name="com.wepiao.star.starlive.ui.PlayerUgcActivity" | |
| 52 | + android:configChanges="keyboardHidden|screenSize|orientation" | |
| 53 | + android:launchMode="singleTask" | |
| 54 | + android:screenOrientation="portrait" | |
| 55 | + android:theme="@style/Theme.AppCompat.Light.NoActionBar" | |
| 56 | + android:windowSoftInputMode="adjustResize" /> | |
| 57 | + | |
| 58 | + | |
| 59 | + <activity | |
| 60 | + android:name="com.wepiao.star.starlive.ui.StreamActivity" | |
| 61 | + android:configChanges="orientation|keyboardHidden|screenSize" | |
| 62 | + android:launchMode="singleTop" | |
| 63 | + android:screenOrientation="portrait" /> | |
| 64 | + </application> | |
| 65 | + | |
| 66 | +</manifest> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
app/src/main/java/com/wepiao/star/starlive/MainActivity.java
0 → 100644
| 1 | +++ a/app/src/main/java/com/wepiao/star/starlive/MainActivity.java | |
| 1 | +package com.wepiao.star.starlive; | |
| 2 | + | |
| 3 | +import android.content.Intent; | |
| 4 | +import android.os.Bundle; | |
| 5 | +import android.support.v7.app.AppCompatActivity; | |
| 6 | +import android.view.View; | |
| 7 | + | |
| 8 | +import com.wepiao.star.starlive.ui.PlayerActivity; | |
| 9 | +import com.wepiao.star.starlive.ui.PlayerUgcActivity; | |
| 10 | +import com.wepiao.star.starlive.ui.StreamActivity; | |
| 11 | + | |
| 12 | +public class MainActivity extends AppCompatActivity implements View.OnClickListener { | |
| 13 | + | |
| 14 | + @Override | |
| 15 | + protected void onCreate(Bundle savedInstanceState) { | |
| 16 | + super.onCreate(savedInstanceState); | |
| 17 | + setContentView(R.layout.activity_main); | |
| 18 | + } | |
| 19 | + | |
| 20 | + @Override | |
| 21 | + public void onClick(View v) { | |
| 22 | + Intent intent ; | |
| 23 | + switch (v.getId()){ | |
| 24 | + case R.id.click_player_live: | |
| 25 | + intent = new Intent(MainActivity.this, PlayerActivity.class); | |
| 26 | + startActivity(intent); | |
| 27 | + break; | |
| 28 | + case R.id.click_player_ugc_live: | |
| 29 | + intent = new Intent(MainActivity.this, PlayerUgcActivity.class); | |
| 30 | + intent.putExtra("channelId", "yupiao"); | |
| 31 | + intent.putExtra("type", "ugcLive"); | |
| 32 | + intent.putExtra("flyKissPrice", "10"); | |
| 33 | + intent.putExtra("hasMovie", true); | |
| 34 | + startActivity(intent); | |
| 35 | + break; | |
| 36 | + case R.id.click_player_ugc_vod: | |
| 37 | + intent = new Intent(MainActivity.this, PlayerUgcActivity.class); | |
| 38 | + intent.putExtra("vId","20161126"); | |
| 39 | + intent.putExtra("type","ugcVod"); | |
| 40 | + intent.putExtra("hasMovie", true); | |
| 41 | + startActivity(intent); | |
| 42 | + break; | |
| 43 | + case R.id.click_player_ugc_stream: | |
| 44 | + intent = new Intent(MainActivity.this, StreamActivity.class); | |
| 45 | + startActivity(intent); | |
| 46 | + break; | |
| 47 | + } | |
| 48 | + } | |
| 49 | +} | ... | ... |
app/src/main/java/com/wepiao/star/starlive/TestApplication.java
0 → 100644
| 1 | +++ a/app/src/main/java/com/wepiao/star/starlive/TestApplication.java | |
| 1 | +package com.wepiao.star.starlive; | |
| 2 | + | |
| 3 | +import android.app.Application; | |
| 4 | + | |
| 5 | +import com.cnlive.libs.util.Config; | |
| 6 | +import com.nostra13.universalimageloader.core.ImageLoader; | |
| 7 | +import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * Created by xiansong on 2016/7/8. | |
| 11 | + */ | |
| 12 | +public class TestApplication extends Application { | |
| 13 | + @Override | |
| 14 | + public void onCreate() { | |
| 15 | + super.onCreate(); | |
| 16 | + | |
| 17 | + Config.init(this,"27_itclq5g039","2f5f46cffedbfc37105b3ad66d9cf473557920bdc8837c"); | |
| 18 | + | |
| 19 | + ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this).build(); | |
| 20 | + ImageLoader.getInstance().init(configuration); | |
| 21 | + } | |
| 22 | +} | ... | ... |
app/src/main/java/com/wepiao/star/starlive/model/BaseContributionInfo.java
0 → 100644
| 1 | +++ a/app/src/main/java/com/wepiao/star/starlive/model/BaseContributionInfo.java | |
| 1 | +package com.wepiao.star.starlive.model; | |
| 2 | + | |
| 3 | +import com.cnlive.lib_cnvideo.model.ContributionInfo; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * Created by xiansong on 2016/9/5. | |
| 7 | + */ | |
| 8 | +public class BaseContributionInfo implements ContributionInfo { | |
| 9 | + | |
| 10 | + private String avatar; | |
| 11 | + private String count; | |
| 12 | + | |
| 13 | + public BaseContributionInfo(String avatar, String count) { | |
| 14 | + this.avatar = avatar; | |
| 15 | + this.count = count; | |
| 16 | + } | |
| 17 | + | |
| 18 | + @Override | |
| 19 | + public String getAvatar() { | |
| 20 | + return avatar; | |
| 21 | + } | |
| 22 | + | |
| 23 | + public void setAvatar(String avatar) { | |
| 24 | + this.avatar = avatar; | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public String getCount() { | |
| 29 | + return count; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void setCount(String count) { | |
| 33 | + this.count = count; | |
| 34 | + } | |
| 35 | +} | ... | ... |
app/src/main/java/com/wepiao/star/starlive/ui/PlayerActivity.java
0 → 100644
| 1 | +++ a/app/src/main/java/com/wepiao/star/starlive/ui/PlayerActivity.java | |
| 1 | +package com.wepiao.star.starlive.ui; | |
| 2 | + | |
| 3 | +import android.graphics.Color; | |
| 4 | +import android.os.Bundle; | |
| 5 | +import android.support.annotation.Nullable; | |
| 6 | +import android.text.Spannable; | |
| 7 | +import android.text.SpannableString; | |
| 8 | +import android.text.style.ForegroundColorSpan; | |
| 9 | +import android.text.style.UnderlineSpan; | |
| 10 | +import android.view.View; | |
| 11 | +import android.widget.Toast; | |
| 12 | + | |
| 13 | +import com.cnlive.lib_cnvideo.ui.CnlivePlayerActivity; | |
| 14 | +import com.cnlive.libs.chat.ChatState; | |
| 15 | +import com.ksyun.media.player.IMediaPlayer; | |
| 16 | +import com.wepiao.star.starlive.R; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * Created by gujun on 2016/7/7. | |
| 20 | + */ | |
| 21 | +public class PlayerActivity extends CnlivePlayerActivity { | |
| 22 | + | |
| 23 | + private static final String room = "cnlivetest"; | |
| 24 | + private static final String name = "游客"; | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + protected void onCreate(@Nullable Bundle savedInstanceState) { | |
| 28 | + super.onCreate(savedInstanceState); | |
| 29 | + setContentView(R.layout.cnlive_activity_player); | |
| 30 | + //初始化播放器 channelID | |
| 31 | + setVideoMessage("xinyingshi"); | |
| 32 | + //初始化弹幕视图 间隔时间,行数,行弹幕最大值,速度(0.1-1.0) | |
| 33 | + initBarrage(400, 5, 10, 0.5f); | |
| 34 | + //初始化聊天室 房间号,用户昵称 | |
| 35 | + initChat(room, name); | |
| 36 | + | |
| 37 | + } | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + protected void shareViewClick() { | |
| 41 | + Toast.makeText(this, "分享", Toast.LENGTH_SHORT).show(); | |
| 42 | + } | |
| 43 | + | |
| 44 | + /** | |
| 45 | + * @param iMediaPlayer | |
| 46 | + * @param what | |
| 47 | + * @param extra 对应错误信息详见说明文档 | |
| 48 | + * 播放异常重试功能调用retryToPlay(); | |
| 49 | + */ | |
| 50 | + @Override | |
| 51 | + protected void onPlayStateError(int flag, IMediaPlayer iMediaPlayer, int what, String extra) { | |
| 52 | + super.onPlayStateError(flag, iMediaPlayer, what, extra); | |
| 53 | + //使用方法: | |
| 54 | + // 1.如果使用sdk自带的加载失败界面的话请加上super.onPlayStateError(iMediaPlayer,what,extra); | |
| 55 | + // 2.如果不适用sdk自带的加载失败界面的话请删除super.onPlayStateError(iMediaPlayer,what,extra), | |
| 56 | + // 在app端新建的加载失败页面的重试按钮添加点击事件调用retryToPlay();添加重试功能 | |
| 57 | + Toast.makeText(this, "播放异常", Toast.LENGTH_SHORT).show(); | |
| 58 | + } | |
| 59 | + | |
| 60 | + @Override | |
| 61 | + protected void showInputLimitDialog() { | |
| 62 | + //TODO 展示限制60输入的dialog 注意:添加dialog要进行if(!dialog.isShowing())的判断,否则会有弹出多次问题 | |
| 63 | + Toast.makeText(this, "展示输入超过60字的提示框", Toast.LENGTH_SHORT).show(); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @Override | |
| 67 | + protected void showInputSensitiveWordsDialog(String msg) { | |
| 68 | + //TODO 展示敏感词的dialog | |
| 69 | + Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); | |
| 70 | + } | |
| 71 | + | |
| 72 | + //聊天室事件监听 | |
| 73 | + @Override | |
| 74 | + public void onChatState(int what, String extra) { | |
| 75 | + switch (what) { | |
| 76 | + case ChatState.StateInitDone: //初始化完成 | |
| 77 | + connectChat();//连接聊天室 | |
| 78 | + break; | |
| 79 | + case ChatState.ErrorInitAuth: //认证失败 | |
| 80 | + case ChatState.ErrorInitNetwork: //未检测到网络 | |
| 81 | + case ChatState.ErrorInitOther: //初始化错误 | |
| 82 | + showMessage("聊天室初始化失败,点击重试", clickErrorInit);//设置错误信息 | |
| 83 | + break; | |
| 84 | + case ChatState.StateConnect: //与服务器建立连接 | |
| 85 | + break; | |
| 86 | + case ChatState.StateJoin: //聊天室登录成功 | |
| 87 | + hideMessage();//隐藏错误信息 | |
| 88 | + break; | |
| 89 | + case ChatState.StateReconnect: //与服务器重新连接 | |
| 90 | + connectChat(); | |
| 91 | + break; | |
| 92 | + case ChatState.ErrorConnect: //连接服务器失败 | |
| 93 | + case ChatState.ErrorChat: //聊天室连接失败 | |
| 94 | + case ChatState.ErrorName: //昵称冲突 | |
| 95 | + String message = "聊天室连接失败,点击重试"; | |
| 96 | + SpannableString spannableString = new SpannableString(message); //定义文字样式 | |
| 97 | + spannableString.setSpan(new UnderlineSpan(), message.length() - 2, message.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); | |
| 98 | + spannableString.setSpan(new ForegroundColorSpan(Color.rgb(255, 213, 0)), message.length() - 2, message.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); | |
| 99 | + showMessage(spannableString, clickErrorConnect);//设置错误信息 | |
| 100 | + break; | |
| 101 | + case ChatState.ErrorConnectCloseOnError: //聊天室异常断开 | |
| 102 | + showMessage("聊天室已断开,请检查网络"); | |
| 103 | + break; | |
| 104 | + case ChatState.ErrorSendOther: //消息发送失败 | |
| 105 | + Toast.makeText(this,extra, Toast.LENGTH_SHORT).show(); | |
| 106 | + break; | |
| 107 | + case ChatState.ErrorSendNoConnect: //消息发送失败 没有连接聊天室 | |
| 108 | + Toast.makeText(this,extra, Toast.LENGTH_SHORT).show(); | |
| 109 | + break; | |
| 110 | + } | |
| 111 | + } | |
| 112 | + | |
| 113 | + //聊天室连接失败 点击事件 | |
| 114 | + protected View.OnClickListener clickErrorConnect = new View.OnClickListener() { | |
| 115 | + @Override | |
| 116 | + public void onClick(View v) { | |
| 117 | + v.setOnClickListener(null); | |
| 118 | + connectChat(); | |
| 119 | + } | |
| 120 | + }; | |
| 121 | + | |
| 122 | + //聊天室初始化失败 点击事件 | |
| 123 | + protected View.OnClickListener clickErrorInit = new View.OnClickListener() { | |
| 124 | + @Override | |
| 125 | + public void onClick(View v) { | |
| 126 | + v.setOnClickListener(null); | |
| 127 | + initChat(room, name); | |
| 128 | + } | |
| 129 | + }; | |
| 130 | +} | ... | ... |
app/src/main/java/com/wepiao/star/starlive/ui/PlayerUgcActivity.java
0 → 100644
| 1 | +++ a/app/src/main/java/com/wepiao/star/starlive/ui/PlayerUgcActivity.java | |
| 1 | +package com.wepiao.star.starlive.ui; | |
| 2 | + | |
| 3 | +import android.content.Intent; | |
| 4 | +import android.graphics.Color; | |
| 5 | +import android.os.Bundle; | |
| 6 | +import android.support.annotation.Nullable; | |
| 7 | +import android.text.Spannable; | |
| 8 | +import android.text.SpannableString; | |
| 9 | +import android.text.style.ForegroundColorSpan; | |
| 10 | +import android.text.style.UnderlineSpan; | |
| 11 | +import android.view.View; | |
| 12 | +import android.widget.Toast; | |
| 13 | + | |
| 14 | +import com.wepiao.star.starlive.R; | |
| 15 | +import com.wepiao.star.starlive.model.BaseContributionInfo; | |
| 16 | +import com.cnlive.lib_cnvideo.model.ContributionInfo; | |
| 17 | +import com.cnlive.lib_cnvideo.ui.CnliveUgcPlayerActivity; | |
| 18 | +import com.cnlive.lib_cnvideo.ui.widget.player.CNMediaPlayerType; | |
| 19 | +import com.cnlive.libs.chat.ChatState; | |
| 20 | +import com.ksyun.media.player.IMediaPlayer; | |
| 21 | + | |
| 22 | +import java.util.ArrayList; | |
| 23 | +import java.util.List; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * Created by gujun on 2016/7/12. | |
| 27 | + */ | |
| 28 | +public class PlayerUgcActivity extends CnliveUgcPlayerActivity { | |
| 29 | + private String vId; | |
| 30 | + private String channelId; | |
| 31 | + private String type; | |
| 32 | + private boolean hasMovie; | |
| 33 | + private String flyKissPrice; | |
| 34 | + | |
| 35 | + private static final String room = "cnlivetest"; | |
| 36 | + private static final String name = "游客"+ System.currentTimeMillis(); | |
| 37 | + | |
| 38 | + //TODO 问题消息体 {"type":"question","user_name":"name","mbody":"test message","imgurl":"http://y3.cnliveimg.com:8080/image/itv/2016/0729/c48d1db2dc1641f19d90ef23e294d34a_139042_100.jpg","num":"5"} | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + protected void onCreate(@Nullable Bundle savedInstanceState) { | |
| 42 | + super.onCreate(savedInstanceState); | |
| 43 | + setContentView(R.layout.cnlive_activity_ugc_player); | |
| 44 | + | |
| 45 | + addData(getIntent()); | |
| 46 | + | |
| 47 | + //更新排行榜列表 | |
| 48 | + findViewById(R.id.test1).setOnClickListener(new View.OnClickListener() { | |
| 49 | + @Override | |
| 50 | + public void onClick(View v) { | |
| 51 | + List<ContributionInfo> list = new ArrayList<>(); | |
| 52 | + list.add(new BaseContributionInfo("http://v1.qzone.cc/avatar/201403/23/11/54/532e5aefc546e496.jpg!200x200.jpg","1")); | |
| 53 | + list.add(new BaseContributionInfo("http://imgsrc.baidu.com/baike/pic/item/c2fdfc039245d6882d5d54d9a6c27d1ed21b2474.jpg","2")); | |
| 54 | + list.add(new BaseContributionInfo("http://img2.a0bi.com/upload/ttq/20160709/1468043314019.png","1")); | |
| 55 | + list.add(new BaseContributionInfo("http://b.hiphotos.baidu.com/zhidao/pic/item/d1a20cf431adcbefef0f982fabaf2edda3cc9fe4.jpg","2")); | |
| 56 | + list.add(new BaseContributionInfo("http://img2.a0bi.com/upload/ttq/20160817/1471399679901.png","1")); | |
| 57 | + list.add(new BaseContributionInfo("http://img2.a0bi.com/upload/ttq/20160709/1468043314019.png","2")); | |
| 58 | + updateContributionList(list); | |
| 59 | + } | |
| 60 | + }); | |
| 61 | + | |
| 62 | + //更新收入 | |
| 63 | + findViewById(R.id.test2).setOnClickListener(new View.OnClickListener() { | |
| 64 | + @Override | |
| 65 | + public void onClick(View v) { | |
| 66 | + updateIncome(2334455); | |
| 67 | + } | |
| 68 | + }); | |
| 69 | + | |
| 70 | + //更新累计关注人数 | |
| 71 | + findViewById(R.id.test3).setOnClickListener(new View.OnClickListener() { | |
| 72 | + @Override | |
| 73 | + public void onClick(View v) { | |
| 74 | + updateFollowCount(1122333); | |
| 75 | + } | |
| 76 | + }); | |
| 77 | + | |
| 78 | + if("ugcLive".equals(type)){ | |
| 79 | + //初始化弹幕视图 间隔时间,行数,行弹幕最大值,速度(0.1-1.0) | |
| 80 | + initTopBarrage(400, 2, 10, 0.5f); | |
| 81 | + initBottomBarrage(400, 5, 10, 0.5f); | |
| 82 | + //初始化聊天室 房间号,用户昵称 | |
| 83 | + initChat(room, name); | |
| 84 | + } | |
| 85 | + | |
| 86 | + } | |
| 87 | + | |
| 88 | + //内部view创建完成可以进行相关的更新ui操作 | |
| 89 | + @Override | |
| 90 | + public void viewCreated() { | |
| 91 | + //TODO 添加相关的更新ui操作 | |
| 92 | + updateIncome(2334455); | |
| 93 | + } | |
| 94 | + | |
| 95 | + @Override | |
| 96 | + protected void onNewIntent(Intent intent) { | |
| 97 | + super.onNewIntent(intent); | |
| 98 | + addData(intent); | |
| 99 | + } | |
| 100 | + | |
| 101 | + private void addData(Intent intent) { | |
| 102 | + if(intent == null) return; | |
| 103 | + if (intent.hasExtra("vId")) | |
| 104 | + vId = intent.getStringExtra("vId"); | |
| 105 | + if (intent.hasExtra("channelId")) | |
| 106 | + channelId = intent.getStringExtra("channelId"); | |
| 107 | + if (intent.hasExtra("type")) | |
| 108 | + type = intent.getStringExtra("type"); | |
| 109 | + if (intent.hasExtra("flyKissPrice")) | |
| 110 | + flyKissPrice = intent.getStringExtra("flyKissPrice"); | |
| 111 | + if (intent.hasExtra("hasMovie")) | |
| 112 | + hasMovie = intent.getBooleanExtra("hasMovie",false); | |
| 113 | + if(type.equals("ugcLive")){ | |
| 114 | + // channelId直播节目频道id; hasMovie:有无电影; flyKissPrice:购买飞吻钱数(无电影时必须传值,有电影时传空即可) | |
| 115 | + setLiveVideoData(channelId, hasMovie, flyKissPrice); | |
| 116 | + }else if(type.equals("ugcVod")){ | |
| 117 | + //vId点播节目id ;hasMovie:有无电影 | |
| 118 | + setVodVideoData(vId,hasMovie); | |
| 119 | + }else{ | |
| 120 | + Toast.makeText(this,"暂不支持此种视频类型", Toast.LENGTH_LONG).show(); | |
| 121 | + } | |
| 122 | + } | |
| 123 | + | |
| 124 | + @Override | |
| 125 | + protected void shareViewClick() { | |
| 126 | + Toast.makeText(this, "分享点击", Toast.LENGTH_SHORT).show(); | |
| 127 | + } | |
| 128 | + | |
| 129 | + @Override | |
| 130 | + protected void anchorInfoClick() { | |
| 131 | + Toast.makeText(this, "主播信息点击", Toast.LENGTH_SHORT).show(); | |
| 132 | + } | |
| 133 | + | |
| 134 | + @Override | |
| 135 | + protected void contributionListClick() { | |
| 136 | + Toast.makeText(this, "贡献榜点击", Toast.LENGTH_SHORT).show(); | |
| 137 | + } | |
| 138 | + | |
| 139 | + @Override | |
| 140 | + protected void supportAnchorClick() { | |
| 141 | + Toast.makeText(this, "支持TA点击", Toast.LENGTH_SHORT).show(); | |
| 142 | + } | |
| 143 | + | |
| 144 | + @Override | |
| 145 | + protected void sendGiftClick() { | |
| 146 | + Toast.makeText(this, "送飞吻点击", Toast.LENGTH_SHORT).show(); | |
| 147 | + } | |
| 148 | + | |
| 149 | + @Override | |
| 150 | + public void movieInfoClick() { | |
| 151 | + Toast.makeText(this, "有电影版的直播结束页面的电影详情点击", Toast.LENGTH_SHORT).show(); | |
| 152 | + } | |
| 153 | + | |
| 154 | + @Override | |
| 155 | + protected void showInputLimitDialog() { | |
| 156 | + //TODO 展示限制60输入的dialog 注意:添加dialog要进行if(!dialog.isShowing())的判断,否则会有弹出多次问题 | |
| 157 | + Toast.makeText(this, "展示输入超过60字的提示框", Toast.LENGTH_SHORT).show(); | |
| 158 | + } | |
| 159 | + | |
| 160 | + @Override | |
| 161 | + protected void showInputSensitiveWordsDialog(String msg) { | |
| 162 | + //TODO 展示敏感词的dialog | |
| 163 | + Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); | |
| 164 | + } | |
| 165 | + | |
| 166 | + @Override | |
| 167 | + protected void replayClick() { | |
| 168 | + Toast.makeText(this, "直播结束页面的重播按钮点击", Toast.LENGTH_SHORT).show(); | |
| 169 | + | |
| 170 | + //TODO 添加正式的vId,type,hasMovie | |
| 171 | + Intent intent = new Intent(this, PlayerUgcActivity.class); | |
| 172 | + intent.putExtra("cId", "yupiao"); | |
| 173 | + intent.putExtra("type", "ugcLive"); | |
| 174 | + intent.putExtra("hasMovie", false); | |
| 175 | + startActivity(intent); | |
| 176 | + } | |
| 177 | + | |
| 178 | + @Override | |
| 179 | + public void onPlayStateError(int flag, IMediaPlayer iMediaPlayer, int what, String extra) { | |
| 180 | + //ugc直播时才会有结束页 | |
| 181 | + boolean isUgcLive = "ugcLive".equals(type); | |
| 182 | + if(flag == CNMediaPlayerType.TYPE_ERROR_PLAYER && isUgcLive){ | |
| 183 | + //TODO 请求判断是否是结束状态 将值赋予showLiveEndView | |
| 184 | + | |
| 185 | + //test | |
| 186 | + boolean showLiveEndView = true; | |
| 187 | + | |
| 188 | + if (showLiveEndView) { | |
| 189 | + // 展示 直播结束页面 | |
| 190 | + // 第一个参:数观看的人数,第二个参数:贡献的钱数,第三个参数:电影名 | |
| 191 | + showLiveEndView("12345", "345456", "《让子弹飞》"); | |
| 192 | + } else { | |
| 193 | + // 展示 直播重试页面 | |
| 194 | + showErrorRetryView(flag); | |
| 195 | + } | |
| 196 | + }else{ | |
| 197 | + showErrorRetryView(flag); | |
| 198 | + } | |
| 199 | + } | |
| 200 | + | |
| 201 | + //判断主播端状态 | |
| 202 | + @Override | |
| 203 | + public void onChannelState(int flag, String status) { | |
| 204 | + super.onChannelState(flag, status); | |
| 205 | + if (CNMediaPlayerType.ERROR_END.equals(status)) { | |
| 206 | + showErrorRetryView(flag); | |
| 207 | + stopMediaPlayer(); | |
| 208 | + } else if (CNMediaPlayerType.NORMAL_END.equals(status)) { | |
| 209 | + showLiveEndView("12345", "345456", "《让子弹飞》"); | |
| 210 | + stopMediaPlayer(); | |
| 211 | + } else if (CNMediaPlayerType.NORMAL_START.equals(status)) { | |
| 212 | + replayClick(); | |
| 213 | + } | |
| 214 | + } | |
| 215 | + | |
| 216 | + //聊天室事件监听 | |
| 217 | + @Override | |
| 218 | + public void onChatState(int what, String extra) { | |
| 219 | + switch (what) { | |
| 220 | + case ChatState.StateInitDone: //初始化完成 | |
| 221 | + connectChat();//连接聊天室 | |
| 222 | + break; | |
| 223 | + case ChatState.ErrorInitAuth: //认证失败 | |
| 224 | + case ChatState.ErrorInitNetwork: //未检测到网络 | |
| 225 | + case ChatState.ErrorInitOther: //初始化错误 | |
| 226 | + showMessage("聊天室初始化失败,点击重试", clickErrorInit);//设置错误信息 | |
| 227 | + break; | |
| 228 | + case ChatState.StateConnect: //与服务器建立连接 | |
| 229 | + break; | |
| 230 | + case ChatState.StateJoin: //聊天室登录成功 | |
| 231 | + hideMessage();//隐藏错误信息 | |
| 232 | + break; | |
| 233 | + case ChatState.StateReconnect: //与服务器重新连接 | |
| 234 | + connectChat(); | |
| 235 | + break; | |
| 236 | + case ChatState.ErrorConnect: //连接服务器失败 | |
| 237 | + case ChatState.ErrorChat: //聊天室连接失败 | |
| 238 | + case ChatState.ErrorName: //昵称冲突 | |
| 239 | + String message = "聊天室连接失败,点击重试"; | |
| 240 | + SpannableString spannableString = new SpannableString(message); //定义文字样式 | |
| 241 | + spannableString.setSpan(new UnderlineSpan(), message.length() - 2, message.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); | |
| 242 | + spannableString.setSpan(new ForegroundColorSpan(Color.rgb(255, 213, 0)), message.length() - 2, message.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); | |
| 243 | + showMessage(spannableString, clickErrorConnect);//设置错误信息 | |
| 244 | + break; | |
| 245 | + case ChatState.ErrorConnectCloseOnError: //聊天室异常断开 | |
| 246 | + showMessage("聊天室已断开,请检查网络"); | |
| 247 | + break; | |
| 248 | + case ChatState.ErrorSendOther: //消息发送失败 | |
| 249 | + Toast.makeText(this,extra, Toast.LENGTH_SHORT).show(); | |
| 250 | + break; | |
| 251 | + case ChatState.ErrorSendNoConnect: //消息发送失败 没有连接聊天室 | |
| 252 | + Toast.makeText(this,extra, Toast.LENGTH_SHORT).show(); | |
| 253 | + break; | |
| 254 | + } | |
| 255 | + } | |
| 256 | + | |
| 257 | + //聊天室连接失败 点击事件 | |
| 258 | + protected View.OnClickListener clickErrorConnect = new View.OnClickListener() { | |
| 259 | + @Override | |
| 260 | + public void onClick(View v) { | |
| 261 | + v.setOnClickListener(null); | |
| 262 | + connectChat(); | |
| 263 | + } | |
| 264 | + }; | |
| 265 | + | |
| 266 | + //聊天室初始化失败 点击事件 | |
| 267 | + protected View.OnClickListener clickErrorInit = new View.OnClickListener() { | |
| 268 | + @Override | |
| 269 | + public void onClick(View v) { | |
| 270 | + v.setOnClickListener(null); | |
| 271 | + initChat(room, name); | |
| 272 | + } | |
| 273 | + }; | |
| 274 | +} | ... | ... |
app/src/main/java/com/wepiao/star/starlive/ui/StreamActivity.java
0 → 100644
| 1 | +++ a/app/src/main/java/com/wepiao/star/starlive/ui/StreamActivity.java | |
| 1 | +package com.wepiao.star.starlive.ui; | |
| 2 | + | |
| 3 | +import android.graphics.Color; | |
| 4 | +import android.os.Bundle; | |
| 5 | +import android.text.Spannable; | |
| 6 | +import android.text.SpannableString; | |
| 7 | +import android.text.style.ForegroundColorSpan; | |
| 8 | +import android.text.style.UnderlineSpan; | |
| 9 | +import android.util.Log; | |
| 10 | +import android.view.View; | |
| 11 | +import android.view.WindowManager; | |
| 12 | +import android.widget.Button; | |
| 13 | +import android.widget.Toast; | |
| 14 | + | |
| 15 | +import com.wepiao.star.starlive.R; | |
| 16 | +import com.wepiao.star.starlive.model.BaseContributionInfo; | |
| 17 | +import com.cnlive.lib_cnvideo.model.ContributionInfo; | |
| 18 | +import com.cnlive.lib_cnvideo.stream.BaseCNStreamActivity; | |
| 19 | +import com.cnlive.libs.chat.ChatState; | |
| 20 | +import com.cnlive.libs.stream.base.IStreamer; | |
| 21 | + | |
| 22 | +import java.util.ArrayList; | |
| 23 | +import java.util.List; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * Created by Administrator on 2016/8/16. | |
| 27 | + */ | |
| 28 | +public class StreamActivity extends BaseCNStreamActivity { | |
| 29 | + private String activityid = "" + System.currentTimeMillis(); | |
| 30 | + private String channelid = "yupiao"; | |
| 31 | + private int isHorizon = 0; | |
| 32 | + | |
| 33 | + private Button button1, button2, button3; | |
| 34 | + | |
| 35 | + private static final String room = "cnlivetest"; | |
| 36 | + private static final String name = "游客"; | |
| 37 | + | |
| 38 | + private static final boolean isMovie = true; | |
| 39 | + | |
| 40 | + //TODO 问题消息体 {"type":"question","user_name":"name","mbody":"test message","imgurl":"http://y3.cnliveimg.com:8080/image/itv/2016/0729/c48d1db2dc1641f19d90ef23e294d34a_139042_100.jpg","num":"5"} | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public void onCreate(Bundle savedInstanceState) { | |
| 44 | + super.onCreate(savedInstanceState); | |
| 45 | + setContentView(R.layout.cnstream_base_activity); | |
| 46 | + | |
| 47 | + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
| 48 | + getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); | |
| 49 | + //初始化弹幕视图 间隔时间,行数,行弹幕最大值,速度(0.1-1.0) | |
| 50 | + initTopBarrage(400, 2, 10, 0.5f); | |
| 51 | + initBottomBarrage(400, 5, 10, 0.5f); | |
| 52 | + //初始化聊天室 房间号,用户昵称 | |
| 53 | + initChat(room, name); | |
| 54 | + //初始化 设置是否有电影票 | |
| 55 | + initStream(isMovie); | |
| 56 | + | |
| 57 | + //测试 | |
| 58 | + button1 = (Button) findViewById(R.id.button1); | |
| 59 | + button1.setOnClickListener(listener); | |
| 60 | + button2 = (Button) findViewById(R.id.button2); | |
| 61 | + button2.setOnClickListener(listener); | |
| 62 | + button3 = (Button) findViewById(R.id.button3); | |
| 63 | + button3.setOnClickListener(listener); | |
| 64 | + } | |
| 65 | + | |
| 66 | + private View.OnClickListener listener = new View.OnClickListener() { | |
| 67 | + @Override | |
| 68 | + public void onClick(View view) { | |
| 69 | + switch (view.getId()) { | |
| 70 | + case R.id.button1: | |
| 71 | + List<ContributionInfo> list = new ArrayList<>(); | |
| 72 | + list.add(new BaseContributionInfo("http://v1.qzone.cc/avatar/201403/23/11/54/532e5aefc546e496.jpg!200x200.jpg", "1")); | |
| 73 | + list.add(new BaseContributionInfo("http://imgsrc.baidu.com/baike/pic/item/c2fdfc039245d6882d5d54d9a6c27d1ed21b2474.jpg", "2")); | |
| 74 | + list.add(new BaseContributionInfo("http://img2.a0bi.com/upload/ttq/20160709/1468043314019.png", "1")); | |
| 75 | + list.add(new BaseContributionInfo("http://b.hiphotos.baidu.com/zhidao/pic/item/d1a20cf431adcbefef0f982fabaf2edda3cc9fe4.jpg", "2")); | |
| 76 | + list.add(new BaseContributionInfo("http://img2.a0bi.com/upload/ttq/20160817/1471399679901.png", "1")); | |
| 77 | + list.add(new BaseContributionInfo("http://img2.a0bi.com/upload/ttq/20160709/1468043314019.png", "2")); | |
| 78 | + updateContributionList(list); | |
| 79 | + break; | |
| 80 | + case R.id.button2: | |
| 81 | + updateIncome(2334455); | |
| 82 | + break; | |
| 83 | + case R.id.button3: | |
| 84 | + updateFollowCount(1122333); | |
| 85 | + break; | |
| 86 | + } | |
| 87 | + } | |
| 88 | + }; | |
| 89 | + | |
| 90 | + | |
| 91 | + @Override | |
| 92 | + public void setStreamData() { | |
| 93 | + //设置 直播节目 属性 | |
| 94 | + cnBuilder.setActivityID(activityid); | |
| 95 | + cnBuilder.setChannelID(channelid); | |
| 96 | + cnBuilder.setIsHorizontalScreen(isHorizon); | |
| 97 | + } | |
| 98 | + | |
| 99 | + @Override | |
| 100 | + public void showEnd() { | |
| 101 | +// //直播结束页面的数据 | |
| 102 | + showEndView("123456", "123456"); | |
| 103 | + } | |
| 104 | + | |
| 105 | + @Override | |
| 106 | + public void closeButtonWhenNotInLiveClickListener() { | |
| 107 | + //直播结束页面和直播页面(没有在直播状态中)的关闭按钮点击事件 | |
| 108 | + super.closeButtonWhenNotInLiveClickListener(); | |
| 109 | + finish(); | |
| 110 | + } | |
| 111 | + | |
| 112 | + @Override | |
| 113 | + public void replayButtonClickListener() { | |
| 114 | + //直播结束页的重播按钮点击事件 | |
| 115 | + super.replayButtonClickListener(); | |
| 116 | + finish(); | |
| 117 | + } | |
| 118 | + | |
| 119 | + @Override | |
| 120 | + public void backClickListener() { | |
| 121 | + //重试页面返回按钮的点击事件 | |
| 122 | + super.backClickListener(); | |
| 123 | + finish(); | |
| 124 | + } | |
| 125 | + | |
| 126 | + @Override | |
| 127 | + public void onContributionListClick() { | |
| 128 | + super.onContributionListClick(); | |
| 129 | + Toast.makeText(this, "您点击了贡献榜", Toast.LENGTH_SHORT).show(); | |
| 130 | + } | |
| 131 | + | |
| 132 | + @Override | |
| 133 | + public void onStreamerState(int flag, String extra) { | |
| 134 | + //推流状态信息,输出状态即可,与 initCNStreamError(int flag) 包含初始化失败状态 | |
| 135 | + } | |
| 136 | + | |
| 137 | + @Override | |
| 138 | + public void initCNStreamError(int flag) { | |
| 139 | + //初始化CNStreamSDK失败,可能的原因是开启摄像头失败、转码失败、编码失败、 | |
| 140 | + Log.e("DemoView", String.valueOf(flag)); | |
| 141 | + switch (flag) { | |
| 142 | + case IStreamer.cnstream_error_create_stream_server: | |
| 143 | + //创建直播活动请求服务器失败 | |
| 144 | + break; | |
| 145 | + case IStreamer.cnstream_error_create_stream_network: | |
| 146 | + //创建直播活动时网络连接失败 | |
| 147 | + break; | |
| 148 | + case IStreamer.cnstream_error_create_stream_other: | |
| 149 | + //创建直播活动时失败 | |
| 150 | + break; | |
| 151 | + case IStreamer.cnstream_error_stop_stream: | |
| 152 | + //停止直播活动失败 | |
| 153 | + break; | |
| 154 | + case IStreamer.cnstream_init_error_instop: | |
| 155 | + //初始化失败 正在停止推流 | |
| 156 | + break; | |
| 157 | + case IStreamer.cnstream_error_dns_parse_failed: | |
| 158 | + //url域名解析失败 | |
| 159 | + break; | |
| 160 | + case IStreamer.cnstream_error_av_async: | |
| 161 | + //音视频采集pts差值超过5s 音视频采集pts具体差值,单位ms | |
| 162 | + break; | |
| 163 | + case IStreamer.cnstream_video_encoder_error_unsupported: | |
| 164 | + //编码器初始化失败 | |
| 165 | + break; | |
| 166 | + case IStreamer.cnstream_video_encoder_error_unknown: | |
| 167 | + //视频编码失败 | |
| 168 | + break; | |
| 169 | + case IStreamer.cnstream_audio_encoder_error_unsupported: | |
| 170 | + //音频初始化失败 | |
| 171 | + break; | |
| 172 | + case IStreamer.cnstream_audio_encoder_error_unknown: | |
| 173 | + //音频编码失败 | |
| 174 | + break; | |
| 175 | + case IStreamer.cnstream_audio_recorder_error_start_failed: | |
| 176 | + //录音开启失败 | |
| 177 | + break; | |
| 178 | + case IStreamer.cnstream_audio_recorder_error_unknown: | |
| 179 | + //录音开启未知错误 | |
| 180 | + break; | |
| 181 | + case IStreamer.cnstream_camera_error_unknown: | |
| 182 | + //摄像头未知错误 | |
| 183 | + break; | |
| 184 | + case IStreamer.cnstream_camera_error_start_failed: | |
| 185 | + //打开摄像头失败 | |
| 186 | + break; | |
| 187 | + case IStreamer.cnstream_camera_error_server_died: | |
| 188 | + //系统Camera服务进程退出 | |
| 189 | + break; | |
| 190 | + } | |
| 191 | +// finish(); | |
| 192 | + } | |
| 193 | + | |
| 194 | + //聊天室事件监听 | |
| 195 | + @Override | |
| 196 | + public void onChatState(int what, String extra) { | |
| 197 | + switch (what) { | |
| 198 | + case ChatState.StateInitDone: //初始化完成 | |
| 199 | + connectChat();//连接聊天室 | |
| 200 | + break; | |
| 201 | + case ChatState.ErrorInitAuth: //认证失败 | |
| 202 | + case ChatState.ErrorInitNetwork: //未检测到网络 | |
| 203 | + case ChatState.ErrorInitOther: //初始化错误 | |
| 204 | + showMessage("聊天室初始化失败,点击重试", clickErrorInit);//设置错误信息 | |
| 205 | + break; | |
| 206 | + case ChatState.StateConnect: //与服务器建立连接 | |
| 207 | + hideMessage();//隐藏错误信息 | |
| 208 | + break; | |
| 209 | + case ChatState.StateReconnect: //与服务器重新连接 | |
| 210 | + hideMessage(); | |
| 211 | + connectChat(); | |
| 212 | + break; | |
| 213 | + case ChatState.ErrorConnect: //连接服务器失败 | |
| 214 | + case ChatState.ErrorChat: //聊天室连接失败 | |
| 215 | + case ChatState.ErrorName: //昵称冲突 | |
| 216 | + String message = "聊天室连接失败,点击重试"; | |
| 217 | + SpannableString spannableString = new SpannableString(message); //定义文字样式 | |
| 218 | + spannableString.setSpan(new UnderlineSpan(), message.length() - 2, message.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); | |
| 219 | + spannableString.setSpan(new ForegroundColorSpan(Color.rgb(255, 213, 0)), message.length() - 2, message.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); | |
| 220 | + showMessage(spannableString, clickErrorConnect);//设置错误信息 | |
| 221 | + break; | |
| 222 | + case ChatState.ErrorConnectCloseOnError: //聊天室异常断开 | |
| 223 | + showMessage("聊天室已断开,请检查网络"); | |
| 224 | + break; | |
| 225 | + case ChatState.ErrorSendOther: //消息发送失败 | |
| 226 | + //TODO Toast提示 | |
| 227 | + break; | |
| 228 | + case ChatState.ErrorSendNoConnect: //消息发送失败 没有连接聊天室 | |
| 229 | + //TODO Toast提示 | |
| 230 | + break; | |
| 231 | + } | |
| 232 | + } | |
| 233 | + | |
| 234 | + //聊天室连接失败 点击事件 | |
| 235 | + protected View.OnClickListener clickErrorConnect = new View.OnClickListener() { | |
| 236 | + @Override | |
| 237 | + public void onClick(View v) { | |
| 238 | + v.setOnClickListener(null); | |
| 239 | + connectChat(); | |
| 240 | + } | |
| 241 | + }; | |
| 242 | + | |
| 243 | + //聊天室初始化失败 点击事件 | |
| 244 | + protected View.OnClickListener clickErrorInit = new View.OnClickListener() { | |
| 245 | + @Override | |
| 246 | + public void onClick(View v) { | |
| 247 | + v.setOnClickListener(null); | |
| 248 | + initChat(room, name); | |
| 249 | + } | |
| 250 | + }; | |
| 251 | +} | ... | ... |
app/src/main/jniLibs/arm64-v8a/libksylive.so
0 → 100644
No preview for this file type
app/src/main/jniLibs/armeabi-v7a/libksylive.so
0 → 100644
No preview for this file type
app/src/main/jniLibs/x86/libksylive.so
0 → 100644
No preview for this file type
app/src/main/res/drawable-xhdpi/cnlive_anchor_info.png
0 → 100644
18.1 KB
app/src/main/res/drawable-xhdpi/cnlive_avatar.png
0 → 100644
1.41 KB
app/src/main/res/drawable-xhdpi/cnlive_bottom_bg.png
0 → 100644
1.26 KB
app/src/main/res/drawable-xhdpi/cnlive_chat_btn_bg.9.png
0 → 100644
137 Bytes
app/src/main/res/drawable-xhdpi/cnlive_chat_line.png
0 → 100644
1006 Bytes
app/src/main/res/drawable-xhdpi/cnlive_close.png
0 → 100644
33.7 KB
app/src/main/res/drawable-xhdpi/cnlive_flay_kiss_big.png
0 → 100644
20.8 KB
app/src/main/res/drawable-xhdpi/cnlive_fullscreen_l.png
0 → 100644
1.5 KB
app/src/main/res/drawable-xhdpi/cnlive_fullscreen_p.png
0 → 100644
1.46 KB
app/src/main/res/drawable-xhdpi/cnlive_input_bg.9.png
0 → 100644
136 Bytes
app/src/main/res/drawable-xhdpi/cnlive_online_avatar.png
0 → 100644
33.9 KB
app/src/main/res/drawable-xhdpi/cnlive_pause.png
0 → 100644
17.5 KB
app/src/main/res/drawable-xhdpi/cnlive_play.png
0 → 100644
17.9 KB
app/src/main/res/drawable-xhdpi/cnlive_replay.png
0 → 100644
19.4 KB
app/src/main/res/drawable-xhdpi/cnlive_send_bg.9.png
0 → 100644
142 Bytes
app/src/main/res/drawable-xhdpi/cnlive_switch_close.png
0 → 100644
2.46 KB
app/src/main/res/drawable-xhdpi/cnlive_switch_open.png
0 → 100644
2.44 KB
app/src/main/res/drawable-xhdpi/cnlive_ticket.png
0 → 100644
34.3 KB
app/src/main/res/drawable-xhdpi/cnlive_video_back.png
0 → 100644
1.36 KB
app/src/main/res/drawable-xhdpi/cnlive_video_bottom_bg.png
0 → 100644
1.06 KB
app/src/main/res/drawable-xhdpi/cnlive_video_share.png
0 → 100644
1.46 KB
app/src/main/res/drawable-xhdpi/cnlive_video_top_bg.png
0 → 100644
1.07 KB
app/src/main/res/drawable-xxhdpi/cnlive_avatar.png
0 → 100644
1.63 KB
app/src/main/res/drawable-xxhdpi/cnlive_avatar2.png
0 → 100644
1.76 KB
app/src/main/res/drawable-xxhdpi/cnlive_bottom_bg.png
0 → 100644
1.38 KB
app/src/main/res/drawable-xxhdpi/cnlive_chat_btn_bg.9.png
0 → 100644
181 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_chat_off.9.png
0 → 100644
182 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_chat_on.9.png
0 → 100644
378 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_flay_kiss_big.png
0 → 100644
20.9 KB
app/src/main/res/drawable-xxhdpi/cnlive_fullscreen_l.png
0 → 100644
1.83 KB
app/src/main/res/drawable-xxhdpi/cnlive_fullscreen_p.png
0 → 100644
1.78 KB
app/src/main/res/drawable-xxhdpi/cnlive_input_bg.9.png
0 → 100644
186 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_popup_bg.9.png
0 → 100644
935 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_send_bg.9.png
0 → 100644
190 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_switch_close.png
0 → 100644
3.34 KB
app/src/main/res/drawable-xxhdpi/cnlive_switch_open.png
0 → 100644
3.24 KB
app/src/main/res/drawable-xxhdpi/cnlive_video_back.png
0 → 100644
1.65 KB
app/src/main/res/drawable-xxhdpi/cnlive_video_bottom_bg.png
0 → 100644
1.34 KB
app/src/main/res/drawable-xxhdpi/cnlive_video_brightness_bg.png
0 → 100644
3.48 KB
app/src/main/res/drawable-xxhdpi/cnlive_video_num_bg.9.png
0 → 100644
131 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_video_num_front.9.png
0 → 100644
171 Bytes
app/src/main/res/drawable-xxhdpi/cnlive_video_share.png
0 → 100644
1.68 KB
app/src/main/res/drawable-xxhdpi/cnlive_video_top_bg.png
0 → 100644
1.35 KB
app/src/main/res/drawable-xxhdpi/cnlive_video_volumn_bg.png
0 → 100644
3.42 KB
app/src/main/res/drawable-xxhdpi/cnstream_audience.png
0 → 100644
34.2 KB
app/src/main/res/drawable-xxhdpi/cnstream_back.png
0 → 100644
17.8 KB
app/src/main/res/drawable-xxhdpi/cnstream_close.png
0 → 100644
33.7 KB
app/src/main/res/drawable-xxhdpi/cnstream_duration.png
0 → 100644
34.3 KB
app/src/main/res/drawable-xxhdpi/cnstream_logo01.png
0 → 100644
25.4 KB
app/src/main/res/drawable-xxhdpi/cnstream_logo02.png
0 → 100644
37.3 KB
app/src/main/res/drawable-xxhdpi/cnstream_presell.png
0 → 100644
34.2 KB
app/src/main/res/drawable-xxhdpi/cnstream_replay.png
0 → 100644
19.4 KB
app/src/main/res/drawable-xxhdpi/cnstream_start_background.png
0 → 100644
503 KB
app/src/main/res/drawable-xxhdpi/cnstream_switch_camera.png
0 → 100644
18.3 KB
app/src/main/res/drawable/cnlive_chat_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_chat_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape | |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
| 4 | + android:shape="rectangle" | |
| 5 | + android:useLevel="false"> | |
| 6 | + <solid android:color="@color/colorChatItem" /> | |
| 7 | + <corners | |
| 8 | + android:bottomLeftRadius="8dp" | |
| 9 | + android:bottomRightRadius="8dp" | |
| 10 | + android:topLeftRadius="8dp" | |
| 11 | + android:topRightRadius="8dp" /> | |
| 12 | +</shape> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_chat_gift_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_chat_gift_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:shape="rectangle" | |
| 4 | + android:useLevel="false"> | |
| 5 | + <solid android:color="@color/anchor_black_bg" /> | |
| 6 | + <size android:height="24dp" /> | |
| 7 | + <corners | |
| 8 | + android:bottomLeftRadius="0dp" | |
| 9 | + android:bottomRightRadius="8dp" | |
| 10 | + android:topLeftRadius="0dp" | |
| 11 | + android:topRightRadius="8dp" /> <!-- 设置四个角的半径 --> | |
| 12 | + | |
| 13 | +</shape> | |
| 0 | 14 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_chat_icon_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_chat_icon_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | + | |
| 3 | +<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |
| 4 | + <corners android:radius="80dp" /> | |
| 5 | + <solid android:color="@color/colorWhite" /> | |
| 6 | + <stroke | |
| 7 | + android:width="1dp" | |
| 8 | + android:color="@color/Yellow_1" /> | |
| 9 | + <size | |
| 10 | + android:width="80dp" | |
| 11 | + android:height="80dp" /> | |
| 12 | +</shape> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_dialog_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_dialog_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape | |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
| 4 | + android:shape="rectangle" | |
| 5 | + android:useLevel="false"> | |
| 6 | + <solid android:color="#efefef" /> | |
| 7 | + | |
| 8 | + <corners | |
| 9 | + android:bottomLeftRadius="16dp" | |
| 10 | + android:bottomRightRadius="16dp" | |
| 11 | + android:topLeftRadius="16dp" | |
| 12 | + android:topRightRadius="16dp" /> <!-- 设置四个角的半径 --> | |
| 13 | + | |
| 14 | +</shape> | |
| 0 | 15 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_seekbar.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_seekbar.xml | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
| 3 | + | |
| 4 | + <item android:id="@android:id/background"> | |
| 5 | + <shape> | |
| 6 | + <corners android:radius="2dip" /> | |
| 7 | + <solid android:color="#66ffffff" /> | |
| 8 | + </shape> | |
| 9 | + </item> | |
| 10 | + | |
| 11 | + <item android:id="@android:id/secondaryProgress"> | |
| 12 | + <scale android:scaleWidth="100%"> | |
| 13 | + <shape> | |
| 14 | + <corners android:radius="2dip" /> | |
| 15 | + <solid android:color="#00ffffff" /> | |
| 16 | + </shape> | |
| 17 | + </scale> | |
| 18 | + | |
| 19 | + </item> | |
| 20 | + | |
| 21 | + <item android:id="@android:id/progress"> | |
| 22 | + <clip> | |
| 23 | + <scale android:scaleWidth="100%"> | |
| 24 | + <shape> | |
| 25 | + <corners android:radius="2dip" /> | |
| 26 | + <solid android:color="#ffd500" /> | |
| 27 | + </shape> | |
| 28 | + </scale> | |
| 29 | + </clip> | |
| 30 | + </item> | |
| 31 | + | |
| 32 | + | |
| 33 | +</layer-list> | |
| 0 | 34 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_seekbar_progress.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_seekbar_progress.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:shape="rectangle"> | |
| 4 | + <solid android:color="#ffffff" /> | |
| 5 | + <corners android:radius="6dp" /> | |
| 6 | + | |
| 7 | + <size | |
| 8 | + android:width="12dp" | |
| 9 | + android:height="12dp" /> | |
| 10 | +</shape> | |
| 0 | 11 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_support_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_support_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape | |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
| 4 | + android:shape="oval" | |
| 5 | + android:useLevel="false"> | |
| 6 | + <solid android:color="#fe5e5f" /> | |
| 7 | + <size | |
| 8 | + android:width="45dp" | |
| 9 | + android:height="45dp" /> | |
| 10 | + | |
| 11 | +</shape> | |
| 0 | 12 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_switch_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_switch_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
| 3 | + <item android:drawable="@drawable/cnlive_switch_open" android:state_checked="true" /> | |
| 4 | + <item android:drawable="@drawable/cnlive_switch_close" android:state_checked="false" /> | |
| 5 | +</selector> | |
| 0 | 6 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/cnlive_ugc_retry_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/cnlive_ugc_retry_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:shape="rectangle" | |
| 4 | + android:useLevel="false"> | |
| 5 | + | |
| 6 | + <stroke | |
| 7 | + android:width="1dp" | |
| 8 | + android:color="@android:color/white" /> | |
| 9 | + | |
| 10 | + <corners | |
| 11 | + android:bottomLeftRadius="20dp" | |
| 12 | + android:bottomRightRadius="20dp" | |
| 13 | + android:topLeftRadius="20dp" | |
| 14 | + android:topRightRadius="20dp" /> | |
| 15 | + | |
| 16 | + <size android:height="40dp" | |
| 17 | + android:width="160dp"/> | |
| 18 | + | |
| 19 | +</shape> | |
| 0 | 20 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/stream_dialog_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/stream_dialog_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape | |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
| 4 | + android:shape="rectangle" | |
| 5 | + android:useLevel="false"> | |
| 6 | + <solid android:color="#eeeeee" /> | |
| 7 | + | |
| 8 | + <corners | |
| 9 | + android:bottomLeftRadius="10dp" | |
| 10 | + android:bottomRightRadius="10dp" | |
| 11 | + android:topLeftRadius="10dp" | |
| 12 | + android:topRightRadius="10dp" /> <!-- 设置四个角的半径 --> | |
| 13 | + | |
| 14 | +</shape> | |
| 0 | 15 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/stream_start_live_text_bg.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/stream_start_live_text_bg.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
| 3 | + <item android:drawable="@drawable/stream_start_live_text_bg_pressed" android:state_pressed="true" /> | |
| 4 | + <item android:drawable="@drawable/stream_start_live_text_bg_normal" android:state_pressed="false" /> | |
| 5 | +</selector> | |
| 0 | 6 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/stream_start_live_text_bg_normal.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/stream_start_live_text_bg_normal.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape | |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
| 4 | + android:shape="rectangle"> | |
| 5 | + <stroke android:width="0.5dp" | |
| 6 | + android:color="#ffffff"/> | |
| 7 | + <corners | |
| 8 | + android:radius="30dp" /> | |
| 9 | +</shape> | |
| 0 | 10 | \ No newline at end of file | ... | ... |
app/src/main/res/drawable/stream_start_live_text_bg_pressed.xml
0 → 100644
| 1 | +++ a/app/src/main/res/drawable/stream_start_live_text_bg_pressed.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<shape | |
| 3 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
| 4 | + android:shape="rectangle"> | |
| 5 | + <solid android:color="#66ffffff" /> | |
| 6 | + <stroke android:width="0.5dp" | |
| 7 | + android:color="#66ffffff"/> | |
| 8 | + <corners android:radius="30dp" /> | |
| 9 | +</shape> | |
| 0 | 10 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/activity_barrage.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/activity_barrage.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent"> | |
| 5 | + | |
| 6 | + <Button | |
| 7 | + android:id="@+id/addMessage" | |
| 8 | + android:layout_width="wrap_content" | |
| 9 | + android:layout_height="wrap_content" | |
| 10 | + android:text="add Message"/> | |
| 11 | + <Button | |
| 12 | + android:id="@+id/addGift" | |
| 13 | + android:layout_width="wrap_content" | |
| 14 | + android:layout_height="wrap_content" | |
| 15 | + android:layout_below="@+id/addMessage" | |
| 16 | + android:text="add Gift"/> | |
| 17 | + | |
| 18 | + <com.cnlive.libs.video.barrage.BarrageLayout | |
| 19 | + android:id="@+id/gift" | |
| 20 | + android:layout_width="match_parent" | |
| 21 | + android:layout_height="wrap_content" | |
| 22 | + android:layout_below="@+id/addGift" | |
| 23 | + android:background="#ff377757" /> | |
| 24 | + | |
| 25 | + <com.cnlive.libs.video.barrage.BarrageLayout | |
| 26 | + android:id="@+id/barrage" | |
| 27 | + android:layout_width="match_parent" | |
| 28 | + android:layout_height="wrap_content" | |
| 29 | + android:layout_alignParentBottom="true" | |
| 30 | + android:background="#ff777757" /> | |
| 31 | + | |
| 32 | +</RelativeLayout> | |
| 0 | 33 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/activity_chat.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/activity_chat.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent"> | |
| 6 | + | |
| 7 | + <Button | |
| 8 | + android:id="@+id/send" | |
| 9 | + android:layout_width="wrap_content" | |
| 10 | + android:layout_height="wrap_content" | |
| 11 | + android:text="send"/> | |
| 12 | + | |
| 13 | + <TextView | |
| 14 | + android:id="@+id/chat_state" | |
| 15 | + android:layout_width="match_parent" | |
| 16 | + android:layout_height="32dp" | |
| 17 | + android:layout_alignParentBottom="true" | |
| 18 | + android:background="#85000000" | |
| 19 | + android:gravity="center_vertical" | |
| 20 | + android:paddingLeft="8dp" | |
| 21 | + android:textColor="@android:color/white" | |
| 22 | + android:textSize="14sp" | |
| 23 | + tools:text="聊天室状态" /> | |
| 24 | + | |
| 25 | +</RelativeLayout> | |
| 0 | 26 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/activity_main.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/activity_main.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:orientation="vertical" | |
| 7 | + android:paddingBottom="@dimen/activity_vertical_margin" | |
| 8 | + android:paddingLeft="@dimen/activity_horizontal_margin" | |
| 9 | + android:paddingRight="@dimen/activity_horizontal_margin" | |
| 10 | + android:paddingTop="@dimen/activity_vertical_margin" | |
| 11 | + tools:context="com.cnlive.cnvideodemo.com.wepiao.cnvideodemo.MainActivity"> | |
| 12 | + | |
| 13 | + <Button | |
| 14 | + android:id="@+id/click_player_live" | |
| 15 | + android:layout_width="wrap_content" | |
| 16 | + android:layout_height="wrap_content" | |
| 17 | + android:onClick="onClick" | |
| 18 | + android:layout_margin="4dp" | |
| 19 | + android:text="直播页面" /> | |
| 20 | + | |
| 21 | + <Button | |
| 22 | + android:id="@+id/click_player_ugc_live" | |
| 23 | + android:layout_width="wrap_content" | |
| 24 | + android:layout_height="wrap_content" | |
| 25 | + android:onClick="onClick" | |
| 26 | + android:layout_margin="4dp" | |
| 27 | + android:text="UGC直播页面" /> | |
| 28 | + | |
| 29 | + <Button | |
| 30 | + android:id="@+id/click_player_ugc_vod" | |
| 31 | + android:layout_width="wrap_content" | |
| 32 | + android:layout_height="wrap_content" | |
| 33 | + android:onClick="onClick" | |
| 34 | + android:layout_margin="4dp" | |
| 35 | + android:text="UGC点播页面" /> | |
| 36 | + | |
| 37 | + <Button | |
| 38 | + android:id="@+id/click_player_ugc_stream" | |
| 39 | + android:layout_width="wrap_content" | |
| 40 | + android:layout_height="wrap_content" | |
| 41 | + android:onClick="onClick" | |
| 42 | + android:layout_margin="4dp" | |
| 43 | + android:text="直播推流" /> | |
| 44 | +</LinearLayout> | ... | ... |
app/src/main/res/layout/cnlive_activity_player.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_activity_player.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:background="#ff3f3f3f" | |
| 6 | + android:orientation="vertical"> | |
| 7 | + | |
| 8 | + | |
| 9 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNMediaPlayer | |
| 10 | + android:id="@+id/cnlivePlayer" | |
| 11 | + android:layout_width="match_parent" | |
| 12 | + android:layout_height="wrap_content" /> | |
| 13 | + | |
| 14 | + | |
| 15 | + <com.cnlive.libs.video.barrage.BarrageLayout | |
| 16 | + android:id="@+id/barrageLayout" | |
| 17 | + android:layout_width="match_parent" | |
| 18 | + android:layout_height="match_parent" | |
| 19 | + android:layout_alignBottom="@+id/cnlivePlayer" | |
| 20 | + android:layout_alignTop="@+id/cnlivePlayer" | |
| 21 | + android:layout_marginBottom="58dp" | |
| 22 | + android:layout_marginTop="58dp" | |
| 23 | + android:visibility="gone" /> | |
| 24 | + | |
| 25 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNTouchView | |
| 26 | + android:id="@+id/playerTouch" | |
| 27 | + android:layout_width="match_parent" | |
| 28 | + android:layout_height="match_parent" | |
| 29 | + android:layout_alignBottom="@+id/cnlivePlayer" | |
| 30 | + android:layout_alignTop="@+id/cnlivePlayer" /> | |
| 31 | + | |
| 32 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNInfoView | |
| 33 | + android:id="@+id/playerInfo" | |
| 34 | + android:layout_width="match_parent" | |
| 35 | + android:layout_height="match_parent" | |
| 36 | + android:layout_alignBottom="@+id/cnlivePlayer" | |
| 37 | + android:layout_alignTop="@+id/cnlivePlayer" /> | |
| 38 | + | |
| 39 | + <RelativeLayout | |
| 40 | + android:id="@+id/controllerLayout" | |
| 41 | + android:layout_width="match_parent" | |
| 42 | + android:layout_height="wrap_content" | |
| 43 | + android:layout_alignBottom="@+id/cnlivePlayer" | |
| 44 | + android:layout_alignTop="@+id/cnlivePlayer"> | |
| 45 | + | |
| 46 | + <include layout="@layout/cnlive_layout_controller" /> | |
| 47 | + | |
| 48 | + </RelativeLayout> | |
| 49 | + | |
| 50 | + <ImageView | |
| 51 | + android:id="@+id/back" | |
| 52 | + android:layout_width="40dp" | |
| 53 | + android:layout_height="40dp" | |
| 54 | + android:layout_marginLeft="3dp" | |
| 55 | + android:padding="11dp" | |
| 56 | + android:scaleType="fitCenter" | |
| 57 | + android:src="@drawable/cnlive_video_back" /> | |
| 58 | + | |
| 59 | + <LinearLayout | |
| 60 | + android:id="@+id/bottomParentLayout" | |
| 61 | + android:layout_width="match_parent" | |
| 62 | + android:layout_height="match_parent" | |
| 63 | + android:layout_below="@+id/cnlivePlayer"> | |
| 64 | + | |
| 65 | + <RelativeLayout | |
| 66 | + android:id="@+id/bottomLayout" | |
| 67 | + android:layout_width="match_parent" | |
| 68 | + android:layout_height="380dp"> | |
| 69 | + | |
| 70 | + <android.support.v7.widget.RecyclerView | |
| 71 | + android:id="@+id/chat_message" | |
| 72 | + android:layout_width="match_parent" | |
| 73 | + android:layout_height="match_parent" | |
| 74 | + android:layout_above="@+id/line"/> | |
| 75 | + | |
| 76 | + <View | |
| 77 | + android:layout_width="match_parent" | |
| 78 | + android:layout_height="159dp" | |
| 79 | + android:layout_alignParentBottom="true" | |
| 80 | + android:background="@drawable/cnlive_bottom_bg" /> | |
| 81 | + | |
| 82 | + <TextView | |
| 83 | + android:id="@+id/retryText" | |
| 84 | + android:layout_width="match_parent" | |
| 85 | + android:layout_height="42dp" | |
| 86 | + android:layout_above="@+id/line" | |
| 87 | + android:background="@color/colorRetry" | |
| 88 | + android:gravity="center_vertical" | |
| 89 | + android:paddingLeft="25dp" | |
| 90 | + android:textColor="@color/colorWhite" | |
| 91 | + android:textSize="14dp" /> | |
| 92 | + | |
| 93 | + <View | |
| 94 | + android:id="@+id/line" | |
| 95 | + android:layout_width="345dp" | |
| 96 | + android:layout_height="0.5dp" | |
| 97 | + android:layout_above="@+id/inputBtnBottom" | |
| 98 | + android:layout_centerHorizontal="true" | |
| 99 | + android:layout_marginBottom="15dp" | |
| 100 | + android:layout_marginTop="15dp" | |
| 101 | + android:background="@drawable/cnlive_chat_line" /> | |
| 102 | + | |
| 103 | + <TextView | |
| 104 | + android:id="@+id/inputBtnBottom" | |
| 105 | + android:layout_width="345dp" | |
| 106 | + android:layout_height="35dp" | |
| 107 | + android:layout_alignParentBottom="true" | |
| 108 | + android:layout_centerHorizontal="true" | |
| 109 | + android:layout_marginBottom="15dp" | |
| 110 | + android:background="@drawable/cnlive_chat_btn_bg" | |
| 111 | + android:gravity="center" | |
| 112 | + android:text="说点什么..." | |
| 113 | + android:textColor="@android:color/white" | |
| 114 | + android:textSize="14dp" /> | |
| 115 | + | |
| 116 | + </RelativeLayout> | |
| 117 | + </LinearLayout> | |
| 118 | + | |
| 119 | + <RelativeLayout | |
| 120 | + android:id="@+id/foregroundLayout" | |
| 121 | + android:layout_width="match_parent" | |
| 122 | + android:layout_height="match_parent" | |
| 123 | + android:fitsSystemWindows="true" /> | |
| 124 | + | |
| 125 | + | |
| 126 | + <!--<Button--> | |
| 127 | + <!--android:id="@+id/test"--> | |
| 128 | + <!--android:layout_width="wrap_content"--> | |
| 129 | + <!--android:layout_height="wrap_content" />--> | |
| 130 | +</RelativeLayout> | ... | ... |
app/src/main/res/layout/cnlive_activity_ugc_player.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_activity_ugc_player.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <RelativeLayout | |
| 8 | + android:id="@+id/main" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="match_parent"/> | |
| 11 | + | |
| 12 | + <RelativeLayout | |
| 13 | + android:id="@+id/foregroundLayout" | |
| 14 | + android:layout_width="match_parent" | |
| 15 | + android:layout_height="match_parent" /> | |
| 16 | + | |
| 17 | + <Button | |
| 18 | + android:id="@+id/test1" | |
| 19 | + android:layout_width="wrap_content" | |
| 20 | + android:layout_height="wrap_content" | |
| 21 | + android:text="更新贡献榜列表测试" | |
| 22 | + android:layout_marginTop="200dp"/> | |
| 23 | + | |
| 24 | + <Button | |
| 25 | + android:id="@+id/test2" | |
| 26 | + android:layout_width="wrap_content" | |
| 27 | + android:layout_height="wrap_content" | |
| 28 | + android:text="更新预售票房或收到飞吻测试" | |
| 29 | + android:layout_below="@+id/test1"/> | |
| 30 | + | |
| 31 | + <Button | |
| 32 | + android:id="@+id/test3" | |
| 33 | + android:layout_width="wrap_content" | |
| 34 | + android:layout_height="wrap_content" | |
| 35 | + android:text="更新在线人数测试" | |
| 36 | + android:layout_below="@+id/test2"/> | |
| 37 | + | |
| 38 | +</RelativeLayout> | ... | ... |
app/src/main/res/layout/cnlive_dialog.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_dialog.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="256dp" | |
| 4 | + android:layout_height="wrap_content" | |
| 5 | + xmlns:tools="http://schemas.android.com/tools" | |
| 6 | + android:background="@drawable/cnlive_dialog_bg" | |
| 7 | + android:orientation="vertical"> | |
| 8 | + | |
| 9 | + <TextView | |
| 10 | + android:id="@+id/title" | |
| 11 | + android:layout_width="wrap_content" | |
| 12 | + android:layout_height="wrap_content" | |
| 13 | + android:layout_gravity="center_horizontal" | |
| 14 | + android:layout_marginBottom="4dp" | |
| 15 | + android:layout_marginTop="20dp" | |
| 16 | + tools:text="title" | |
| 17 | + android:layout_marginRight="10dp" | |
| 18 | + android:layout_marginLeft="10dp" | |
| 19 | + android:textColor="@android:color/black" | |
| 20 | + android:textSize="16sp"/> | |
| 21 | + | |
| 22 | + <TextView | |
| 23 | + android:id="@+id/content" | |
| 24 | + android:layout_width="wrap_content" | |
| 25 | + android:layout_height="wrap_content" | |
| 26 | + android:layout_gravity="center_horizontal" | |
| 27 | + android:layout_marginBottom="20dp" | |
| 28 | + android:layout_marginTop="4dp" | |
| 29 | + tools:text="content" | |
| 30 | + android:layout_marginRight="10dp" | |
| 31 | + android:layout_marginLeft="10dp" | |
| 32 | + android:textColor="@android:color/black" | |
| 33 | + android:textSize="12sp" /> | |
| 34 | + | |
| 35 | + <View | |
| 36 | + android:layout_width="match_parent" | |
| 37 | + android:layout_height="1px" | |
| 38 | + android:background="@color/Gray_1" /> | |
| 39 | + | |
| 40 | + <LinearLayout | |
| 41 | + android:layout_width="match_parent" | |
| 42 | + android:layout_height="42dp" | |
| 43 | + android:orientation="horizontal"> | |
| 44 | + | |
| 45 | + | |
| 46 | + <TextView | |
| 47 | + android:id="@+id/btn" | |
| 48 | + android:layout_width="0dp" | |
| 49 | + android:layout_height="match_parent" | |
| 50 | + android:gravity="center" | |
| 51 | + android:paddingBottom="10dp" | |
| 52 | + android:paddingTop="10dp" | |
| 53 | + tools:text="OK" | |
| 54 | + android:textColor="#177bdf" | |
| 55 | + android:textSize="14sp" | |
| 56 | + android:layout_weight="1"/> | |
| 57 | + | |
| 58 | + </LinearLayout> | |
| 59 | + | |
| 60 | +</LinearLayout> | |
| 0 | 61 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_fragment_input.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_fragment_input.xml | |
| 1 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 2 | + xmlns:emojicon="http://schemas.android.com/tools" | |
| 3 | + android:id="@+id/layout" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:orientation="vertical"> | |
| 7 | + | |
| 8 | + <View | |
| 9 | + android:id="@+id/click_view" | |
| 10 | + android:layout_width="match_parent" | |
| 11 | + android:layout_height="0dp" | |
| 12 | + android:layout_weight="1"/> | |
| 13 | + | |
| 14 | + <RelativeLayout | |
| 15 | + android:id="@+id/anchorInputParentLayout" | |
| 16 | + android:layout_width="match_parent" | |
| 17 | + android:layout_height="45dp" | |
| 18 | + android:layout_below="@+id/click_view" | |
| 19 | + android:layout_gravity="bottom" | |
| 20 | + android:paddingLeft="15dp" | |
| 21 | + android:background="@android:color/white"> | |
| 22 | + | |
| 23 | + <com.cnlive.libs.util.ui.emojicon.EmojiconEditText | |
| 24 | + android:id="@+id/chatEditText" | |
| 25 | + android:layout_width="match_parent" | |
| 26 | + android:layout_height="35dp" | |
| 27 | + android:gravity="center_vertical" | |
| 28 | + android:imeOptions="flagNoFullscreen|flagNoExtractUi|actionSend" | |
| 29 | + android:inputType="textLongMessage" | |
| 30 | + android:paddingLeft="11dp" | |
| 31 | + android:textSize="14dp" | |
| 32 | + android:hint="说点什么吧..." | |
| 33 | + android:textColor="@color/Gray_2" | |
| 34 | + emojicon:emojiconSize="15sp" | |
| 35 | + android:layout_weight="1" | |
| 36 | + android:layout_centerVertical="true" | |
| 37 | + android:layout_toLeftOf="@+id/chatSend" | |
| 38 | + android:background="@drawable/cnlive_input_bg"/> | |
| 39 | + | |
| 40 | + <TextView | |
| 41 | + android:id="@+id/chatSend" | |
| 42 | + android:layout_width="70dp" | |
| 43 | + android:layout_height="35dp" | |
| 44 | + android:text="发送" | |
| 45 | + android:gravity="center" | |
| 46 | + android:layout_marginLeft="5dp" | |
| 47 | + android:layout_marginRight="15dp" | |
| 48 | + android:textSize="15dp" | |
| 49 | + android:textColor="@color/Gray_1" | |
| 50 | + android:layout_alignParentRight="true" | |
| 51 | + android:layout_centerVertical="true" | |
| 52 | + android:background="@drawable/cnlive_send_bg"/> | |
| 53 | + | |
| 54 | + </RelativeLayout> | |
| 55 | + | |
| 56 | +</LinearLayout> | |
| 0 | 57 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_fragment_ugc_live_player.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_fragment_ugc_live_player.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:orientation="vertical"> | |
| 7 | + | |
| 8 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNMediaPlayer | |
| 9 | + android:id="@+id/cnlivePlayer" | |
| 10 | + android:layout_width="match_parent" | |
| 11 | + android:layout_height="match_parent" /> | |
| 12 | + | |
| 13 | + <View | |
| 14 | + android:layout_width="match_parent" | |
| 15 | + android:layout_height="159dp" | |
| 16 | + android:background="@drawable/cnlive_video_top_bg"/> | |
| 17 | + | |
| 18 | + <include layout="@layout/cnlive_layout_player_anchor_info" /> | |
| 19 | + | |
| 20 | + <View | |
| 21 | + android:layout_width="match_parent" | |
| 22 | + android:layout_height="159dp" | |
| 23 | + android:background="@drawable/cnlive_video_bottom_bg" | |
| 24 | + android:layout_alignBottom="@+id/bottomLayout"/> | |
| 25 | + | |
| 26 | + <com.cnlive.libs.video.barrage.BarrageLayout | |
| 27 | + android:id="@+id/topBarrage" | |
| 28 | + android:layout_width="match_parent" | |
| 29 | + android:layout_height="wrap_content" | |
| 30 | + android:layout_below="@+id/anchorAboutLayout" /> | |
| 31 | + | |
| 32 | + <com.cnlive.libs.video.barrage.BarrageLayout | |
| 33 | + android:id="@+id/bottomBarrage" | |
| 34 | + android:layout_width="match_parent" | |
| 35 | + android:layout_height="wrap_content" | |
| 36 | + android:layout_above="@+id/bottomLayout" /> | |
| 37 | + <TextView | |
| 38 | + android:id="@+id/retryText" | |
| 39 | + android:layout_width="match_parent" | |
| 40 | + android:layout_height="42dp" | |
| 41 | + android:layout_above="@+id/bottomLayout" | |
| 42 | + android:background="@color/colorRetry" | |
| 43 | + android:gravity="center_vertical" | |
| 44 | + android:paddingLeft="25dp" | |
| 45 | + android:textColor="@color/colorWhite" | |
| 46 | + android:textSize="14dp" | |
| 47 | + android:visibility="gone"/> | |
| 48 | + <RelativeLayout | |
| 49 | + android:id="@+id/bottomLayout" | |
| 50 | + android:layout_width="match_parent" | |
| 51 | + android:layout_height="wrap_content" | |
| 52 | + android:layout_alignParentBottom="true"> | |
| 53 | + | |
| 54 | + <View | |
| 55 | + android:id="@+id/bottomLine" | |
| 56 | + android:layout_width="match_parent" | |
| 57 | + android:layout_height="0.5dp" | |
| 58 | + android:layout_marginLeft="15dp" | |
| 59 | + android:layout_marginRight="15dp" | |
| 60 | + android:background="#66ffffff" /> | |
| 61 | + | |
| 62 | + <LinearLayout | |
| 63 | + android:layout_width="wrap_content" | |
| 64 | + android:layout_height="wrap_content" | |
| 65 | + android:layout_centerHorizontal="true"> | |
| 66 | + | |
| 67 | + <TextView | |
| 68 | + android:id="@+id/showSoftInput" | |
| 69 | + android:layout_width="250dp" | |
| 70 | + android:layout_height="35dp" | |
| 71 | + android:layout_below="@+id/bottomLine" | |
| 72 | + android:layout_marginBottom="19dp" | |
| 73 | + android:layout_marginRight="20dp" | |
| 74 | + android:layout_marginTop="19dp" | |
| 75 | + android:layout_toRightOf="@+id/playerPlayPause" | |
| 76 | + android:background="@drawable/cnlive_chat_btn_bg" | |
| 77 | + android:gravity="center" | |
| 78 | + android:text="说点什么吧..." | |
| 79 | + android:textColor="@android:color/white" | |
| 80 | + android:textSize="14dp" /> | |
| 81 | + | |
| 82 | + <LinearLayout | |
| 83 | + android:id="@+id/supportAnchor" | |
| 84 | + android:layout_width="45dp" | |
| 85 | + android:layout_height="45dp" | |
| 86 | + android:layout_gravity="center_vertical" | |
| 87 | + android:background="@drawable/cnlive_support_bg" | |
| 88 | + android:gravity="center" | |
| 89 | + android:orientation="vertical" | |
| 90 | + android:visibility="visible"> | |
| 91 | + | |
| 92 | + <TextView | |
| 93 | + android:layout_width="wrap_content" | |
| 94 | + android:layout_height="wrap_content" | |
| 95 | + android:text="¥" | |
| 96 | + android:textColor="@android:color/white" | |
| 97 | + android:textSize="16dp" /> | |
| 98 | + | |
| 99 | + <TextView | |
| 100 | + android:layout_width="wrap_content" | |
| 101 | + android:layout_height="wrap_content" | |
| 102 | + android:text="支持TA" | |
| 103 | + android:textColor="@android:color/white" | |
| 104 | + android:textSize="9dp" /> | |
| 105 | + | |
| 106 | + </LinearLayout> | |
| 107 | + | |
| 108 | + <LinearLayout | |
| 109 | + android:id="@+id/sendGift" | |
| 110 | + android:layout_width="wrap_content" | |
| 111 | + android:layout_height="wrap_content" | |
| 112 | + android:layout_gravity="center_vertical" | |
| 113 | + android:gravity="center" | |
| 114 | + android:orientation="vertical" | |
| 115 | + android:visibility="gone"> | |
| 116 | + | |
| 117 | + <ImageView | |
| 118 | + android:layout_width="44dp" | |
| 119 | + android:layout_height="34dp" | |
| 120 | + android:src="@drawable/cnlive_flay_kiss_big" /> | |
| 121 | + | |
| 122 | + <TextView | |
| 123 | + android:id="@+id/flyKissPriceText" | |
| 124 | + android:layout_width="wrap_content" | |
| 125 | + android:layout_height="wrap_content" | |
| 126 | + android:layout_marginTop="5dp" | |
| 127 | + android:textColor="@android:color/white" | |
| 128 | + android:textSize="11dp" | |
| 129 | + tools:text="10¥送飞吻" /> | |
| 130 | + | |
| 131 | + </LinearLayout> | |
| 132 | + </LinearLayout> | |
| 133 | + </RelativeLayout> | |
| 134 | + | |
| 135 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNUgcInfoView | |
| 136 | + android:id="@+id/infoView" | |
| 137 | + android:layout_width="match_parent" | |
| 138 | + android:layout_height="match_parent" /> | |
| 139 | + | |
| 140 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNLiveEndView | |
| 141 | + android:id="@+id/liveEndView" | |
| 142 | + android:layout_width="match_parent" | |
| 143 | + android:layout_height="match_parent" /> | |
| 144 | + | |
| 145 | + <include layout="@layout/cnlive_layout_player_top" /> | |
| 146 | + | |
| 147 | + <ImageView | |
| 148 | + android:id="@+id/pageBack" | |
| 149 | + android:layout_width="48dp" | |
| 150 | + android:layout_height="48dp" | |
| 151 | + android:padding="15dp" | |
| 152 | + android:scaleType="fitCenter" | |
| 153 | + android:src="@drawable/cnlive_video_back" /> | |
| 154 | + | |
| 155 | + <RelativeLayout | |
| 156 | + android:id="@+id/foregroundLayout" | |
| 157 | + android:layout_width="match_parent" | |
| 158 | + android:layout_height="match_parent" /> | |
| 159 | + | |
| 160 | +</RelativeLayout> | ... | ... |
app/src/main/res/layout/cnlive_fragment_ugc_playback_player.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_fragment_ugc_playback_player.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNMediaPlayer | |
| 8 | + android:id="@+id/cnlivePlayer" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="match_parent" /> | |
| 11 | + | |
| 12 | + <View | |
| 13 | + android:layout_width="match_parent" | |
| 14 | + android:layout_height="159dp" | |
| 15 | + android:background="@drawable/cnlive_video_top_bg"/> | |
| 16 | + | |
| 17 | + <include layout="@layout/cnlive_layout_player_anchor_info"/> | |
| 18 | + | |
| 19 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNUgcInfoView | |
| 20 | + android:id="@+id/infoView" | |
| 21 | + android:layout_width="match_parent" | |
| 22 | + android:layout_height="match_parent"/> | |
| 23 | + | |
| 24 | + <include layout="@layout/cnlive_layout_player_top"/> | |
| 25 | + | |
| 26 | + <ImageView | |
| 27 | + android:id="@+id/pageBack" | |
| 28 | + android:layout_width="48dp" | |
| 29 | + android:layout_height="48dp" | |
| 30 | + android:padding="15dp" | |
| 31 | + android:scaleType="fitCenter" | |
| 32 | + android:src="@drawable/cnlive_video_back" /> | |
| 33 | + | |
| 34 | +</RelativeLayout> | ... | ... |
app/src/main/res/layout/cnlive_item_anchor_focus.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_item_anchor_focus.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:id="@+id/focusLayout" | |
| 5 | + android:layout_width="wrap_content" | |
| 6 | + android:layout_height="45dp" | |
| 7 | + android:orientation="vertical" | |
| 8 | + android:gravity="center" | |
| 9 | + android:paddingLeft="8dp"> | |
| 10 | + | |
| 11 | + <ImageView | |
| 12 | + android:id="@+id/focusAvatar" | |
| 13 | + android:layout_width="25dp" | |
| 14 | + android:layout_height="25dp" | |
| 15 | + android:src="@drawable/cnlive_avatar2" | |
| 16 | + android:scaleType="fitXY"/> | |
| 17 | + | |
| 18 | + <TextView | |
| 19 | + android:id="@+id/ticketCount" | |
| 20 | + android:layout_width="wrap_content" | |
| 21 | + android:layout_height="wrap_content" | |
| 22 | + tools:text="100张" | |
| 23 | + android:textSize="11dp" | |
| 24 | + android:layout_marginTop="4dp" | |
| 25 | + android:textColor="@android:color/white"/> | |
| 26 | + | |
| 27 | +</LinearLayout> | |
| 0 | 28 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_item_chat_message.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_item_chat_message.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<com.cnlive.lib_cnvideo.ui.widget.ChatItemMessageView xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/chat_message_view" | |
| 4 | + android:layout_width="wrap_content" | |
| 5 | + android:layout_height="wrap_content"/> | ... | ... |
app/src/main/res/layout/cnlive_layout_controller.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_controller.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent"> | |
| 6 | + | |
| 7 | + <RelativeLayout | |
| 8 | + android:id="@+id/controller_top_layout" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="58dp" | |
| 11 | + android:background="@drawable/cnlive_video_top_bg"> | |
| 12 | + | |
| 13 | + <ImageView | |
| 14 | + android:id="@+id/playShare" | |
| 15 | + android:layout_width="40dp" | |
| 16 | + android:layout_height="40dp" | |
| 17 | + android:layout_alignParentRight="true" | |
| 18 | + android:layout_marginRight="3dp" | |
| 19 | + android:scaleType="fitCenter" | |
| 20 | + android:padding="11dp" | |
| 21 | + android:src="@drawable/cnlive_video_share" /> | |
| 22 | + | |
| 23 | + </RelativeLayout> | |
| 24 | + | |
| 25 | + <RelativeLayout | |
| 26 | + android:id="@+id/controller_bottom_layout" | |
| 27 | + android:layout_width="match_parent" | |
| 28 | + android:layout_height="58dp" | |
| 29 | + android:layout_alignParentBottom="true" | |
| 30 | + android:background="@drawable/cnlive_video_bottom_bg"> | |
| 31 | + | |
| 32 | + <LinearLayout | |
| 33 | + android:layout_width="wrap_content" | |
| 34 | + android:layout_height="wrap_content" | |
| 35 | + android:layout_alignParentBottom="true" | |
| 36 | + android:gravity="center" | |
| 37 | + android:layout_marginBottom="11dp"> | |
| 38 | + | |
| 39 | + <ImageView | |
| 40 | + android:id="@+id/avatar" | |
| 41 | + android:layout_width="11dp" | |
| 42 | + android:layout_height="13dp" | |
| 43 | + android:layout_marginLeft="15dp" | |
| 44 | + android:layout_marginRight="4dp" | |
| 45 | + android:src="@drawable/cnlive_avatar" /> | |
| 46 | + | |
| 47 | + <TextView | |
| 48 | + android:id="@+id/liveFocusCount" | |
| 49 | + android:layout_width="wrap_content" | |
| 50 | + android:layout_height="wrap_content" | |
| 51 | + android:text="0" | |
| 52 | + android:textColor="@android:color/white" | |
| 53 | + android:textSize="16dp" /> | |
| 54 | + </LinearLayout> | |
| 55 | + | |
| 56 | + <TextView | |
| 57 | + android:id="@+id/inputBtn" | |
| 58 | + android:layout_width="345dp" | |
| 59 | + android:layout_height="35dp" | |
| 60 | + android:layout_alignParentBottom="true" | |
| 61 | + android:layout_centerInParent="true" | |
| 62 | + android:layout_marginBottom="4dp" | |
| 63 | + android:background="@drawable/cnlive_chat_btn_bg" | |
| 64 | + android:gravity="center" | |
| 65 | + android:text="说点什么..." | |
| 66 | + android:textColor="@android:color/white" | |
| 67 | + android:textSize="14dp" | |
| 68 | + android:visibility="gone" /> | |
| 69 | + | |
| 70 | + <ToggleButton | |
| 71 | + android:id="@+id/barrageBtn" | |
| 72 | + android:layout_width="37dp" | |
| 73 | + android:layout_height="19dp" | |
| 74 | + android:layout_alignParentBottom="true" | |
| 75 | + android:layout_marginBottom="11dp" | |
| 76 | + android:layout_marginRight="19dp" | |
| 77 | + android:layout_toLeftOf="@+id/fullScreen" | |
| 78 | + android:background="@drawable/cnlive_switch_bg" | |
| 79 | + android:checked="true" | |
| 80 | + android:text="" | |
| 81 | + android:textOff="" | |
| 82 | + android:textOn="" /> | |
| 83 | + | |
| 84 | + <ImageView | |
| 85 | + android:id="@+id/fullScreen" | |
| 86 | + android:layout_width="40dp" | |
| 87 | + android:layout_height="40dp" | |
| 88 | + android:layout_alignParentBottom="true" | |
| 89 | + android:layout_alignParentRight="true" | |
| 90 | + android:layout_marginRight="4dp" | |
| 91 | + android:padding="11dp" | |
| 92 | + android:scaleType="fitCenter" | |
| 93 | + android:src="@drawable/cnlive_fullscreen_p" /> | |
| 94 | + | |
| 95 | + </RelativeLayout> | |
| 96 | + | |
| 97 | +</RelativeLayout> | |
| 0 | 98 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_dialog_message.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_dialog_message.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + xmlns:tools="http://schemas.android.com/tools" | |
| 6 | + android:orientation="vertical"> | |
| 7 | + | |
| 8 | + <TextView | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="wrap_content" | |
| 11 | + android:text="提示" | |
| 12 | + android:gravity="center_horizontal"/> | |
| 13 | + | |
| 14 | + <TextView | |
| 15 | + android:id="@+id/dialogMessage" | |
| 16 | + android:layout_width="match_parent" | |
| 17 | + android:layout_height="wrap_content" | |
| 18 | + tools:text="提示信息" | |
| 19 | + android:gravity="center_horizontal"/> | |
| 20 | + | |
| 21 | + <View | |
| 22 | + android:layout_width="match_parent" | |
| 23 | + android:layout_height="1px" | |
| 24 | + android:background="#9e9e9e"/> | |
| 25 | + | |
| 26 | + <TextView | |
| 27 | + android:id="@+id/dialogOk" | |
| 28 | + android:layout_width="match_parent" | |
| 29 | + android:layout_height="wrap_content" | |
| 30 | + tools:text="确定" | |
| 31 | + android:gravity="center_horizontal"/> | |
| 32 | + | |
| 33 | +</LinearLayout> | |
| 0 | 34 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_media_live_controller.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_media_live_controller.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + xmlns:tools="http://schemas.android.com/tools" | |
| 6 | + android:orientation="vertical"> | |
| 7 | + | |
| 8 | + <RelativeLayout | |
| 9 | + android:id="@+id/mediaControllerTopLayout" | |
| 10 | + android:layout_width="match_parent" | |
| 11 | + android:layout_height="58dp" | |
| 12 | + android:background="@drawable/cnlive_video_top_bg" | |
| 13 | + android:visibility="gone"> | |
| 14 | + | |
| 15 | + <TextView | |
| 16 | + android:id="@+id/videoTitle" | |
| 17 | + android:layout_width="match_parent" | |
| 18 | + android:layout_height="match_parent" | |
| 19 | + android:textColor="@android:color/white" | |
| 20 | + tools:text="title" | |
| 21 | + android:gravity="center"/> | |
| 22 | + | |
| 23 | + </RelativeLayout> | |
| 24 | + | |
| 25 | + <RelativeLayout | |
| 26 | + android:id="@+id/mediaControllerBottomLayout" | |
| 27 | + android:layout_width="match_parent" | |
| 28 | + android:layout_height="58dp" | |
| 29 | + android:layout_alignParentBottom="true" | |
| 30 | + android:background="@drawable/cnlive_video_bottom_bg" | |
| 31 | + android:visibility="gone"> | |
| 32 | + | |
| 33 | + <ImageView | |
| 34 | + android:id="@+id/playerPlayPause" | |
| 35 | + android:layout_width="30dp" | |
| 36 | + android:layout_height="30dp" | |
| 37 | + android:src="@drawable/cnlive_pause" | |
| 38 | + android:layout_centerVertical="true"/> | |
| 39 | + | |
| 40 | + <TextView | |
| 41 | + android:id="@+id/resolution" | |
| 42 | + android:layout_width="wrap_content" | |
| 43 | + android:layout_height="wrap_content" | |
| 44 | + android:text="高清" | |
| 45 | + android:layout_toLeftOf="@+id/videos" | |
| 46 | + android:layout_centerVertical="true" | |
| 47 | + android:textColor="@android:color/white" | |
| 48 | + android:layout_marginRight="10dp"/> | |
| 49 | + | |
| 50 | + <TextView | |
| 51 | + android:id="@+id/videos" | |
| 52 | + android:layout_width="wrap_content" | |
| 53 | + android:layout_height="wrap_content" | |
| 54 | + android:text="视角" | |
| 55 | + android:layout_toLeftOf="@+id/playerFullScreen" | |
| 56 | + android:layout_centerVertical="true" | |
| 57 | + android:textColor="@android:color/white" | |
| 58 | + android:layout_marginRight="10dp"/> | |
| 59 | + | |
| 60 | + <ImageView | |
| 61 | + android:id="@+id/playerFullScreen" | |
| 62 | + android:layout_width="30dp" | |
| 63 | + android:layout_height="30dp" | |
| 64 | + android:layout_centerVertical="true" | |
| 65 | + android:src="@drawable/cnlive_fullscreen_p" | |
| 66 | + android:layout_alignParentRight="true"/> | |
| 67 | + | |
| 68 | + </RelativeLayout> | |
| 69 | + | |
| 70 | + | |
| 71 | +</RelativeLayout> | |
| 0 | 72 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_media_playback_controller.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_media_playback_controller.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + xmlns:tools="http://schemas.android.com/tools" | |
| 6 | + android:orientation="vertical"> | |
| 7 | + | |
| 8 | + <RelativeLayout | |
| 9 | + android:id="@+id/mediaControllerTopLayout" | |
| 10 | + android:layout_width="match_parent" | |
| 11 | + android:layout_height="58dp"> | |
| 12 | + | |
| 13 | + <TextView | |
| 14 | + android:id="@+id/videoTitle" | |
| 15 | + android:layout_width="match_parent" | |
| 16 | + android:layout_height="match_parent" | |
| 17 | + android:textColor="@android:color/white" | |
| 18 | + tools:text="title" | |
| 19 | + android:gravity="center"/> | |
| 20 | + | |
| 21 | + </RelativeLayout> | |
| 22 | + | |
| 23 | + <View | |
| 24 | + android:layout_width="match_parent" | |
| 25 | + android:layout_height="159dp" | |
| 26 | + android:background="@drawable/cnlive_video_bottom_bg" | |
| 27 | + android:layout_alignParentBottom="true"/> | |
| 28 | + | |
| 29 | + <RelativeLayout | |
| 30 | + android:id="@+id/mediaControllerBottomLayout" | |
| 31 | + android:layout_width="match_parent" | |
| 32 | + android:layout_height="58dp" | |
| 33 | + android:layout_alignParentBottom="true" | |
| 34 | + android:background="@drawable/cnlive_video_bottom_bg"> | |
| 35 | + | |
| 36 | + <ImageView | |
| 37 | + android:id="@+id/playerPlayPause" | |
| 38 | + android:layout_width="20dp" | |
| 39 | + android:layout_height="20dp" | |
| 40 | + android:src="@drawable/cnlive_pause" | |
| 41 | + android:layout_centerVertical="true" | |
| 42 | + android:layout_marginLeft="20dp" | |
| 43 | + android:layout_marginRight="15dp"/> | |
| 44 | + | |
| 45 | + <TextView | |
| 46 | + android:id="@+id/timeCur" | |
| 47 | + android:layout_width="wrap_content" | |
| 48 | + android:layout_height="wrap_content" | |
| 49 | + android:layout_marginBottom="8dp" | |
| 50 | + android:text="00:00" | |
| 51 | + android:textSize="12dp" | |
| 52 | + android:textColor="@android:color/white" | |
| 53 | + android:layout_toRightOf="@+id/playerPlayPause" | |
| 54 | + android:layout_centerVertical="true"/> | |
| 55 | + | |
| 56 | + <SeekBar | |
| 57 | + android:id="@+id/videoProgressBar" | |
| 58 | + android:layout_width="match_parent" | |
| 59 | + android:layout_height="wrap_content" | |
| 60 | + android:layout_centerVertical="true" | |
| 61 | + android:layout_toRightOf="@+id/timeCur" | |
| 62 | + android:maxHeight="2dp" | |
| 63 | + android:minHeight="2dp" | |
| 64 | + android:layout_toLeftOf="@+id/timeDur" | |
| 65 | + android:progressDrawable="@drawable/cnlive_seekbar" | |
| 66 | + android:thumb="@drawable/cnlive_seekbar_progress" | |
| 67 | + android:thumbOffset="0dip"/> | |
| 68 | + | |
| 69 | + <TextView | |
| 70 | + android:id="@+id/timeDur" | |
| 71 | + android:layout_width="wrap_content" | |
| 72 | + android:layout_height="wrap_content" | |
| 73 | + android:layout_marginBottom="8dp" | |
| 74 | + android:text="00:00" | |
| 75 | + android:layout_marginRight="15dp" | |
| 76 | + android:textSize="12dp" | |
| 77 | + android:textColor="@android:color/white" | |
| 78 | + android:layout_toLeftOf="@+id/playerFullScreen" | |
| 79 | + android:layout_centerVertical="true"/> | |
| 80 | + | |
| 81 | + <ImageView | |
| 82 | + android:id="@+id/playerFullScreen" | |
| 83 | + android:layout_width="30dp" | |
| 84 | + android:layout_height="30dp" | |
| 85 | + android:layout_centerVertical="true" | |
| 86 | + android:src="@drawable/cnlive_fullscreen_p" | |
| 87 | + android:layout_alignParentRight="true"/> | |
| 88 | + | |
| 89 | + </RelativeLayout> | |
| 90 | + | |
| 91 | + | |
| 92 | +</RelativeLayout> | |
| 0 | 93 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_media_player.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_media_player.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="wrap_content"> | |
| 5 | + | |
| 6 | + <RelativeLayout | |
| 7 | + android:id="@+id/playerLayout" | |
| 8 | + android:layout_width="match_parent" | |
| 9 | + android:layout_height="match_parent" | |
| 10 | + android:background="#000000"> | |
| 11 | + | |
| 12 | + <com.cnlive.libs.video.player.CNMediaPlayerView | |
| 13 | + android:id="@+id/player" | |
| 14 | + android:layout_width="match_parent" | |
| 15 | + android:layout_height="match_parent" | |
| 16 | + android:layout_centerInParent="true"/> | |
| 17 | + | |
| 18 | + | |
| 19 | + </RelativeLayout> | |
| 20 | + | |
| 21 | + <com.cnlive.lib_cnvideo.ui.widget.player.CNTouchView | |
| 22 | + android:id="@+id/playerTouch" | |
| 23 | + android:layout_width="match_parent" | |
| 24 | + android:layout_height="match_parent" | |
| 25 | + android:layout_alignBottom="@+id/playerLayout" | |
| 26 | + android:layout_alignTop="@+id/playerLayout"/> | |
| 27 | + | |
| 28 | + <RelativeLayout | |
| 29 | + android:id="@+id/controllerLayout" | |
| 30 | + android:layout_width="match_parent" | |
| 31 | + android:layout_height="wrap_content" | |
| 32 | + android:layout_alignBottom="@+id/playerLayout" | |
| 33 | + android:layout_alignTop="@+id/playerLayout"> | |
| 34 | + | |
| 35 | + </RelativeLayout> | |
| 36 | + | |
| 37 | + <ImageView | |
| 38 | + android:id="@+id/videoBack" | |
| 39 | + android:layout_width="40dp" | |
| 40 | + android:layout_height="40dp" | |
| 41 | + android:layout_marginLeft="3dp" | |
| 42 | + android:padding="11dp" | |
| 43 | + android:scaleType="fitCenter" | |
| 44 | + android:src="@drawable/cnlive_video_back" /> | |
| 45 | + | |
| 46 | +</RelativeLayout> | |
| 0 | 47 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_media_ugc_live_controller.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_media_ugc_live_controller.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <RelativeLayout | |
| 8 | + android:id="@+id/mediaControllerTopLayout" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="58dp"> | |
| 11 | + | |
| 12 | + | |
| 13 | + </RelativeLayout> | |
| 14 | + | |
| 15 | + <RelativeLayout | |
| 16 | + android:id="@+id/mediaControllerBottomLayout" | |
| 17 | + android:layout_width="match_parent" | |
| 18 | + android:layout_height="58dp" | |
| 19 | + android:layout_alignParentBottom="true"> | |
| 20 | + | |
| 21 | + <ImageView | |
| 22 | + android:id="@+id/playerPlayPause" | |
| 23 | + android:layout_width="30dp" | |
| 24 | + android:layout_height="30dp" | |
| 25 | + android:src="@drawable/cnlive_pause" | |
| 26 | + android:layout_centerVertical="true" | |
| 27 | + android:visibility="gone"/> | |
| 28 | + | |
| 29 | + </RelativeLayout> | |
| 30 | + | |
| 31 | + | |
| 32 | +</RelativeLayout> | |
| 0 | 33 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_media_ugc_playback_controller.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_media_ugc_playback_controller.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <RelativeLayout | |
| 8 | + android:id="@+id/mediaControllerTopLayout" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="58dp" | |
| 11 | + android:background="@drawable/cnlive_video_top_bg"> | |
| 12 | + | |
| 13 | + </RelativeLayout> | |
| 14 | + | |
| 15 | + <RelativeLayout | |
| 16 | + android:id="@+id/mediaControllerBottomLayout" | |
| 17 | + android:layout_width="match_parent" | |
| 18 | + android:layout_height="58dp" | |
| 19 | + android:layout_alignParentBottom="true" | |
| 20 | + android:background="@drawable/cnlive_video_bottom_bg"> | |
| 21 | + | |
| 22 | + <ImageView | |
| 23 | + android:id="@+id/playerPlayPause" | |
| 24 | + android:layout_width="20dp" | |
| 25 | + android:layout_height="20dp" | |
| 26 | + android:src="@drawable/cnlive_pause" | |
| 27 | + android:layout_centerVertical="true" | |
| 28 | + android:layout_marginLeft="20dp" | |
| 29 | + android:layout_marginRight="15dp"/> | |
| 30 | + | |
| 31 | + <TextView | |
| 32 | + android:id="@+id/timeCur" | |
| 33 | + android:layout_width="wrap_content" | |
| 34 | + android:layout_height="wrap_content" | |
| 35 | + android:layout_marginBottom="8dp" | |
| 36 | + android:text="00:00" | |
| 37 | + android:textSize="12dp" | |
| 38 | + android:textColor="@android:color/white" | |
| 39 | + android:layout_toRightOf="@+id/playerPlayPause" | |
| 40 | + android:layout_centerVertical="true"/> | |
| 41 | + | |
| 42 | + <SeekBar | |
| 43 | + android:id="@+id/videoProgressBar" | |
| 44 | + android:layout_width="match_parent" | |
| 45 | + android:layout_height="wrap_content" | |
| 46 | + android:layout_centerVertical="true" | |
| 47 | + android:layout_toRightOf="@+id/timeCur" | |
| 48 | + android:maxHeight="2dp" | |
| 49 | + android:minHeight="2dp" | |
| 50 | + android:layout_toLeftOf="@+id/timeDur" | |
| 51 | + android:progressDrawable="@drawable/cnlive_seekbar" | |
| 52 | + android:thumb="@drawable/cnlive_seekbar_progress" | |
| 53 | + android:thumbOffset="0dip"/> | |
| 54 | + | |
| 55 | + <TextView | |
| 56 | + android:id="@+id/timeDur" | |
| 57 | + android:layout_width="wrap_content" | |
| 58 | + android:layout_height="wrap_content" | |
| 59 | + android:layout_marginBottom="8dp" | |
| 60 | + android:text="00:00" | |
| 61 | + android:layout_marginRight="15dp" | |
| 62 | + android:textSize="12dp" | |
| 63 | + android:textColor="@android:color/white" | |
| 64 | + android:layout_alignParentRight="true" | |
| 65 | + android:layout_centerVertical="true"/> | |
| 66 | + | |
| 67 | + </RelativeLayout> | |
| 68 | + | |
| 69 | + | |
| 70 | +</RelativeLayout> | |
| 0 | 71 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_player_anchor_info.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_player_anchor_info.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:id="@+id/anchorAboutLayout" | |
| 5 | + android:layout_width="match_parent" | |
| 6 | + android:layout_height="wrap_content" | |
| 7 | + android:layout_below="@+id/topLayout"> | |
| 8 | + | |
| 9 | + <RelativeLayout | |
| 10 | + android:id="@+id/aboutTopLayout" | |
| 11 | + android:layout_width="match_parent" | |
| 12 | + android:layout_height="wrap_content" | |
| 13 | + android:paddingRight="15dp"> | |
| 14 | + | |
| 15 | + <LinearLayout | |
| 16 | + android:id="@+id/ticketLayout" | |
| 17 | + android:layout_width="wrap_content" | |
| 18 | + android:layout_height="wrap_content" | |
| 19 | + android:minWidth="50dp" | |
| 20 | + android:layout_centerVertical="true" | |
| 21 | + android:layout_marginRight="23dp" | |
| 22 | + android:gravity="center" | |
| 23 | + android:orientation="vertical" | |
| 24 | + android:layout_marginLeft="15dp"> | |
| 25 | + | |
| 26 | + <TextView | |
| 27 | + android:id="@+id/ticketCount" | |
| 28 | + android:layout_width="wrap_content" | |
| 29 | + android:layout_height="wrap_content" | |
| 30 | + tools:text="预售票房" | |
| 31 | + android:textColor="@android:color/white" | |
| 32 | + android:textSize="16dp" /> | |
| 33 | + | |
| 34 | + <TextView | |
| 35 | + android:id="@+id/ticketText" | |
| 36 | + android:layout_width="wrap_content" | |
| 37 | + android:layout_height="wrap_content" | |
| 38 | + android:layout_marginTop="2dp" | |
| 39 | + tools:text="预售票房" | |
| 40 | + android:textColor="@android:color/white" | |
| 41 | + android:textSize="12dp" /> | |
| 42 | + </LinearLayout> | |
| 43 | + | |
| 44 | + <android.support.v7.widget.RecyclerView | |
| 45 | + android:id="@+id/anchorFocusList" | |
| 46 | + android:layout_width="wrap_content" | |
| 47 | + android:layout_height="45dp" | |
| 48 | + android:layout_toLeftOf="@+id/contributionList" | |
| 49 | + android:layout_toRightOf="@+id/ticketLayout" | |
| 50 | + android:overScrollMode="never" /> | |
| 51 | + | |
| 52 | + <TextView | |
| 53 | + android:id="@+id/contributionList" | |
| 54 | + android:layout_width="wrap_content" | |
| 55 | + android:layout_height="wrap_content" | |
| 56 | + android:layout_alignParentRight="true" | |
| 57 | + android:layout_centerVertical="true" | |
| 58 | + android:layout_marginLeft="23dp" | |
| 59 | + android:text="贡献榜 >" | |
| 60 | + android:textColor="@android:color/white" | |
| 61 | + android:textSize="12dp" /> | |
| 62 | + | |
| 63 | + </RelativeLayout> | |
| 64 | + | |
| 65 | + <View | |
| 66 | + android:id="@+id/topLine" | |
| 67 | + android:layout_width="match_parent" | |
| 68 | + android:layout_height="0.5dp" | |
| 69 | + android:layout_below="@+id/aboutTopLayout" | |
| 70 | + android:layout_marginLeft="15dp" | |
| 71 | + android:layout_marginRight="15dp" | |
| 72 | + android:layout_marginTop="6dp" | |
| 73 | + android:background="#33ffffff" /> | |
| 74 | + | |
| 75 | + <LinearLayout | |
| 76 | + android:layout_width="wrap_content" | |
| 77 | + android:layout_height="wrap_content" | |
| 78 | + android:layout_alignParentRight="true" | |
| 79 | + android:layout_below="@+id/topLine" | |
| 80 | + android:layout_marginRight="15dp" | |
| 81 | + android:layout_marginTop="10dp" | |
| 82 | + android:gravity="center"> | |
| 83 | + | |
| 84 | + <ImageView | |
| 85 | + android:id="@+id/avatar" | |
| 86 | + android:layout_width="13dp" | |
| 87 | + android:layout_height="13dp" | |
| 88 | + android:layout_marginLeft="15dp" | |
| 89 | + android:layout_marginRight="4dp" | |
| 90 | + android:src="@drawable/cnlive_online_avatar" /> | |
| 91 | + | |
| 92 | + <TextView | |
| 93 | + android:id="@+id/liveFocusCount" | |
| 94 | + android:layout_width="wrap_content" | |
| 95 | + android:layout_height="wrap_content" | |
| 96 | + android:text="0" | |
| 97 | + android:textColor="@android:color/white" | |
| 98 | + android:textSize="16dp" /> | |
| 99 | + </LinearLayout> | |
| 100 | + | |
| 101 | +</RelativeLayout> | |
| 0 | 102 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_player_info.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_player_info.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <LinearLayout | |
| 8 | + android:id="@+id/loadingLayout" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="match_parent" | |
| 11 | + android:layout_centerInParent="true" | |
| 12 | + android:orientation="vertical" | |
| 13 | + android:gravity="center" | |
| 14 | + android:visibility="gone"> | |
| 15 | + | |
| 16 | + <ProgressBar | |
| 17 | + android:layout_width="50dp" | |
| 18 | + android:layout_height="50dp"/> | |
| 19 | + | |
| 20 | + <TextView | |
| 21 | + android:id="@+id/loadProgress" | |
| 22 | + android:layout_width="wrap_content" | |
| 23 | + android:layout_height="wrap_content" | |
| 24 | + android:textColor="@android:color/white" | |
| 25 | + android:textSize="13dp"/> | |
| 26 | + </LinearLayout> | |
| 27 | + | |
| 28 | + <LinearLayout | |
| 29 | + android:id="@+id/errorLayout" | |
| 30 | + android:layout_width="match_parent" | |
| 31 | + android:layout_height="match_parent" | |
| 32 | + android:layout_centerInParent="true" | |
| 33 | + android:orientation="vertical" | |
| 34 | + android:gravity="center" | |
| 35 | + android:visibility="gone"> | |
| 36 | + | |
| 37 | + <TextView | |
| 38 | + android:id="@+id/errorRetry" | |
| 39 | + android:layout_width="wrap_content" | |
| 40 | + android:layout_height="wrap_content" | |
| 41 | + android:text="@string/cnlive_error_load_retry" | |
| 42 | + android:textColor="@android:color/white" | |
| 43 | + android:textSize="13dp"/> | |
| 44 | + </LinearLayout> | |
| 45 | + | |
| 46 | +</RelativeLayout> | |
| 0 | 47 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_player_top.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_player_top.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/topLayout" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="58dp" | |
| 6 | + android:clipToPadding="true" | |
| 7 | + android:fitsSystemWindows="true"> | |
| 8 | + | |
| 9 | + | |
| 10 | + <ImageView | |
| 11 | + android:id="@+id/videoShare" | |
| 12 | + android:layout_width="18dp" | |
| 13 | + android:layout_height="18dp" | |
| 14 | + android:layout_alignParentRight="true" | |
| 15 | + android:layout_marginRight="15dp" | |
| 16 | + android:layout_marginTop="15dp" | |
| 17 | + android:src="@drawable/cnlive_video_share" /> | |
| 18 | + | |
| 19 | + <ImageView | |
| 20 | + android:id="@+id/anchorInfo" | |
| 21 | + android:layout_width="18dp" | |
| 22 | + android:layout_height="18dp" | |
| 23 | + android:layout_marginRight="25dp" | |
| 24 | + android:layout_marginTop="15dp" | |
| 25 | + android:layout_toLeftOf="@+id/videoShare" | |
| 26 | + android:src="@drawable/cnlive_anchor_info" /> | |
| 27 | + | |
| 28 | +</RelativeLayout> | |
| 0 | 29 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_player_ugc_info.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_player_ugc_info.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <LinearLayout | |
| 8 | + android:id="@+id/loadingLayout" | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="match_parent" | |
| 11 | + android:layout_centerInParent="true" | |
| 12 | + android:gravity="center" | |
| 13 | + android:orientation="vertical" | |
| 14 | + android:visibility="gone"> | |
| 15 | + | |
| 16 | + <ProgressBar | |
| 17 | + android:layout_width="50dp" | |
| 18 | + android:layout_height="50dp" /> | |
| 19 | + | |
| 20 | + <TextView | |
| 21 | + android:id="@+id/loadProgress" | |
| 22 | + android:layout_width="wrap_content" | |
| 23 | + android:layout_height="wrap_content" | |
| 24 | + android:layout_marginTop="60dp" | |
| 25 | + android:textColor="@android:color/white" | |
| 26 | + android:textSize="14dp" /> | |
| 27 | + </LinearLayout> | |
| 28 | + | |
| 29 | + <RelativeLayout | |
| 30 | + android:id="@+id/errorLayout" | |
| 31 | + android:layout_width="match_parent" | |
| 32 | + android:layout_height="match_parent" | |
| 33 | + android:visibility="gone"> | |
| 34 | + | |
| 35 | + <include layout="@layout/cnsteam_layout_with_logo" /> | |
| 36 | + | |
| 37 | + <RelativeLayout | |
| 38 | + android:layout_width="wrap_content" | |
| 39 | + android:layout_height="wrap_content" | |
| 40 | + android:layout_alignParentBottom="true" | |
| 41 | + android:layout_centerHorizontal="true" | |
| 42 | + android:layout_marginBottom="72dp"> | |
| 43 | + <TextView | |
| 44 | + android:id="@+id/errorText" | |
| 45 | + android:layout_width="wrap_content" | |
| 46 | + android:layout_height="wrap_content" | |
| 47 | + android:text="@string/cnlive_error_player_ugc_connect" | |
| 48 | + android:textColor="@android:color/white" | |
| 49 | + android:textSize="14dp" /> | |
| 50 | + | |
| 51 | + <TextView | |
| 52 | + android:id="@+id/errorRetry" | |
| 53 | + android:layout_width="wrap_content" | |
| 54 | + android:layout_height="wrap_content" | |
| 55 | + android:layout_marginTop="60dp" | |
| 56 | + android:background="@drawable/cnlive_ugc_retry_bg" | |
| 57 | + android:gravity="center" | |
| 58 | + android:text="@string/cnlive_error_player_ugc_retry" | |
| 59 | + android:textColor="@android:color/white" | |
| 60 | + android:textSize="14dp" /> | |
| 61 | + | |
| 62 | + </RelativeLayout> | |
| 63 | + | |
| 64 | + </RelativeLayout> | |
| 65 | + | |
| 66 | +</RelativeLayout> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_popup_radio_btn.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_popup_radio_btn.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RadioButton xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="wrap_content" | |
| 4 | + android:layout_height="wrap_content" | |
| 5 | + android:layout_margin="4dp" | |
| 6 | + android:button="@null" | |
| 7 | + android:background="@null" | |
| 8 | + android:textColor="@android:color/white"/> | |
| 0 | 9 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_popup_radio_group.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_popup_radio_group.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="wrap_content" | |
| 4 | + android:layout_height="wrap_content" | |
| 5 | + android:padding="8dp" | |
| 6 | + android:background="@drawable/cnlive_popup_bg" | |
| 7 | + android:gravity="center"> | |
| 8 | +</RadioGroup> | |
| 0 | 9 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_toast.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_toast.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="wrap_content" | |
| 4 | + android:layout_height="wrap_content" | |
| 5 | + android:orientation="vertical" | |
| 6 | + android:background="@drawable/cnlive_chat_btn_bg"> | |
| 7 | + | |
| 8 | + <TextView | |
| 9 | + android:id="@+id/toastMsg" | |
| 10 | + android:layout_width="wrap_content" | |
| 11 | + android:layout_height="wrap_content" | |
| 12 | + android:textSize="14dp" | |
| 13 | + android:paddingLeft="12dp" | |
| 14 | + android:paddingRight="12dp" | |
| 15 | + android:paddingTop="4dp" | |
| 16 | + android:paddingBottom="4dp" | |
| 17 | + android:textColor="@color/Gray_1" | |
| 18 | + android:gravity="center"/> | |
| 19 | + | |
| 20 | +</LinearLayout> | |
| 0 | 21 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_layout_ugc_live_end.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_layout_ugc_live_end.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:background="#000000" | |
| 6 | + android:id="@+id/liveEndLayout"> | |
| 7 | + | |
| 8 | + <RelativeLayout | |
| 9 | + android:layout_width="wrap_content" | |
| 10 | + android:layout_height="wrap_content" | |
| 11 | + android:layout_centerInParent="true"> | |
| 12 | + | |
| 13 | + <TextView | |
| 14 | + android:id="@+id/name" | |
| 15 | + android:layout_width="wrap_content" | |
| 16 | + android:layout_height="wrap_content" | |
| 17 | + android:text="直播结束" | |
| 18 | + android:textSize="26dp" | |
| 19 | + android:layout_marginBottom="20dp" | |
| 20 | + android:layout_centerHorizontal="true" | |
| 21 | + android:textColor="@android:color/white"/> | |
| 22 | + | |
| 23 | + <View | |
| 24 | + android:id="@+id/line" | |
| 25 | + android:layout_width="100dp" | |
| 26 | + android:layout_height="1px" | |
| 27 | + android:background="#9e9e9e" | |
| 28 | + android:layout_marginBottom="50dp" | |
| 29 | + android:layout_below="@+id/name" | |
| 30 | + android:layout_centerHorizontal="true"/> | |
| 31 | + | |
| 32 | + <TextView | |
| 33 | + android:id="@+id/watchCount" | |
| 34 | + android:layout_width="wrap_content" | |
| 35 | + android:layout_height="wrap_content" | |
| 36 | + android:text="22222分看过" | |
| 37 | + android:textColor="#999999" | |
| 38 | + android:layout_marginBottom="30dp" | |
| 39 | + android:textSize="19dp" | |
| 40 | + android:layout_centerHorizontal="true" | |
| 41 | + android:layout_below="@+id/line"/> | |
| 42 | + | |
| 43 | + <TextView | |
| 44 | + android:id="@+id/contributionCount" | |
| 45 | + android:layout_width="wrap_content" | |
| 46 | + android:layout_height="wrap_content" | |
| 47 | + android:text="22222分看过" | |
| 48 | + android:textColor="#999999" | |
| 49 | + android:textSize="19dp" | |
| 50 | + android:layout_centerHorizontal="true" | |
| 51 | + android:layout_below="@+id/watchCount"/> | |
| 52 | + | |
| 53 | + <ImageView | |
| 54 | + android:id="@+id/replay" | |
| 55 | + android:layout_width="55dp" | |
| 56 | + android:layout_height="55dp" | |
| 57 | + android:layout_below="@+id/contributionCount" | |
| 58 | + android:layout_centerHorizontal="true" | |
| 59 | + android:layout_marginTop="50dp" | |
| 60 | + android:layout_marginBottom="15dp" | |
| 61 | + android:src="@drawable/cnlive_replay"/> | |
| 62 | + | |
| 63 | + <TextView | |
| 64 | + android:id="@+id/replayText" | |
| 65 | + android:layout_width="wrap_content" | |
| 66 | + android:layout_height="wrap_content" | |
| 67 | + android:text="重播" | |
| 68 | + android:textColor="@android:color/white" | |
| 69 | + android:textSize="14dp" | |
| 70 | + android:layout_centerHorizontal="true" | |
| 71 | + android:layout_below="@+id/replay"/> | |
| 72 | + | |
| 73 | + <TextView | |
| 74 | + android:id="@+id/movieInfo" | |
| 75 | + android:layout_width="wrap_content" | |
| 76 | + android:layout_height="wrap_content" | |
| 77 | + android:text="22222分看过" | |
| 78 | + android:textColor="@android:color/white" | |
| 79 | + android:textSize="14dp" | |
| 80 | + android:layout_centerHorizontal="true" | |
| 81 | + android:layout_marginTop="50dp" | |
| 82 | + android:layout_below="@+id/replayText"/> | |
| 83 | + </RelativeLayout> | |
| 84 | + | |
| 85 | +</RelativeLayout> | |
| 0 | 86 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_player_touch.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_player_touch.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent"> | |
| 5 | + | |
| 6 | + | |
| 7 | + <TextView | |
| 8 | + android:id="@+id/touch_progress" | |
| 9 | + android:layout_width="wrap_content" | |
| 10 | + android:layout_height="wrap_content" | |
| 11 | + android:layout_centerInParent="true" | |
| 12 | + android:background="@android:color/black" | |
| 13 | + android:textColor="@android:color/white" | |
| 14 | + android:textSize="18sp" | |
| 15 | + android:visibility="gone" /> | |
| 16 | + | |
| 17 | + <FrameLayout | |
| 18 | + android:id="@+id/operation_volume_brightness" | |
| 19 | + android:layout_width="wrap_content" | |
| 20 | + android:layout_height="wrap_content" | |
| 21 | + android:layout_centerInParent="true" | |
| 22 | + android:background="#00000000" | |
| 23 | + android:orientation="horizontal" | |
| 24 | + android:padding="0dip" | |
| 25 | + android:visibility="gone"> | |
| 26 | + | |
| 27 | + <ImageView | |
| 28 | + android:id="@+id/operation_bg" | |
| 29 | + android:layout_width="120dp" | |
| 30 | + android:layout_height="120dp" | |
| 31 | + android:layout_gravity="center" | |
| 32 | + android:contentDescription="@null" | |
| 33 | + android:scaleType="fitXY" /> | |
| 34 | + | |
| 35 | + <FrameLayout | |
| 36 | + android:layout_width="wrap_content" | |
| 37 | + android:layout_height="wrap_content" | |
| 38 | + android:layout_gravity="bottom|center_horizontal" | |
| 39 | + android:paddingBottom="25dip"> | |
| 40 | + | |
| 41 | + <ImageView | |
| 42 | + android:id="@+id/operation_full" | |
| 43 | + android:layout_width="94dip" | |
| 44 | + android:layout_height="wrap_content" | |
| 45 | + android:layout_gravity="left" | |
| 46 | + android:contentDescription="@null" | |
| 47 | + android:background="@drawable/cnlive_video_num_bg" /> | |
| 48 | + | |
| 49 | + <ImageView | |
| 50 | + android:id="@+id/operation_percent" | |
| 51 | + android:layout_width="0dip" | |
| 52 | + android:layout_height="wrap_content" | |
| 53 | + android:layout_gravity="left" | |
| 54 | + android:contentDescription="@null" | |
| 55 | + android:scaleType="matrix" | |
| 56 | + android:background="@drawable/cnlive_video_num_front" /> | |
| 57 | + </FrameLayout> | |
| 58 | + </FrameLayout> | |
| 59 | + | |
| 60 | +</RelativeLayout> | |
| 0 | 61 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_view_chat_barrage.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_view_chat_barrage.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:id="@+id/chat_item_bg" | |
| 5 | + android:layout_width="wrap_content" | |
| 6 | + android:layout_height="wrap_content" | |
| 7 | + android:layout_marginTop="8dp"> | |
| 8 | + | |
| 9 | + <com.cnlive.libs.util.ui.emojicon.EmojiconTextView | |
| 10 | + android:id="@+id/chat_item_name" | |
| 11 | + android:layout_width="wrap_content" | |
| 12 | + android:layout_height="wrap_content" | |
| 13 | + android:layout_centerVertical="true" | |
| 14 | + android:ellipsize="end" | |
| 15 | + android:maxEms="6" | |
| 16 | + android:singleLine="true" | |
| 17 | + android:padding="4dp" | |
| 18 | + android:textColor="@color/Yellow_1" | |
| 19 | + android:textSize="15sp" | |
| 20 | + tools:text="Name:" /> | |
| 21 | + | |
| 22 | + <com.cnlive.libs.util.ui.emojicon.EmojiconTextView | |
| 23 | + android:id="@+id/chat_item_message" | |
| 24 | + android:layout_width="wrap_content" | |
| 25 | + android:layout_height="wrap_content" | |
| 26 | + android:layout_centerVertical="true" | |
| 27 | + android:padding="4dp" | |
| 28 | + android:layout_toRightOf="@id/chat_item_name" | |
| 29 | + android:singleLine="true" | |
| 30 | + android:textColor="#ffffff" | |
| 31 | + android:textSize="15sp" | |
| 32 | + tools:text="Message" /> | |
| 33 | + | |
| 34 | + | |
| 35 | +</RelativeLayout> | |
| 0 | 36 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_view_chat_gift.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_view_chat_gift.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:id="@+id/chat_item_bg" | |
| 5 | + android:layout_width="wrap_content" | |
| 6 | + android:layout_height="wrap_content"> | |
| 7 | + | |
| 8 | + | |
| 9 | + <RelativeLayout | |
| 10 | + android:id="@+id/msg_layout" | |
| 11 | + android:layout_width="wrap_content" | |
| 12 | + android:layout_height="wrap_content" | |
| 13 | + android:layout_alignBottom="@+id/chat_item_image" | |
| 14 | + android:layout_alignLeft="@+id/chat_item_image" | |
| 15 | + android:layout_alignTop="@+id/chat_item_image" | |
| 16 | + android:layout_marginBottom="4dp" | |
| 17 | + android:layout_marginLeft="21dp" | |
| 18 | + android:layout_marginTop="4dp" | |
| 19 | + android:background="@drawable/cnlive_chat_gift_bg" | |
| 20 | + android:paddingRight="10dp"> | |
| 21 | + | |
| 22 | + <com.cnlive.libs.util.ui.emojicon.EmojiconTextView | |
| 23 | + android:id="@+id/chat_item_name" | |
| 24 | + android:layout_width="wrap_content" | |
| 25 | + android:layout_height="wrap_content" | |
| 26 | + android:layout_marginLeft="28dp" | |
| 27 | + android:layout_marginRight="48dp" | |
| 28 | + android:layout_marginTop="3dp" | |
| 29 | + | |
| 30 | + android:ellipsize="end" | |
| 31 | + android:maxEms="6" | |
| 32 | + android:singleLine="true" | |
| 33 | + android:textColor="#ffd500" | |
| 34 | + android:textSize="11dp" | |
| 35 | + tools:text="Nmae" /> | |
| 36 | + | |
| 37 | + | |
| 38 | + <com.cnlive.libs.util.ui.emojicon.EmojiconTextView | |
| 39 | + android:id="@+id/chat_item_message" | |
| 40 | + android:layout_width="wrap_content" | |
| 41 | + android:layout_height="wrap_content" | |
| 42 | + android:layout_alignParentBottom="true" | |
| 43 | + android:layout_marginBottom="3dp" | |
| 44 | + android:layout_marginLeft="28dp" | |
| 45 | + android:ellipsize="end" | |
| 46 | + android:singleLine="true" | |
| 47 | + android:textColor="#ffffff" | |
| 48 | + android:textSize="11dp" | |
| 49 | + tools:text="Test Message ..." /> | |
| 50 | + | |
| 51 | + </RelativeLayout> | |
| 52 | + | |
| 53 | + | |
| 54 | + <ImageView | |
| 55 | + android:id="@+id/chat_item_image" | |
| 56 | + android:layout_width="42dp" | |
| 57 | + android:layout_height="42dp" | |
| 58 | + android:layout_marginTop="8dp" | |
| 59 | + android:background="@drawable/cnlive_chat_icon_bg" | |
| 60 | + android:padding="1dp" /> | |
| 61 | + | |
| 62 | + <ImageView | |
| 63 | + android:id="@+id/chat_item_gift" | |
| 64 | + android:layout_width="30dp" | |
| 65 | + android:layout_height="24dp" | |
| 66 | + android:layout_alignRight="@+id/msg_layout" | |
| 67 | + android:layout_marginRight="8dp" | |
| 68 | + android:layout_alignBottom="@+id/msg_layout" | |
| 69 | + android:src="@drawable/cnlive_flay_kiss_big" | |
| 70 | + android:layout_marginBottom="15dp"/> | |
| 71 | + | |
| 72 | + | |
| 73 | +</RelativeLayout> | |
| 0 | 74 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_view_chat_message.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_view_chat_message.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:layout_width="wrap_content" | |
| 5 | + android:layout_height="wrap_content"> | |
| 6 | + | |
| 7 | + <RelativeLayout | |
| 8 | + android:id="@+id/chat_item_layout" | |
| 9 | + android:layout_width="wrap_content" | |
| 10 | + android:layout_height="wrap_content" | |
| 11 | + android:layout_marginBottom="1dp" | |
| 12 | + android:layout_marginLeft="16dp" | |
| 13 | + android:layout_marginTop="9dp" | |
| 14 | + android:layout_marginRight="16dp"> | |
| 15 | + | |
| 16 | + <com.cnlive.libs.util.ui.emojicon.EmojiconTextView | |
| 17 | + android:id="@+id/chat_item_name" | |
| 18 | + style="@style/TextViewShadow" | |
| 19 | + android:layout_width="wrap_content" | |
| 20 | + android:layout_height="wrap_content" | |
| 21 | + android:lineSpacingExtra="0dp" | |
| 22 | + android:textColor="@color/Yellow_1" | |
| 23 | + android:textSize="15sp" | |
| 24 | + android:layout_marginTop="8dp" | |
| 25 | + android:layout_marginLeft="9dp" | |
| 26 | + android:layout_marginRight="9dp" | |
| 27 | + android:layout_marginBottom="8dp" | |
| 28 | + tools:text="Message" /> | |
| 29 | + | |
| 30 | + | |
| 31 | + </RelativeLayout> | |
| 32 | + | |
| 33 | +</RelativeLayout> | |
| 0 | 34 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnlive_view_chat_ticket.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnlive_view_chat_ticket.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:id="@+id/chat_item_bg" | |
| 5 | + android:layout_width="wrap_content" | |
| 6 | + android:layout_height="wrap_content"> | |
| 7 | + | |
| 8 | + <View | |
| 9 | + android:layout_width="match_parent" | |
| 10 | + android:layout_height="34dp" | |
| 11 | + android:layout_alignRight="@+id/msg_layout" | |
| 12 | + android:layout_marginTop="12dp" | |
| 13 | + android:layout_marginLeft="21dp" | |
| 14 | + android:background="@drawable/cnlive_chat_gift_bg" /> | |
| 15 | + | |
| 16 | + <RelativeLayout | |
| 17 | + android:id="@+id/msg_layout" | |
| 18 | + android:layout_width="wrap_content" | |
| 19 | + android:layout_height="58dp" | |
| 20 | + android:layout_alignLeft="@+id/chat_item_image" | |
| 21 | + android:layout_marginBottom="2dp" | |
| 22 | + android:layout_marginLeft="21dp" | |
| 23 | + android:paddingRight="9dp"> | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + <com.cnlive.libs.util.ui.emojicon.EmojiconTextView | |
| 29 | + android:id="@+id/chat_item_name" | |
| 30 | + android:layout_width="wrap_content" | |
| 31 | + android:layout_height="wrap_content" | |
| 32 | + android:layout_marginLeft="28dp" | |
| 33 | + android:layout_marginTop="15dp" | |
| 34 | + android:ellipsize="end" | |
| 35 | + android:maxEms="6" | |
| 36 | + android:singleLine="true" | |
| 37 | + android:textColor="#ffd500" | |
| 38 | + android:textSize="11dp" | |
| 39 | + tools:text="Nmae" /> | |
| 40 | + | |
| 41 | + | |
| 42 | + <com.cnlive.libs.util.ui.emojicon.EmojiconTextView | |
| 43 | + android:id="@+id/chat_item_message" | |
| 44 | + android:layout_width="wrap_content" | |
| 45 | + android:layout_height="wrap_content" | |
| 46 | + android:layout_alignParentBottom="true" | |
| 47 | + android:layout_marginBottom="15dp" | |
| 48 | + android:layout_marginLeft="28dp" | |
| 49 | + android:ellipsize="end" | |
| 50 | + android:singleLine="true" | |
| 51 | + android:textColor="#ffffff" | |
| 52 | + android:textSize="11dp" | |
| 53 | + tools:text="Test Message ..." /> | |
| 54 | + | |
| 55 | + <RelativeLayout | |
| 56 | + android:id="@+id/ticket_layout" | |
| 57 | + android:layout_width="wrap_content" | |
| 58 | + android:layout_height="wrap_content" | |
| 59 | + android:layout_marginLeft="8dp" | |
| 60 | + android:layout_marginTop="5dp" | |
| 61 | + android:layout_toRightOf="@+id/chat_item_name"> | |
| 62 | + | |
| 63 | + <ImageView | |
| 64 | + android:id="@+id/chat_item_ticket" | |
| 65 | + android:layout_width="28dp" | |
| 66 | + android:layout_height="14dp" | |
| 67 | + android:layout_marginRight="8dp" | |
| 68 | + android:layout_marginTop="8dp" | |
| 69 | + android:src="@drawable/cnlive_ticket" /> | |
| 70 | + <TextView | |
| 71 | + android:id="@+id/chat_item_ticket_tag" | |
| 72 | + android:layout_width="wrap_content" | |
| 73 | + android:layout_height="wrap_content" | |
| 74 | + android:layout_toRightOf="@+id/chat_item_ticket" | |
| 75 | + android:textColor="@android:color/holo_red_light" | |
| 76 | + android:textSize="22dp" | |
| 77 | + android:textStyle="bold" | |
| 78 | + tools:text="x" /> | |
| 79 | + <TextView | |
| 80 | + android:id="@+id/chat_item_ticket_count" | |
| 81 | + android:layout_width="wrap_content" | |
| 82 | + android:layout_height="wrap_content" | |
| 83 | + android:layout_toRightOf="@+id/chat_item_ticket_tag" | |
| 84 | + android:textColor="@android:color/holo_red_light" | |
| 85 | + android:textSize="23dp" | |
| 86 | + android:textStyle="bold" | |
| 87 | + tools:text="22" /> | |
| 88 | + </RelativeLayout> | |
| 89 | + </RelativeLayout> | |
| 90 | + | |
| 91 | + | |
| 92 | + <ImageView | |
| 93 | + android:id="@+id/chat_item_image" | |
| 94 | + android:layout_width="42dp" | |
| 95 | + android:layout_height="42dp" | |
| 96 | + android:layout_marginTop="8dp" | |
| 97 | + android:background="@drawable/cnlive_chat_icon_bg" | |
| 98 | + android:padding="1dp" /> | |
| 99 | + | |
| 100 | + | |
| 101 | +</RelativeLayout> | |
| 0 | 102 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnsteam_layout_with_logo.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnsteam_layout_with_logo.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + xmlns:tools="http://schemas.android.com/tools" | |
| 4 | + android:id="@+id/layout_with_logo" | |
| 5 | + android:layout_width="match_parent" | |
| 6 | + android:layout_height="match_parent" | |
| 7 | + android:background="@drawable/cnstream_start_background" | |
| 8 | + tools:context="com.wepiao.star.starlive.ui.StreamActivity"> | |
| 9 | + | |
| 10 | + <RelativeLayout | |
| 11 | + android:layout_width="match_parent" | |
| 12 | + android:layout_height="44dp"> | |
| 13 | + | |
| 14 | + <ImageView | |
| 15 | + android:id="@+id/back" | |
| 16 | + android:layout_width="40dp" | |
| 17 | + android:layout_height="40dp" | |
| 18 | + android:layout_marginLeft="3dp" | |
| 19 | + android:layout_centerVertical="true" | |
| 20 | + android:padding="12dp" | |
| 21 | + android:src="@drawable/cnstream_back" /> | |
| 22 | + </RelativeLayout> | |
| 23 | + | |
| 24 | + <ImageView | |
| 25 | + android:id="@+id/logo_top" | |
| 26 | + android:layout_width="120dp" | |
| 27 | + android:layout_height="38dp" | |
| 28 | + android:layout_centerHorizontal="true" | |
| 29 | + android:layout_marginTop="130dp" | |
| 30 | + android:background="@drawable/cnstream_logo01" /> | |
| 31 | + | |
| 32 | + <ImageView | |
| 33 | + android:id="@+id/logo_bottom" | |
| 34 | + android:layout_width="170dp" | |
| 35 | + android:layout_height="54dp" | |
| 36 | + android:layout_below="@+id/logo_top" | |
| 37 | + android:layout_centerHorizontal="true" | |
| 38 | + android:layout_marginTop="25dp" | |
| 39 | + android:background="@drawable/cnstream_logo02" /> | |
| 40 | + | |
| 41 | +</RelativeLayout> | |
| 0 | 42 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnstream_alert_dialog_layout.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnstream_alert_dialog_layout.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="wrap_content" | |
| 5 | + xmlns:tools="http://schemas.android.com/tools" | |
| 6 | + android:background="@drawable/stream_dialog_bg" | |
| 7 | + android:orientation="vertical"> | |
| 8 | + | |
| 9 | + <TextView | |
| 10 | + android:id="@+id/content" | |
| 11 | + android:layout_width="wrap_content" | |
| 12 | + android:layout_height="wrap_content" | |
| 13 | + android:layout_gravity="center_horizontal" | |
| 14 | + android:layout_marginBottom="20dp" | |
| 15 | + android:layout_marginTop="20dp" | |
| 16 | + tools:text="content" | |
| 17 | + android:layout_marginRight="10dp" | |
| 18 | + android:layout_marginLeft="10dp" | |
| 19 | + android:textColor="@color/config_black_color" | |
| 20 | + android:textSize="17sp" /> | |
| 21 | + | |
| 22 | + <View | |
| 23 | + android:layout_width="match_parent" | |
| 24 | + android:layout_height="1px" | |
| 25 | + android:layout_marginLeft="11dp" | |
| 26 | + android:layout_marginRight="11dp" | |
| 27 | + android:background="@color/gray_line_color" /> | |
| 28 | + | |
| 29 | + <LinearLayout | |
| 30 | + android:layout_width="match_parent" | |
| 31 | + android:layout_height="wrap_content" | |
| 32 | + android:orientation="horizontal"> | |
| 33 | + | |
| 34 | + <TextView | |
| 35 | + android:id="@+id/btn_left" | |
| 36 | + android:layout_width="0dp" | |
| 37 | + android:layout_height="match_parent" | |
| 38 | + android:gravity="center" | |
| 39 | + android:paddingBottom="10dp" | |
| 40 | + android:paddingTop="10dp" | |
| 41 | + tools:text="好的" | |
| 42 | + android:textColor="#157efb" | |
| 43 | + android:textSize="17sp" | |
| 44 | + android:layout_weight="1"/> | |
| 45 | + | |
| 46 | + <View | |
| 47 | + android:layout_width="1px" | |
| 48 | + android:layout_height="24dp" | |
| 49 | + android:layout_marginBottom="10dp" | |
| 50 | + android:layout_marginTop="10dp" | |
| 51 | + android:background="@color/gray_line_color"/> | |
| 52 | + | |
| 53 | + <TextView | |
| 54 | + android:id="@+id/btn_right" | |
| 55 | + android:layout_width="0dp" | |
| 56 | + android:layout_height="match_parent" | |
| 57 | + android:gravity="center" | |
| 58 | + android:paddingBottom="10dp" | |
| 59 | + android:paddingTop="10dp" | |
| 60 | + tools:text="好的" | |
| 61 | + android:textColor="#157efb" | |
| 62 | + android:textSize="17sp" | |
| 63 | + android:layout_weight="1"/> | |
| 64 | + | |
| 65 | + </LinearLayout> | |
| 66 | + | |
| 67 | +</LinearLayout> | |
| 0 | 68 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnstream_barrage_title_layout.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnstream_barrage_title_layout.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/topView" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:orientation="vertical" | |
| 7 | + android:layout_marginTop="44dp" | |
| 8 | + android:visibility="gone"> | |
| 9 | + | |
| 10 | + <include layout="@layout/cnlive_layout_player_anchor_info"/> | |
| 11 | + | |
| 12 | + <com.cnlive.libs.video.barrage.BarrageLayout | |
| 13 | + android:id="@+id/topBarrage" | |
| 14 | + android:layout_width="match_parent" | |
| 15 | + android:layout_height="wrap_content" | |
| 16 | + android:layout_below="@+id/anchorAboutLayout"/> | |
| 17 | + | |
| 18 | + <com.cnlive.libs.video.barrage.BarrageLayout | |
| 19 | + android:id="@+id/bottomBarrage" | |
| 20 | + android:layout_width="match_parent" | |
| 21 | + android:layout_height="wrap_content" | |
| 22 | + android:layout_alignParentBottom="true"/> | |
| 23 | + | |
| 24 | + <TextView | |
| 25 | + android:id="@+id/retryText" | |
| 26 | + android:layout_width="match_parent" | |
| 27 | + android:layout_height="42dp" | |
| 28 | + android:layout_alignParentBottom="true" | |
| 29 | + android:background="@color/colorRetry" | |
| 30 | + android:gravity="center_vertical" | |
| 31 | + android:paddingLeft="25dp" | |
| 32 | + android:textColor="@color/colorWhite" | |
| 33 | + android:textSize="14dp" /> | |
| 34 | +</RelativeLayout> | |
| 0 | 35 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnstream_base_activity.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnstream_base_activity.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/root" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:background="#000000"> | |
| 7 | + | |
| 8 | + <android.opengl.GLSurfaceView | |
| 9 | + android:id="@+id/camera_preview" | |
| 10 | + android:layout_width="match_parent" | |
| 11 | + android:layout_height="match_parent" | |
| 12 | + android:layout_alignParentBottom="true" | |
| 13 | + android:layout_alignParentTop="true" /> | |
| 14 | + <com.cnlive.lib_cnvideo.stream.CameraHintView | |
| 15 | + android:id="@+id/camera_hint" | |
| 16 | + android:layout_width="match_parent" | |
| 17 | + android:layout_height="match_parent" | |
| 18 | + android:layout_alignParentBottom="true" | |
| 19 | + android:layout_alignParentTop="true"/> | |
| 20 | + | |
| 21 | + <include layout="@layout/cnstream_barrage_title_layout" /> | |
| 22 | + | |
| 23 | + <include layout="@layout/cnstream_start_live" /> | |
| 24 | + | |
| 25 | + <include layout="@layout/cnstream_camera_titlebar" /> | |
| 26 | + | |
| 27 | + <include layout="@layout/cnstream_layout_record_end" /> | |
| 28 | + | |
| 29 | + <include layout="@layout/cnstream_reconnect_layout" /> | |
| 30 | + | |
| 31 | + <Button | |
| 32 | + android:id="@+id/button1" | |
| 33 | + android:layout_width="wrap_content" | |
| 34 | + android:layout_height="wrap_content" | |
| 35 | + android:layout_marginTop="350dp" | |
| 36 | + android:text="更新贡献榜列表测试" /> | |
| 37 | + | |
| 38 | + <Button | |
| 39 | + android:id="@+id/button2" | |
| 40 | + android:layout_width="wrap_content" | |
| 41 | + android:layout_height="wrap_content" | |
| 42 | + android:layout_below="@+id/button1" | |
| 43 | + android:text="更新预售票房测试" /> | |
| 44 | + | |
| 45 | + <Button | |
| 46 | + android:id="@+id/button3" | |
| 47 | + android:layout_width="wrap_content" | |
| 48 | + android:layout_height="wrap_content" | |
| 49 | + android:layout_below="@+id/button2" | |
| 50 | + android:text="更新在线人数测试" /> | |
| 51 | + | |
| 52 | +</RelativeLayout> | ... | ... |
app/src/main/res/layout/cnstream_camera_titlebar.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnstream_camera_titlebar.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/topLayout" | |
| 4 | + android:layout_width="fill_parent" | |
| 5 | + android:layout_height="44dp" | |
| 6 | + android:orientation="horizontal"> | |
| 7 | + | |
| 8 | + <ImageView | |
| 9 | + android:id="@+id/close" | |
| 10 | + android:layout_width="40dp" | |
| 11 | + android:layout_height="40dp" | |
| 12 | + android:layout_alignParentLeft="true" | |
| 13 | + android:layout_centerVertical="true" | |
| 14 | + android:layout_marginLeft="3dp" | |
| 15 | + android:padding="12dp" | |
| 16 | + android:src="@drawable/cnstream_close" /> | |
| 17 | + | |
| 18 | + <ImageView | |
| 19 | + android:id="@+id/switch_cam" | |
| 20 | + android:layout_width="40dp" | |
| 21 | + android:layout_height="40dp" | |
| 22 | + android:layout_alignParentRight="true" | |
| 23 | + android:layout_centerVertical="true" | |
| 24 | + android:layout_gravity="center_vertical" | |
| 25 | + android:layout_marginRight="9dp" | |
| 26 | + android:paddingBottom="9dp" | |
| 27 | + android:paddingLeft="5dp" | |
| 28 | + android:paddingRight="6dp" | |
| 29 | + android:paddingTop="9dp" | |
| 30 | + android:src="@drawable/cnstream_switch_camera" /> | |
| 31 | +</RelativeLayout> | |
| 0 | 32 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnstream_layout_record_end.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnstream_layout_record_end.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/streamer_end" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:background="#E6000000" | |
| 7 | + android:gravity="center_horizontal" | |
| 8 | + android:visibility="gone"> | |
| 9 | + | |
| 10 | + <RelativeLayout | |
| 11 | + android:layout_width="match_parent" | |
| 12 | + android:layout_height="44dp"> | |
| 13 | + | |
| 14 | + <ImageView | |
| 15 | + android:id="@+id/endPageClose" | |
| 16 | + android:layout_width="40dp" | |
| 17 | + android:layout_height="40dp" | |
| 18 | + android:layout_centerVertical="true" | |
| 19 | + android:layout_marginLeft="3dp" | |
| 20 | + android:padding="12dp" | |
| 21 | + android:src="@drawable/cnstream_close" /> | |
| 22 | + </RelativeLayout> | |
| 23 | + | |
| 24 | + <RelativeLayout | |
| 25 | + android:id="@+id/main_layout" | |
| 26 | + android:layout_width="match_parent" | |
| 27 | + android:layout_height="wrap_content" | |
| 28 | + android:layout_centerHorizontal="true" | |
| 29 | + android:layout_centerVertical="true"> | |
| 30 | + | |
| 31 | + <TextView | |
| 32 | + android:id="@+id/end" | |
| 33 | + android:layout_width="wrap_content" | |
| 34 | + android:layout_height="wrap_content" | |
| 35 | + android:layout_centerHorizontal="true" | |
| 36 | + android:text="直播结束" | |
| 37 | + android:textColor="#ffffff" | |
| 38 | + android:textSize="26sp" /> | |
| 39 | + | |
| 40 | + <View | |
| 41 | + android:id="@+id/line" | |
| 42 | + android:layout_width="100dp" | |
| 43 | + android:layout_height="0.5dp" | |
| 44 | + android:layout_below="@+id/end" | |
| 45 | + android:layout_centerHorizontal="true" | |
| 46 | + android:layout_marginTop="20dp" | |
| 47 | + android:background="#888888" /> | |
| 48 | + | |
| 49 | + <RelativeLayout | |
| 50 | + android:id="@+id/end_text" | |
| 51 | + android:layout_width="match_parent" | |
| 52 | + android:layout_height="wrap_content" | |
| 53 | + android:layout_below="@id/line"> | |
| 54 | + | |
| 55 | + <RelativeLayout | |
| 56 | + android:id="@+id/duration_layout" | |
| 57 | + android:layout_width="wrap_content" | |
| 58 | + android:layout_height="wrap_content" | |
| 59 | + android:layout_marginLeft="108dp" | |
| 60 | + android:layout_marginTop="60dp"> | |
| 61 | + | |
| 62 | + <ImageView | |
| 63 | + android:id="@+id/duration_img" | |
| 64 | + style="@style/LiveEndIcon" | |
| 65 | + android:src="@drawable/cnstream_duration" /> | |
| 66 | + | |
| 67 | + <TextView | |
| 68 | + android:id="@+id/duration_small_text" | |
| 69 | + style="@style/LiveEndSmallText" | |
| 70 | + android:layout_toRightOf="@+id/duration_img" | |
| 71 | + android:text="时长" /> | |
| 72 | + | |
| 73 | + | |
| 74 | + <TextView | |
| 75 | + android:id="@+id/minute" | |
| 76 | + style="@style/LiveEndBigTextText" | |
| 77 | + android:layout_marginLeft="20dp" | |
| 78 | + android:layout_toRightOf="@+id/duration_small_text" /> | |
| 79 | + | |
| 80 | + <TextView | |
| 81 | + android:id="@+id/second" | |
| 82 | + style="@style/LiveEndBigTextText" | |
| 83 | + android:layout_toRightOf="@+id/minute" /> | |
| 84 | + </RelativeLayout> | |
| 85 | + | |
| 86 | + <RelativeLayout | |
| 87 | + android:id="@+id/audience_layout" | |
| 88 | + android:layout_width="wrap_content" | |
| 89 | + android:layout_height="wrap_content" | |
| 90 | + android:layout_below="@+id/duration_layout" | |
| 91 | + android:layout_marginLeft="108dp" | |
| 92 | + android:layout_marginTop="30dp"> | |
| 93 | + | |
| 94 | + <ImageView | |
| 95 | + android:id="@+id/audience_img" | |
| 96 | + style="@style/LiveEndIcon" | |
| 97 | + android:src="@drawable/cnstream_audience" /> | |
| 98 | + | |
| 99 | + <TextView | |
| 100 | + android:id="@+id/audience_small_text" | |
| 101 | + style="@style/LiveEndSmallText" | |
| 102 | + android:layout_marginLeft="6dp" | |
| 103 | + android:layout_toRightOf="@+id/audience_img" | |
| 104 | + android:text="观众" /> | |
| 105 | + | |
| 106 | + <TextView | |
| 107 | + android:id="@+id/audience_number" | |
| 108 | + style="@style/LiveEndBigTextText" | |
| 109 | + android:layout_marginLeft="20dp" | |
| 110 | + android:layout_toRightOf="@+id/audience_small_text" /> | |
| 111 | + </RelativeLayout> | |
| 112 | + | |
| 113 | + <RelativeLayout | |
| 114 | + android:id="@+id/presell_layout" | |
| 115 | + android:layout_width="wrap_content" | |
| 116 | + android:layout_height="wrap_content" | |
| 117 | + android:layout_below="@+id/audience_layout" | |
| 118 | + android:layout_marginLeft="108dp" | |
| 119 | + android:layout_marginTop="30dp"> | |
| 120 | + | |
| 121 | + <ImageView | |
| 122 | + android:id="@+id/presell_img" | |
| 123 | + style="@style/LiveEndIcon" | |
| 124 | + android:src="@drawable/cnstream_presell" /> | |
| 125 | + | |
| 126 | + <TextView | |
| 127 | + android:id="@+id/presell_small_text" | |
| 128 | + style="@style/LiveEndSmallText" | |
| 129 | + android:layout_marginLeft="6dp" | |
| 130 | + android:layout_toRightOf="@+id/presell_img" | |
| 131 | + android:text="收到" /> | |
| 132 | + | |
| 133 | + <TextView | |
| 134 | + android:id="@+id/money" | |
| 135 | + style="@style/LiveEndBigTextText" | |
| 136 | + android:layout_marginLeft="20dp" | |
| 137 | + android:layout_toRightOf="@+id/presell_small_text" /> | |
| 138 | + </RelativeLayout> | |
| 139 | + </RelativeLayout> | |
| 140 | + | |
| 141 | + <ImageView | |
| 142 | + android:id="@+id/replayImage" | |
| 143 | + android:layout_width="55dp" | |
| 144 | + android:layout_height="55dp" | |
| 145 | + android:layout_below="@+id/end_text" | |
| 146 | + android:layout_centerHorizontal="true" | |
| 147 | + android:layout_marginTop="50dp" | |
| 148 | + android:background="@drawable/cnstream_replay" /> | |
| 149 | + | |
| 150 | + <TextView | |
| 151 | + android:layout_width="wrap_content" | |
| 152 | + android:layout_height="wrap_content" | |
| 153 | + android:layout_below="@+id/replayImage" | |
| 154 | + android:layout_centerHorizontal="true" | |
| 155 | + android:layout_marginTop="15dp" | |
| 156 | + android:text="重播" | |
| 157 | + android:textColor="#ffffff" | |
| 158 | + android:textSize="15sp" /> | |
| 159 | + | |
| 160 | + </RelativeLayout> | |
| 161 | + | |
| 162 | +</RelativeLayout> | |
| 0 | 163 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnstream_reconnect_layout.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnstream_reconnect_layout.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/streamer_reconnect" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:visibility="gone"> | |
| 7 | + | |
| 8 | + <include layout="@layout/cnsteam_layout_with_logo" /> | |
| 9 | + | |
| 10 | + | |
| 11 | + <RelativeLayout | |
| 12 | + android:layout_width="wrap_content" | |
| 13 | + android:layout_height="wrap_content" | |
| 14 | + android:layout_centerHorizontal="true" | |
| 15 | + android:layout_alignParentBottom="true" | |
| 16 | + android:layout_marginBottom="72dp"> | |
| 17 | + | |
| 18 | + <TextView | |
| 19 | + android:id="@+id/end" | |
| 20 | + android:layout_width="wrap_content" | |
| 21 | + android:layout_height="wrap_content" | |
| 22 | + android:layout_centerHorizontal="true" | |
| 23 | + android:text="抱歉,直播暂时无法连接" | |
| 24 | + android:textColor="#ffffff" | |
| 25 | + android:textSize="14sp" /> | |
| 26 | + | |
| 27 | + <TextView | |
| 28 | + android:id="@+id/retry" | |
| 29 | + android:layout_width="160dp" | |
| 30 | + android:layout_height="40dp" | |
| 31 | + android:layout_centerHorizontal="true" | |
| 32 | + android:background="@drawable/stream_start_live_text_bg" | |
| 33 | + android:gravity="center" | |
| 34 | + android:text="点击重试" | |
| 35 | + android:textColor="#ffffff" | |
| 36 | + android:layout_below="@+id/end" | |
| 37 | + android:layout_marginTop="50dp" | |
| 38 | + android:textSize="14sp" /> | |
| 39 | + </RelativeLayout> | |
| 40 | + | |
| 41 | + | |
| 42 | +</RelativeLayout> | |
| 0 | 43 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/cnstream_start_live.xml
0 → 100644
| 1 | +++ a/app/src/main/res/layout/cnstream_start_live.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:id="@+id/startLiveLayout" | |
| 4 | + android:layout_width="match_parent" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:orientation="vertical" | |
| 7 | + android:background="#7f000000"> | |
| 8 | + | |
| 9 | + <TextView | |
| 10 | + android:id="@+id/start_live" | |
| 11 | + android:layout_width="260dp" | |
| 12 | + android:layout_height="45dp" | |
| 13 | + android:text="开始直播" | |
| 14 | + android:layout_centerInParent="true" | |
| 15 | + android:gravity="center" | |
| 16 | + android:textColor="@android:color/white" | |
| 17 | + android:textSize="15sp" | |
| 18 | + android:background="@drawable/stream_start_live_text_bg"/> | |
| 19 | +</RelativeLayout> | |
| 0 | 20 | \ No newline at end of file | ... | ... |
app/src/main/res/mipmap-hdpi/ic_launcher.png
0 → 100644
3.34 KB
app/src/main/res/mipmap-mdpi/ic_launcher.png
0 → 100644
2.15 KB
app/src/main/res/mipmap-xhdpi/ic_launcher.png
0 → 100644
4.73 KB
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
0 → 100644
7.54 KB
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
0 → 100644
10.2 KB
app/src/main/res/values-w820dp/dimens.xml
0 → 100644
| 1 | +++ a/app/src/main/res/values-w820dp/dimens.xml | |
| 1 | +<resources> | |
| 2 | + <!-- Example customization of dimensions originally defined in res/values/dimens.xml | |
| 3 | + (such as screen margins) for screens with more than 820dp of available width. This | |
| 4 | + would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> | |
| 5 | + <dimen name="activity_horizontal_margin">64dp</dimen> | |
| 6 | +</resources> | ... | ... |
app/src/main/res/values/cnstream.xml
0 → 100644
| 1 | +++ a/app/src/main/res/values/cnstream.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<resources> | |
| 3 | + <color name="config_black_color">#323333</color> | |
| 4 | + <color name="config_gray_color">#969797</color> | |
| 5 | + <color name="gray_line_color">#dcdcdc</color> | |
| 6 | + | |
| 7 | + <style name="LiveEndIcon"> | |
| 8 | + <item name="android:layout_width">15dp</item> | |
| 9 | + <item name="android:layout_height">15dp</item> | |
| 10 | + <item name="android:layout_centerVertical">true</item> | |
| 11 | + </style> | |
| 12 | + | |
| 13 | + <style name="LiveEndSmallText"> | |
| 14 | + <item name="android:layout_width">wrap_content</item> | |
| 15 | + <item name="android:layout_height">wrap_content</item> | |
| 16 | + <item name="android:textSize">13sp</item> | |
| 17 | + <item name="android:textColor">#999999</item> | |
| 18 | + <item name="android:layout_marginLeft">6dp</item> | |
| 19 | + <item name="android:layout_gravity">center_vertical</item> | |
| 20 | + <item name="android:layout_centerVertical">true</item> | |
| 21 | + <item name="android:gravity">center</item> | |
| 22 | + </style> | |
| 23 | + | |
| 24 | + <style name="LiveEndBigTextNumber"> | |
| 25 | + <item name="android:layout_width">wrap_content</item> | |
| 26 | + <item name="android:layout_height">wrap_content</item> | |
| 27 | + <item name="android:textSize">23sp</item> | |
| 28 | + <item name="android:textColor">#ffd500</item> | |
| 29 | + <item name="android:layout_gravity">center_vertical</item> | |
| 30 | + <item name="android:gravity">center</item> | |
| 31 | + <item name="android:layout_centerVertical">true</item> | |
| 32 | + </style> | |
| 33 | + | |
| 34 | + <style name="LiveEndBigTextText"> | |
| 35 | + <item name="android:layout_width">wrap_content</item> | |
| 36 | + <item name="android:layout_height">wrap_content</item> | |
| 37 | + <item name="android:textSize">19sp</item> | |
| 38 | + <item name="android:textColor">#999999</item> | |
| 39 | + <item name="android:layout_gravity">center_vertical</item> | |
| 40 | + <item name="android:gravity">center</item> | |
| 41 | + <item name="android:layout_centerVertical">true</item> | |
| 42 | + </style> | |
| 43 | +</resources> | |
| 0 | 44 | \ No newline at end of file | ... | ... |
app/src/main/res/values/cnvideo.xml
0 → 100644
| 1 | +++ a/app/src/main/res/values/cnvideo.xml | |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<resources> | |
| 3 | + <color name="Gray_1">#9e9e9e</color> | |
| 4 | + <color name="Gray_2">#9e9e9e</color> | |
| 5 | + <color name="Yellow_1">#ffd500</color> | |
| 6 | + <color name="colorWhite">#ffffff</color> | |
| 7 | + <color name="colorRetry">#ff2b2b2b</color> | |
| 8 | + <color name="colorChatItem">#33ffffff</color> | |
| 9 | + <color name="colorTransparent">#00ffffff</color> | |
| 10 | + <color name="anchor_black_bg"> #66000000</color> | |
| 11 | + | |
| 12 | + <string name="cnlive_loading_player_alert">正在读取视频 %s,请稍等...</string> | |
| 13 | + <string name="cnlive_loading_connect_alert">正在连接...</string> | |
| 14 | + <string name="cnlive_error_net_retry">网络中断,点击重试</string> | |
| 15 | + <string name="cnlive_error_authenticate_retry">鉴权失败,点击重试</string> | |
| 16 | + <string name="cnlive_error_load_retry">加载失败,点击重试</string> | |
| 17 | + <string name="cnlive_error_play_retry">播放失败,点击重试</string> | |
| 18 | + <string name="str_chat_connect_error">聊天室无法连接 点击重试</string> | |
| 19 | + | |
| 20 | + <string name="str_chat_connect">正在连接聊天室...</string> | |
| 21 | + <string name="str_chat_connect_fail">连接聊天室失败,点击重试</string> | |
| 22 | + <string name="str_chat_connect_close">聊天室已断开,请检查网络</string> | |
| 23 | + | |
| 24 | + <string name="str_load_page">正在加载页面数据...</string> | |
| 25 | + <string name="str_load_fail">页面数据加载失败,点击重试</string> | |
| 26 | + | |
| 27 | + <string name="str_danmu_open">已开启弹幕</string> | |
| 28 | + <string name="str_danmu_close">已关闭弹幕</string> | |
| 29 | + | |
| 30 | + <string name="cnlive_error_send_net">信息发送失败,请检查网络</string> | |
| 31 | + <string name="cnlive_error_send_null">信息发送失败,并没有输入信息</string> | |
| 32 | + <string name="cnlive_error_send_other">信息发送失败</string> | |
| 33 | + <string name="cnlive_error_pagedata_net">页面数据加载失败,请检查网络</string> | |
| 34 | + <string name="cnlive_error_pagedata_other">页面数据加载失败</string> | |
| 35 | + <string name="cnlive_error_chat_connect">聊天室连接失败</string> | |
| 36 | + <string name="cnlive_error_chat_close">聊天室连接断开</string> | |
| 37 | + <string name="cnlive_error_player_net">播放失败,请检查网络</string> | |
| 38 | + | |
| 39 | + <string name="cnlive_error_player_ugc_connect">抱歉,视频暂时无法连接</string> | |
| 40 | + <string name="cnlive_error_player_ugc_retry">点击重试</string> | |
| 41 | + | |
| 42 | + <style name="TextViewShadow"> | |
| 43 | + <item name="android:shadowColor">#59000000</item> | |
| 44 | + <item name="android:shadowDx">3</item> | |
| 45 | + <item name="android:shadowDy">3</item> | |
| 46 | + <item name="android:shadowRadius">1</item> | |
| 47 | + </style> | |
| 48 | + | |
| 49 | + <style name="CustomDialogStyle" parent="@android:style/Theme.Dialog"> | |
| 50 | + <item name="android:windowFrame">@null</item> | |
| 51 | + <item name="android:windowIsFloating">true</item> | |
| 52 | + <item name="android:windowIsTranslucent">true</item> | |
| 53 | + <item name="android:windowNoTitle">true</item> | |
| 54 | + <item name="android:background">@android:color/transparent</item> | |
| 55 | + <item name="android:windowBackground">@android:color/transparent</item> | |
| 56 | + <item name="android:backgroundDimEnabled">true</item> | |
| 57 | + <item name="android:backgroundDimAmount">0.6</item> | |
| 58 | + <item name="android:windowCloseOnTouchOutside">true</item> | |
| 59 | + </style> | |
| 60 | +</resources> | |
| 0 | 61 | \ No newline at end of file | ... | ... |
app/src/main/res/values/colors.xml
0 → 100644
app/src/main/res/values/dimens.xml
0 → 100644
app/src/main/res/values/ids.xml
0 → 100644
app/src/main/res/values/strings.xml
0 → 100644
app/src/main/res/values/styles.xml
0 → 100644
| 1 | +++ a/app/src/main/res/values/styles.xml | |
| 1 | +<resources> | |
| 2 | + | |
| 3 | + <!-- Base application theme. --> | |
| 4 | + <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
| 5 | + <!-- Customize your theme here. --> | |
| 6 | + <item name="colorPrimary">@color/colorPrimary</item> | |
| 7 | + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
| 8 | + <item name="colorAccent">@color/colorAccent</item> | |
| 9 | + </style> | |
| 10 | +</resources> | ... | ... |
build.gradle
0 → 100644
| 1 | +++ a/build.gradle | |
| 1 | +// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
| 2 | + | |
| 3 | +buildscript { | |
| 4 | + repositories { | |
| 5 | + jcenter() | |
| 6 | + } | |
| 7 | + dependencies { | |
| 8 | + classpath 'com.android.tools.build:gradle:2.2.2' | |
| 9 | + | |
| 10 | + // NOTE: Do not place your application dependencies here; they belong | |
| 11 | + // in the individual module build.gradle files | |
| 12 | + } | |
| 13 | +} | |
| 14 | + | |
| 15 | +allprojects { | |
| 16 | + repositories { | |
| 17 | + jcenter() | |
| 18 | + } | |
| 19 | +} | |
| 20 | + | |
| 21 | +task clean(type: Delete) { | |
| 22 | + delete rootProject.buildDir | |
| 23 | +} | ... | ... |
doc/微票二期 说明文档.pdf
0 → 100644
No preview for this file type
gradle.properties
0 → 100644
| 1 | +++ a/gradle.properties | |
| 1 | +# Project-wide Gradle settings. | |
| 2 | + | |
| 3 | +# IDE (e.g. Android Studio) users: | |
| 4 | +# Gradle settings configured through the IDE *will override* | |
| 5 | +# any settings specified in this file. | |
| 6 | + | |
| 7 | +# For more details on how to configure your build environment visit | |
| 8 | +# http://www.gradle.org/docs/current/userguide/build_environment.html | |
| 9 | + | |
| 10 | +# Specifies the JVM arguments used for the daemon process. | |
| 11 | +# The setting is particularly useful for tweaking memory settings. | |
| 12 | +org.gradle.jvmargs=-Xmx1536m | |
| 13 | + | |
| 14 | +# When configured, Gradle will run in incubating parallel mode. | |
| 15 | +# This option should only be used with decoupled projects. More details, visit | |
| 16 | +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | |
| 17 | +# org.gradle.parallel=true | ... | ... |
gradle/wrapper/gradle-wrapper.jar
0 → 100644
No preview for this file type
gradle/wrapper/gradle-wrapper.properties
0 → 100644
| 1 | +++ a/gradle/wrapper/gradle-wrapper.properties | |
| 1 | +#Mon Dec 28 10:00:20 PST 2015 | |
| 2 | +distributionBase=GRADLE_USER_HOME | |
| 3 | +distributionPath=wrapper/dists | |
| 4 | +zipStoreBase=GRADLE_USER_HOME | |
| 5 | +zipStorePath=wrapper/dists | |
| 6 | +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip | ... | ... |
gradlew
0 → 100644
| 1 | +++ a/gradlew | |
| 1 | +#!/usr/bin/env bash | |
| 2 | + | |
| 3 | +############################################################################## | |
| 4 | +## | |
| 5 | +## Gradle start up script for UN*X | |
| 6 | +## | |
| 7 | +############################################################################## | |
| 8 | + | |
| 9 | +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | |
| 10 | +DEFAULT_JVM_OPTS="" | |
| 11 | + | |
| 12 | +APP_NAME="Gradle" | |
| 13 | +APP_BASE_NAME=`basename "$0"` | |
| 14 | + | |
| 15 | +# Use the maximum available, or set MAX_FD != -1 to use that value. | |
| 16 | +MAX_FD="maximum" | |
| 17 | + | |
| 18 | +warn ( ) { | |
| 19 | + echo "$*" | |
| 20 | +} | |
| 21 | + | |
| 22 | +die ( ) { | |
| 23 | + echo | |
| 24 | + echo "$*" | |
| 25 | + echo | |
| 26 | + exit 1 | |
| 27 | +} | |
| 28 | + | |
| 29 | +# OS specific support (must be 'true' or 'false'). | |
| 30 | +cygwin=false | |
| 31 | +msys=false | |
| 32 | +darwin=false | |
| 33 | +case "`uname`" in | |
| 34 | + CYGWIN* ) | |
| 35 | + cygwin=true | |
| 36 | + ;; | |
| 37 | + Darwin* ) | |
| 38 | + darwin=true | |
| 39 | + ;; | |
| 40 | + MINGW* ) | |
| 41 | + msys=true | |
| 42 | + ;; | |
| 43 | +esac | |
| 44 | + | |
| 45 | +# Attempt to set APP_HOME | |
| 46 | +# Resolve links: $0 may be a link | |
| 47 | +PRG="$0" | |
| 48 | +# Need this for relative symlinks. | |
| 49 | +while [ -h "$PRG" ] ; do | |
| 50 | + ls=`ls -ld "$PRG"` | |
| 51 | + link=`expr "$ls" : '.*-> \(.*\)$'` | |
| 52 | + if expr "$link" : '/.*' > /dev/null; then | |
| 53 | + PRG="$link" | |
| 54 | + else | |
| 55 | + PRG=`dirname "$PRG"`"/$link" | |
| 56 | + fi | |
| 57 | +done | |
| 58 | +SAVED="`pwd`" | |
| 59 | +cd "`dirname \"$PRG\"`/" >/dev/null | |
| 60 | +APP_HOME="`pwd -P`" | |
| 61 | +cd "$SAVED" >/dev/null | |
| 62 | + | |
| 63 | +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar | |
| 64 | + | |
| 65 | +# Determine the Java command to use to start the JVM. | |
| 66 | +if [ -n "$JAVA_HOME" ] ; then | |
| 67 | + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then | |
| 68 | + # IBM's JDK on AIX uses strange locations for the executables | |
| 69 | + JAVACMD="$JAVA_HOME/jre/sh/java" | |
| 70 | + else | |
| 71 | + JAVACMD="$JAVA_HOME/bin/java" | |
| 72 | + fi | |
| 73 | + if [ ! -x "$JAVACMD" ] ; then | |
| 74 | + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME | |
| 75 | + | |
| 76 | +Please set the JAVA_HOME variable in your environment to match the | |
| 77 | +location of your Java installation." | |
| 78 | + fi | |
| 79 | +else | |
| 80 | + JAVACMD="java" | |
| 81 | + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | |
| 82 | + | |
| 83 | +Please set the JAVA_HOME variable in your environment to match the | |
| 84 | +location of your Java installation." | |
| 85 | +fi | |
| 86 | + | |
| 87 | +# Increase the maximum file descriptors if we can. | |
| 88 | +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then | |
| 89 | + MAX_FD_LIMIT=`ulimit -H -n` | |
| 90 | + if [ $? -eq 0 ] ; then | |
| 91 | + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then | |
| 92 | + MAX_FD="$MAX_FD_LIMIT" | |
| 93 | + fi | |
| 94 | + ulimit -n $MAX_FD | |
| 95 | + if [ $? -ne 0 ] ; then | |
| 96 | + warn "Could not set maximum file descriptor limit: $MAX_FD" | |
| 97 | + fi | |
| 98 | + else | |
| 99 | + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" | |
| 100 | + fi | |
| 101 | +fi | |
| 102 | + | |
| 103 | +# For Darwin, add options to specify how the application appears in the dock | |
| 104 | +if $darwin; then | |
| 105 | + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" | |
| 106 | +fi | |
| 107 | + | |
| 108 | +# For Cygwin, switch paths to Windows format before running java | |
| 109 | +if $cygwin ; then | |
| 110 | + APP_HOME=`cygpath --path --mixed "$APP_HOME"` | |
| 111 | + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` | |
| 112 | + JAVACMD=`cygpath --unix "$JAVACMD"` | |
| 113 | + | |
| 114 | + # We build the pattern for arguments to be converted via cygpath | |
| 115 | + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` | |
| 116 | + SEP="" | |
| 117 | + for dir in $ROOTDIRSRAW ; do | |
| 118 | + ROOTDIRS="$ROOTDIRS$SEP$dir" | |
| 119 | + SEP="|" | |
| 120 | + done | |
| 121 | + OURCYGPATTERN="(^($ROOTDIRS))" | |
| 122 | + # Add a user-defined pattern to the cygpath arguments | |
| 123 | + if [ "$GRADLE_CYGPATTERN" != "" ] ; then | |
| 124 | + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" | |
| 125 | + fi | |
| 126 | + # Now convert the arguments - kludge to limit ourselves to /bin/sh | |
| 127 | + i=0 | |
| 128 | + for arg in "$@" ; do | |
| 129 | + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` | |
| 130 | + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option | |
| 131 | + | |
| 132 | + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition | |
| 133 | + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` | |
| 134 | + else | |
| 135 | + eval `echo args$i`="\"$arg\"" | |
| 136 | + fi | |
| 137 | + i=$((i+1)) | |
| 138 | + done | |
| 139 | + case $i in | |
| 140 | + (0) set -- ;; | |
| 141 | + (1) set -- "$args0" ;; | |
| 142 | + (2) set -- "$args0" "$args1" ;; | |
| 143 | + (3) set -- "$args0" "$args1" "$args2" ;; | |
| 144 | + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; | |
| 145 | + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; | |
| 146 | + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; | |
| 147 | + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; | |
| 148 | + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; | |
| 149 | + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; | |
| 150 | + esac | |
| 151 | +fi | |
| 152 | + | |
| 153 | +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules | |
| 154 | +function splitJvmOpts() { | |
| 155 | + JVM_OPTS=("$@") | |
| 156 | +} | |
| 157 | +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS | |
| 158 | +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" | |
| 159 | + | |
| 160 | +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" | ... | ... |
gradlew.bat
0 → 100644
| 1 | +++ a/gradlew.bat | |
| 1 | +@if "%DEBUG%" == "" @echo off | |
| 2 | +@rem ########################################################################## | |
| 3 | +@rem | |
| 4 | +@rem Gradle startup script for Windows | |
| 5 | +@rem | |
| 6 | +@rem ########################################################################## | |
| 7 | + | |
| 8 | +@rem Set local scope for the variables with windows NT shell | |
| 9 | +if "%OS%"=="Windows_NT" setlocal | |
| 10 | + | |
| 11 | +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | |
| 12 | +set DEFAULT_JVM_OPTS= | |
| 13 | + | |
| 14 | +set DIRNAME=%~dp0 | |
| 15 | +if "%DIRNAME%" == "" set DIRNAME=. | |
| 16 | +set APP_BASE_NAME=%~n0 | |
| 17 | +set APP_HOME=%DIRNAME% | |
| 18 | + | |
| 19 | +@rem Find java.exe | |
| 20 | +if defined JAVA_HOME goto findJavaFromJavaHome | |
| 21 | + | |
| 22 | +set JAVA_EXE=java.exe | |
| 23 | +%JAVA_EXE% -version >NUL 2>&1 | |
| 24 | +if "%ERRORLEVEL%" == "0" goto init | |
| 25 | + | |
| 26 | +echo. | |
| 27 | +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | |
| 28 | +echo. | |
| 29 | +echo Please set the JAVA_HOME variable in your environment to match the | |
| 30 | +echo location of your Java installation. | |
| 31 | + | |
| 32 | +goto fail | |
| 33 | + | |
| 34 | +:findJavaFromJavaHome | |
| 35 | +set JAVA_HOME=%JAVA_HOME:"=% | |
| 36 | +set JAVA_EXE=%JAVA_HOME%/bin/java.exe | |
| 37 | + | |
| 38 | +if exist "%JAVA_EXE%" goto init | |
| 39 | + | |
| 40 | +echo. | |
| 41 | +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | |
| 42 | +echo. | |
| 43 | +echo Please set the JAVA_HOME variable in your environment to match the | |
| 44 | +echo location of your Java installation. | |
| 45 | + | |
| 46 | +goto fail | |
| 47 | + | |
| 48 | +:init | |
| 49 | +@rem Get command-line arguments, handling Windowz variants | |
| 50 | + | |
| 51 | +if not "%OS%" == "Windows_NT" goto win9xME_args | |
| 52 | +if "%@eval[2+2]" == "4" goto 4NT_args | |
| 53 | + | |
| 54 | +:win9xME_args | |
| 55 | +@rem Slurp the command line arguments. | |
| 56 | +set CMD_LINE_ARGS= | |
| 57 | +set _SKIP=2 | |
| 58 | + | |
| 59 | +:win9xME_args_slurp | |
| 60 | +if "x%~1" == "x" goto execute | |
| 61 | + | |
| 62 | +set CMD_LINE_ARGS=%* | |
| 63 | +goto execute | |
| 64 | + | |
| 65 | +:4NT_args | |
| 66 | +@rem Get arguments from the 4NT Shell from JP Software | |
| 67 | +set CMD_LINE_ARGS=%$ | |
| 68 | + | |
| 69 | +:execute | |
| 70 | +@rem Setup the command line | |
| 71 | + | |
| 72 | +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | |
| 73 | + | |
| 74 | +@rem Execute Gradle | |
| 75 | +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | |
| 76 | + | |
| 77 | +:end | |
| 78 | +@rem End local scope for the variables with windows NT shell | |
| 79 | +if "%ERRORLEVEL%"=="0" goto mainEnd | |
| 80 | + | |
| 81 | +:fail | |
| 82 | +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | |
| 83 | +rem the _cmd.exe /c_ return code! | |
| 84 | +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | |
| 85 | +exit /b 1 | |
| 86 | + | |
| 87 | +:mainEnd | |
| 88 | +if "%OS%"=="Windows_NT" endlocal | |
| 89 | + | |
| 90 | +:omega | ... | ... |
lib/cnvideo_2.0.jar
0 → 100644
No preview for this file type
settings.gradle
0 → 100644