huangxinbao

add drop resource

正在显示 100 个修改的文件 包含 1277 行增加292 行删除

要显示太多修改。

为保证性能只显示 100 of 100+ 个文件。

... ... @@ -16,7 +16,10 @@ android {
}
buildTypes {
release {
//是否混淆
minifyEnabled false
zipAlignEnabled true
// shrinkResources true//去除无用的resource文件,第一次使用
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
... ... @@ -32,7 +35,6 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':xdy')
compile files('libs/pldroid-player-1.5.1.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.jakewharton:butterknife:8.5.1'
... ... @@ -43,15 +45,16 @@ dependencies {
compile 'org.kymjs.kjframe:kjframe:2.6'
compile 'io.reactivex:rxjava:1.0.9'
compile 'io.reactivex:rxandroid:0.24.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
// compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'me.yokeyword:fragmentation:0.10.3'
compile 'com.qiniu:happy-dns:0.2.+'
compile 'com.android.support:support-v4:25.3.1'
// compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.qiniu:happy-dns:0.2.+'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
compile project(':iOS_Dialog_Library')
compile project(':xdy')
}
... ...
... ... @@ -15,3 +15,10 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keep class com.eventhandle.**{*;}
-keep class com.ntjbase.**{*;}
-keep class com.videoengine.**{*;}
-keep class com.voiceengine.**{*;}
-keep class com.mang.xdy.**{*;}
\ No newline at end of file
... ...
package com.mang.xdy.demo;
package com.mang.xuedianyun.android;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
... ...
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mang.xdy.demo">
package="com.mang.xuedianyun.android">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
... ... @@ -36,13 +36,13 @@
<application
android:name=".application.XdyApplicaiton"
android:name="com.mang.xuedianyun.android.application.XdyApplicaiton"
android:allowBackup="true"
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
<activity android:name="com.mang.xuedianyun.android.MainActivity"
android:windowSoftInputMode="adjustPan|stateHidden"
android:screenOrientation="portrait">
<intent-filter>
... ... @@ -51,10 +51,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.VideoPlayActivity"
<activity android:name="com.mang.xuedianyun.android.activity.VideoPlayActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden"
>
</activity>
</application>
... ...
package com.mang.xdy.demo;
package com.mang.xuedianyun.android;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
... ... @@ -13,9 +11,9 @@ import android.widget.RelativeLayout;
import com.google.gson.Gson;
import com.mang.xdy.demo.activity.VideoPlayActivity;
import com.mang.xdy.demo.bean.JoinClassBean;
import com.mang.xdy.demo.utils.ToastUtil;
import com.mang.xuedianyun.android.activity.VideoPlayActivity;
import com.mang.xuedianyun.android.bean.JoinClassBean;
import com.mang.xuedianyun.android.utils.ToastUtil;
import java.util.ArrayList;
... ...
package com.mang.xdy.demo.activity;
package com.mang.xuedianyun.android.activity;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.design.widget.TabLayout;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.PermissionChecker;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.util.DisplayMetrics;
... ... @@ -29,6 +34,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;
import com.flyco.tablayout.SlidingTabLayout;
import com.flyco.tablayout.listener.OnTabSelectListener;
... ... @@ -37,21 +43,21 @@ import com.mang.xdy.bean.VideoPlayBean;
import com.mang.xdy.cache.ACache;
import com.mang.xdy.common.Constants;
import com.mang.xdy.core.XdySdk;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.adapter.SimpleFragmentPagerAdapter;
import com.mang.xdy.demo.bean.ErrorEntity;
import com.mang.xdy.demo.bean.InitClassSuccessEntity;
import com.mang.xdy.demo.bean.JoinClass;
import com.mang.xdy.demo.bean.ProcessVideoOrAudioByTeacherEntity;
import com.mang.xdy.demo.bean.ResponseEntity;
import com.mang.xdy.demo.bean.TimeEntity;
import com.mang.xdy.demo.bean.VideoOrAudioStopEntity;
import com.mang.xdy.demo.fragment.ChatFragment;
import com.mang.xdy.demo.fragment.DocFragment;
import com.mang.xdy.demo.utils.JsonUtil;
import com.mang.xdy.demo.utils.ToastUtil;
import com.mang.xdy.demo.widget.dialog.LoginDialog;
import com.mang.xdy.demo.widget.view.NoScrollViewPager;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.adapter.SimpleFragmentPagerAdapter;
import com.mang.xuedianyun.android.bean.ErrorEntity;
import com.mang.xuedianyun.android.bean.InitClassSuccessEntity;
import com.mang.xuedianyun.android.bean.JoinClass;
import com.mang.xuedianyun.android.bean.ProcessVideoOrAudioByTeacherEntity;
import com.mang.xuedianyun.android.bean.ResponseEntity;
import com.mang.xuedianyun.android.bean.TimeEntity;
import com.mang.xuedianyun.android.bean.VideoOrAudioStopEntity;
import com.mang.xuedianyun.android.fragment.ChatFragment;
import com.mang.xuedianyun.android.fragment.DocFragment;
import com.mang.xuedianyun.android.utils.JsonUtil;
import com.mang.xuedianyun.android.utils.ToastUtil;
import com.mang.xuedianyun.android.widget.dialog.LoginDialog;
import com.mang.xuedianyun.android.widget.view.NoScrollViewPager;
import com.mang.xdy.listener.ObserverListener;
import com.mang.xdy.utils.SPUtil;
import com.mang.xdy.utils.UIUtils;
... ... @@ -68,13 +74,14 @@ import org.greenrobot.eventbus.ThreadMode;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Locale;
import butterknife.BindView;
import butterknife.ButterKnife;
import zhangphil.iosdialog.widget.ActionSheetDialog;
import com.mang.xdy.demo.widget.dialog.AnswerSheetDialog;
import com.mang.xuedianyun.android.widget.dialog.AnswerSheetDialog;
import static com.pili.pldroid.player.AVOptions.KEY_DELAY_OPTIMIZATION;
... ... @@ -88,8 +95,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
FrameLayout fra_videoPlay_start;
@BindView(R.id.viewpager)
NoScrollViewPager viewPager;
// @BindView(R.id.fra_videoPlay_answer)
// FrameLayout fraVideoPlayAnswer;
private TabLayout tabLayout;
@BindView(R.id.surfaceview_playVideo)
SurfaceView surfaceviewPlayVideo;
... ... @@ -99,6 +105,8 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
SurfaceView surfaceView_publish;
@BindView(R.id.img_playVideo_replay)
PLVideoTextureView mVideoView;
@BindView(R.id.img_playVideo_pushreplay)
PLVideoTextureView mPushVideoView;
@BindView(R.id.img_videoPlay_back)
ImageView mImage_Back;
@BindView(R.id.tv_videoPlay_className)
... ... @@ -107,6 +115,8 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
SlidingTabLayout mSlidingTab;
@BindView(R.id.img_playVideo_publishAudio)
ImageView mIamgeView_PublishAudio;
@BindView(R.id.ll_videoPlay_back)
LinearLayout mLinearLayoutBack;
// @BindView(R.id.asv_videoPlay_answer)
// AnswerSheetView mAnswerSheetView;
private String username = "";
... ... @@ -133,13 +143,14 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
private String className;
/*课堂类型*/
private int classType = 2;
private String[] titles;
private long loging_upload=0;
private LinearLayout llVideo_table_chat;
private final int CAMERA_REQUEST_CODE = 1;
// private Fragment mFragment_Tablet_Chat;
private Handler mmHandler = new Handler() {
... ... @@ -169,7 +180,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
String userJson = responseEntity.getParam();
SPUtil.putString(VideoPlayActivity.this, Constants.CLASS_JOIN_SUCCESS, userJson);
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject(userJson);
seek = jsonObject.optLong("recordPlaybackMaxTime");
... ... @@ -274,6 +284,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
if (!replay) {
mVideoView.setVisibility(View.GONE);
mMediaContainer.setVisibility(View.GONE);
// mPushVideoView.setVisibility(View.GONE);
// mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
} else {
surfaceviewPlayVideo.setVisibility(View.GONE);
... ... @@ -303,35 +314,16 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
}else {
showSelectPublishMode();
}
// AnswerSheetDialog answerSheetDialog= new AnswerSheetDialog(VideoPlayActivity.this);
// answerSheetDialog.builder().show();
// new AnswerSheetDialog(VideoPlayActivity.this).builder().show();
// new AnswText(VideoPlayActivity.this).builder().show();
// new AnswerSheetDialog(VideoPlayActivity.this).builder().show();
// mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
// fra_videoPlay_start.setVisibility(View.GONE);
// surfaceView_publish.setVisibility(View.VISIBLE);
// fra_videoPlay_start.setEnabled(false);
// mFramenLayout_stopPublish.setEnabled(true);
// sh = surfaceView_publish.getHolder();
// sh.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
// surfaceView_publish.setZOrderMediaOverlay(true);
// xdySdk.api("publishVideo", "", surfaceView_publish, VideoPlayActivity.this);
// isPlayVideoMode=true;
}
});
mImage_Back.setOnClickListener(new View.OnClickListener() {
mLinearLayoutBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
exit_dialog();
}
});
//TODO
// getWindow().setFormat(PixelFormat.TRANSLUCENT);
// mAnswerSheetView.selectAnswerSheetType(AnswerSheetView.ANSWER_TYPE_SINGLE_OR_MORE);
// mAnswerSheetView.startCountTimerAndResizeLayout(22);
}
// public void setTablayout() {
... ... @@ -355,17 +347,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
@Override
public void onClick(int which) {
//填写事件
// coverStudent(true);
// mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
// fra_videoPlay_start.setVisibility(View.GONE);
// surfaceView_publish.setVisibility(View.VISIBLE);
// fra_videoPlay_start.setEnabled(false);
// mFramenLayout_stopPublish.setEnabled(true);
// sh = surfaceView_publish.getHolder();
// sh.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
// surfaceView_publish.setZOrderMediaOverlay(true);
// xdySdk.api("publishVideo", "", surfaceView_publish, VideoPlayActivity.this);
// isPublsishVideoMode = true;
publishVideo();
}
})
... ... @@ -374,15 +355,6 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
@Override
public void onClick(int which) {
//填写事件
// coverStudent(true);
// mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
// fra_videoPlay_start.setVisibility(View.GONE);
// surfaceView_publish.setVisibility(View.GONE);
// mIamgeView_PublishAudio.setVisibility(View.VISIBLE);
// fra_videoPlay_start.setEnabled(false);
// mFramenLayout_stopPublish.setEnabled(true);
// xdySdk.api(Constants.PUBLISH_AUDIO, "", null, VideoPlayActivity.this);
// isPublsishVideoMode = false;
publishAudio();
}
})
... ... @@ -402,22 +374,22 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
}
})
.addSheetItem("对错选择", ActionSheetDialog.SheetItemColor.Blue
, new ActionSheetDialog.OnSheetItemClickListener() {
@Override
public void onClick(int which) {
//填写事件
// mAnswerSheetView.selectAnswerSheetType(AnswerSheetView.ANSWER_TYPE_RIGHT_OR_WRONG);
// mAnswerSheetView.startCountTimerAndResizeLayout(15);
// setAnswerSheetLayout_Nornal(53);
AnswerSheetDialog answerSheetDialog= new AnswerSheetDialog(VideoPlayActivity.this);
answerSheetDialog.builder().show();
answerSheetDialog.selectAnswerSheetType(2);
answerSheetDialog.startCountTimerAndResizeLayout(30,60);
}
})
// .addSheetItem("对错选择", ActionSheetDialog.SheetItemColor.Blue
// , new ActionSheetDialog.OnSheetItemClickListener() {
// @Override
// public void onClick(int which) {
// //填写事件
//// mAnswerSheetView.selectAnswerSheetType(AnswerSheetView.ANSWER_TYPE_RIGHT_OR_WRONG);
//// mAnswerSheetView.startCountTimerAndResizeLayout(15);
//// setAnswerSheetLayout_Nornal(53);
//
// AnswerSheetDialog answerSheetDialog= new AnswerSheetDialog(VideoPlayActivity.this);
// answerSheetDialog.builder().show();
// answerSheetDialog.selectAnswerSheetType(2);
// answerSheetDialog.startCountTimerAndResizeLayout(30,60);
//
// }
// })
// .addSheetItem("填空题", ActionSheetDialog.SheetItemColor.Blue
// , new ActionSheetDialog.OnSheetItemClickListener() {
// @Override
... ... @@ -529,12 +501,12 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
// progressDialogDismiss();
if (replay) {
playRecord(response);
playRecord(response,false);
} else {
if (!checkPermission()) {
return;
}
// if (!checkPermission()) {
// return;
// }
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
... ... @@ -584,13 +556,11 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
public void playAudio(String response) {
if (replay) {
playRecord(response);
img_playVideo_novideo.setImageResource(R.mipmap.audio_mode);
img_playVideo_novideo.setVisibility(View.VISIBLE);
playRecord(response,true);
// img_playVideo_novideo.setImageResource(R.mipmap.audio_mode);
// img_playVideo_novideo.setVisibility(View.VISIBLE);
} else {
if (!checkPermission()) {
return;
}
xdySdk.api("playAudio", response, null, VideoPlayActivity.this);
img_playVideo_novideo.setImageResource(R.mipmap.audio_mode);
img_playVideo_novideo.setVisibility(View.VISIBLE);
... ... @@ -768,6 +738,9 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
if (mVideoView != null) {
mVideoView.stopPlayback();
}
if(mPushVideoView!=null){
mPushVideoView.stopPlayback();
}
UIUtils.closeDialog(mLoginDialog);
if (!replay) {
xdySdk.removeAll();
... ... @@ -821,7 +794,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
VideoOrAudioStopEntity entity = JsonUtil.parseJsonToBean(response, VideoOrAudioStopEntity.class);
if (entity != null) {
if (xdySdk.onPlayStop(entity.getMediaId() + "")) {
img_playVideo_novideo.setImageResource(R.mipmap.novideo);
img_playVideo_novideo.setImageResource(R.mipmap.no_video);
img_playVideo_novideo.setVisibility(View.VISIBLE);
}
}
... ... @@ -888,9 +861,45 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
// } catch (Exception e) {
// e.printStackTrace();
// }
// try {
// if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)
// != PackageManager.PERMISSION_GRANTED) {
// // 第一次请求权限时,用户如果拒绝,下一次请求shouldShowRequestPermissionRationale()返回true
// // 向用户解释为什么需要这个权限
// if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.CAMERA)) {
//
// } else {
// //申请相机权限
// ActivityCompat.requestPermissions(this,
// new String[]{Manifest.permission.CAMERA}, CAMERA_REQUEST_CODE);
// }
// }
// }catch ( Exception e){
//
// }
return true;
}
private void requestPermission() {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)
!= PackageManager.PERMISSION_GRANTED) {
// 第一次请求权限时,用户如果拒绝,下一次请求shouldShowRequestPermissionRationale()返回true
// 向用户解释为什么需要这个权限
if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.CAMERA)) {
} else {
//申请相机权限
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.CAMERA}, CAMERA_REQUEST_CODE);
}
} else {
// tvPermissionStatus.setTextColor(Color.GREEN);
// tvPermissionStatus.setText("相机权限已申请");
}
}
@Override
public void observerUpData(String type, String parameter) {
XdyLogUtil.e(TAG + "observer:", Thread.currentThread().getId() + "type:" + type);
... ... @@ -901,9 +910,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
}
/***************************************
* 回放
***************************************************/
/**************************************** 回放***************************************************/
private static final int FADE_OUT = 1;
private static final int SHOW_PROGRESS = 2;
private boolean mShowing;
... ... @@ -948,12 +955,18 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
}
}
};
public void initReplay() {
mVideoView.setOnInfoListener(this);
mVideoView.setOnErrorListener(this);
mVideoView.setOnSeekCompleteListener(mOnSeekCompleteListener);
mVideoView.setDisplayAspectRatio(PLVideoView.ASPECT_RATIO_PAVED_PARENT);
mPushVideoView.setOnInfoListener(this);
mPushVideoView.setOnErrorListener(this);
mPushVideoView.setOnSeekCompleteListener(mOnSeekCompleteListener);
mPushVideoView.setDisplayAspectRatio(PLVideoView.ASPECT_RATIO_PAVED_PARENT);
AVOptions options = new AVOptions();
mSeekBar.setOnSeekBarChangeListener(mSeekListener);
... ... @@ -985,11 +998,11 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
}
// 默认的缓存大小,单位是 ms
// 默认值是:2000
options.setInteger(AVOptions.KEY_CACHE_BUFFER_DURATION, 300);
options.setInteger(AVOptions.KEY_CACHE_BUFFER_DURATION, 1100);
// 最大的缓存大小,单位是 ms
// 默认值是:4000
options.setInteger(AVOptions.KEY_MAX_CACHE_BUFFER_DURATION, 300);
options.setInteger(AVOptions.KEY_MAX_CACHE_BUFFER_DURATION, 1200);
// 是否自动启动播放,如果设置为 1,则在调用 `prepareAsync` 或者 `setVideoPath` 之后自动启动播放,无需调用 `start()`
// 默认值是:1
options.setInteger(AVOptions.KEY_START_ON_PREPARED, 0);
... ... @@ -999,10 +1012,10 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
options.setInteger(AVOptions.KEY_PROBESIZE, 128 * 1024);
options.setInteger(AVOptions.KEY_BUFFER_TIME, 300);
// 请在开始播放之前配置
mVideoView.setAVOptions(options);
// 请在开始播放之前配置
mVideoView.setAVOptions(options);
mPushVideoView.setAVOptions(options);
mPauseContainer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
... ... @@ -1216,7 +1229,10 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
xdySdk.api("startRecordPlayback", "");
}
}, 200);
mPushVideoView.start();
mVideoView.start();
}
private void handleTime(String pa) {
... ... @@ -1245,6 +1261,14 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
mVideoView.start();
XdyLogUtil.i(TAG, "视频开始");
}
if (isPause && mPushVideoView != null && mPushVideoView.isPlaying()) {
mPushVideoView.pause();
XdyLogUtil.i(TAG, "视频停止");
} else if (mPushVideoView != null) {
mPushVideoView.start();
XdyLogUtil.i(TAG, "视频开始");
}
}
/**
... ... @@ -1252,7 +1276,7 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
*
* @param response
*/
public void playRecord(String response) {
public void playRecord(String response,boolean isAudio) {
String json_video = aCache.getAsString(response);
if (TextUtils.isEmpty(json_video)) {
///给出相应的提示表示没有 这个id
... ... @@ -1262,8 +1286,13 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
VideoPlayBean videoPlayBean = JsonUtil.parseJsonToBean(json_video, VideoPlayBean.class);
if (videoPlayBean != null) {
//回放不会出现Constants.PLAY_SUCCESS:
if(Constants.HOST.equals(videoPlayBean.getUserRole())) {
if (img_playVideo_novideo != null)
img_playVideo_novideo.setVisibility(View.GONE);
if(isAudio){
img_playVideo_novideo.setImageResource(R.mipmap.audio_mode);
img_playVideo_novideo.setVisibility(View.VISIBLE);
}
if (mVideoView.isPlaying()) {
mVideoView.stopPlayback();
}
... ... @@ -1273,9 +1302,30 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
mVideoView.seekTo(videoPlayBean.getSeek() * 1000);
}
mVideoView.start();
}else{
//推流 回放
// if (img_playVideo_novideo != null) {
// img_playVideo_novideo.setVisibility(View.GONE);
// }
if (mPushVideoView != null) {
mPushVideoView.setVisibility(View.VISIBLE);
}
if(isAudio){
mIamgeView_PublishAudio.setVisibility(View.VISIBLE);
}
if (mPushVideoView.isPlaying()) {
mPushVideoView.stopPlayback();
}
mPushVideoView.setVideoPath("http://123.56.73.119:6001/live/h5dev_1992614331_980_983042_1494927366/total.m3u8");
if (replay && videoPlayBean.getSeek() > 0) {
mPushVideoView.seekTo(videoPlayBean.getSeek() * 1000);
}
mPushVideoView.start();
}
}
}
/*回放暂停*/
public void stopVideo() {
mHandler.post(new Runnable() {
@Override
... ... @@ -1284,18 +1334,33 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
img_playVideo_novideo.setVisibility(View.VISIBLE);
}
});
//隐藏直播回放
mPushVideoView.setVisibility(View.GONE);
if (isPlayVideoMode && mVideoView != null && mVideoView.isPlaying())
if (isPlayVideoMode && mVideoView != null && mVideoView.isPlaying()) {
mVideoView.stopPlayback();
}
if (isPlayVideoMode && mPushVideoView != null && mPushVideoView.isPlaying()) {
mPushVideoView.stopPlayback();
}
}
public void stopAudio() {
img_playVideo_novideo.setImageResource(R.mipmap.no_video);
img_playVideo_novideo.setVisibility(View.VISIBLE);
if (isPlayVideoMode && mVideoView != null && mVideoView.isPlaying())
//隐藏直播回放
mPushVideoView.setVisibility(View.GONE);
mIamgeView_PublishAudio.setVisibility(View.GONE);
if (isPlayVideoMode && mVideoView != null && mVideoView.isPlaying()) {
mVideoView.stopPlayback();
}
if (isPlayVideoMode && mPushVideoView != null && mPushVideoView.isPlaying()) {
mPushVideoView.stopPlayback();
}
}
... ... @@ -1434,9 +1499,12 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
/******************************************************公共**********************************/
/*播放视频*/
/*推送视频*/
public void publishVideo(){
//填写事件
if (!checkPermission()) {
return;
}
coverStudent(true);
tabletShowAudio(true);
mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
... ... @@ -1450,8 +1518,11 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
xdySdk.api("publishVideo", "", surfaceView_publish, VideoPlayActivity.this);
isPublsishVideoMode = true;
}
/*播放音频*/
/*推送音频*/
public void publishAudio(){
if (!checkPermission()) {
return;
}
coverStudent(true);
tabletShowAudio(true);
mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.adapter;
package com.mang.xuedianyun.android.adapter;
import android.content.Context;
import android.text.TextUtils;
... ... @@ -28,12 +28,12 @@ import android.widget.TextView;
import com.mang.xdy.common.Constants;
import com.mang.xdy.utils.SPUtil;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.bean.JoinClassSuccessEntity;
import com.mang.xdy.demo.bean.Message;
import com.mang.xdy.demo.fragment.ChatFragment;
import com.mang.xdy.demo.utils.JsonUtil;
import com.mang.xdy.demo.widget.chat.UrlUtils;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.bean.JoinClassSuccessEntity;
import com.mang.xuedianyun.android.bean.Message;
import com.mang.xuedianyun.android.fragment.ChatFragment;
import com.mang.xuedianyun.android.utils.JsonUtil;
import com.mang.xuedianyun.android.widget.chat.UrlUtils;
import org.kymjs.kjframe.KJBitmap;
... ...
... ... @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.adapter;
package com.mang.xuedianyun.android.adapter;
import android.widget.AbsListView;
import android.widget.ImageView;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.bean.Faceicon;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.bean.Faceicon;
import org.kymjs.kjframe.KJBitmap;
import org.kymjs.kjframe.widget.AdapterHolder;
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.adapter;
package com.mang.xuedianyun.android.adapter;
import android.graphics.Bitmap;
import android.os.Bundle;
... ... @@ -23,13 +23,13 @@ import android.support.v4.app.FragmentStatePagerAdapter;
import android.widget.ImageView;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.widget.chat.ChatFunctionFragment;
import com.mang.xdy.demo.widget.chat.FacePageFragment;
import com.mang.xdy.demo.widget.chat.KJChatKeyboard;
import com.mang.xdy.demo.widget.chat.OnOperationListener;
import com.mang.xdy.demo.widget.chat.PagerSlidingTabStrip;
import com.mang.xdy.demo.widget.emoji.EmojiPageFragment;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.widget.chat.ChatFunctionFragment;
import com.mang.xuedianyun.android.widget.chat.FacePageFragment;
import com.mang.xuedianyun.android.widget.chat.KJChatKeyboard;
import com.mang.xuedianyun.android.widget.chat.OnOperationListener;
import com.mang.xuedianyun.android.widget.chat.PagerSlidingTabStrip;
import com.mang.xuedianyun.android.widget.emoji.EmojiPageFragment;
import org.kymjs.kjframe.bitmap.BitmapCreate;
... ...
package com.mang.xdy.demo.adapter;
package com.mang.xuedianyun.android.adapter;
/**
* Created by huang on 2017/4/9.
... ... @@ -9,9 +9,8 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import com.mang.xdy.demo.fragment.ChatFragment;
import com.mang.xdy.demo.fragment.DocFragment;
import com.mang.xdy.demo.fragment.PageFragment;
import com.mang.xuedianyun.android.fragment.ChatFragment;
import com.mang.xuedianyun.android.fragment.DocFragment;
import java.util.ArrayList;
import java.util.List;
... ...
package com.mang.xdy.demo.application;
package com.mang.xuedianyun.android.application;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import com.mang.xdy.core.XdySdk;
import com.mang.xdy.demo.utils.ResUtil;
import com.mang.xuedianyun.android.utils.ResUtil;
/**
* Created by abao on 2017/3/30.
... ...
package com.mang.xdy.demo.bean;
package com.mang.xuedianyun.android.bean;
import java.util.List;
import java.util.List;
/**
* Created by Admin on 2017/3/27.
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.bean;
package com.mang.xuedianyun.android.bean;
import java.io.Serializable;
... ...
package com.mang.xdy.demo.bean;
package com.mang.xuedianyun.android.bean;
/**
* Created by abao on 2017/4/10. 加入课堂
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.bean;
package com.mang.xuedianyun.android.bean;
/**
* 聊天消息javabean
... ...
package com.mang.xdy.demo.bean;
package com.mang.xuedianyun.android.bean;
/**
* Created by Admin on 2017/3/26.
... ...
package com.mang.xdy.demo.bean;
package com.mang.xuedianyun.android.bean;
public class ResponseEntity {
private String type;
... ...
package com.mang.xdy.demo.bean;
package com.mang.xuedianyun.android.bean;
// FIXME generate failure method set and get MediaId
// FIXME generate failure field _$Replay151
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
import android.view.View;
import android.view.animation.Interpolator;
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
import android.app.Dialog;
import android.content.Context;
... ... @@ -15,7 +15,7 @@ import android.view.Window;
import android.view.WindowManager.LayoutParams;
import android.widget.LinearLayout;
import com.mang.xdy.demo.utils.DisplayUtil;
import com.mang.xuedianyun.android.utils.DisplayUtil;
import com.nineoldandroids.animation.Animator;
import java.lang.ref.WeakReference;
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
import android.content.Context;
import android.view.Gravity;
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
import android.content.Context;
import android.view.MotionEvent;
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
import android.content.Context;
import android.graphics.Color;
... ... @@ -9,7 +9,7 @@ import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
public class NormalDialog extends BaseDialog {
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
import android.content.Context;
import android.graphics.Color;
... ... @@ -9,7 +9,7 @@ import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
/**
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
public interface OnBtnClick {
void onBtnClick();
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
public interface OnBtnLeftClick {
void onBtnLeftClick();
... ...
package com.mang.xdy.demo.dialog;
package com.mang.xuedianyun.android.dialog;
public interface OnBtnRightClick {
void onBtnRightClick();
... ...
package com.mang.xdy.demo.fragment;
package com.mang.xuedianyun.android.fragment;
import android.content.Context;
import android.os.Bundle;
... ... @@ -18,17 +18,17 @@ import com.google.gson.Gson;
import com.mang.xdy.common.Constants;
import com.mang.xdy.utils.SPUtil;
import com.mang.xdy.core.XdySdk;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.adapter.ChatAdapter;
import com.mang.xdy.demo.bean.ChatMsgEntity;
import com.mang.xdy.demo.bean.Faceicon;
import com.mang.xdy.demo.bean.JoinClassSuccessEntity;
import com.mang.xdy.demo.bean.Message;
import com.mang.xdy.demo.bean.SendChatMsgEntity;
import com.mang.xdy.demo.utils.JsonUtil;
import com.mang.xdy.demo.widget.chat.KJChatKeyboard;
import com.mang.xdy.demo.widget.chat.OnOperationListener;
import com.mang.xdy.demo.widget.emoji.DisplayRules;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.adapter.ChatAdapter;
import com.mang.xuedianyun.android.bean.ChatMsgEntity;
import com.mang.xuedianyun.android.bean.Faceicon;
import com.mang.xuedianyun.android.bean.JoinClassSuccessEntity;
import com.mang.xuedianyun.android.bean.Message;
import com.mang.xuedianyun.android.bean.SendChatMsgEntity;
import com.mang.xuedianyun.android.utils.JsonUtil;
import com.mang.xuedianyun.android.widget.chat.KJChatKeyboard;
import com.mang.xuedianyun.android.widget.chat.OnOperationListener;
import com.mang.xuedianyun.android.widget.emoji.DisplayRules;
import com.mang.xdy.listener.ObserverListener;
import com.mang.xdy.utils.XdyLogUtil;
... ...
package com.mang.xdy.demo.fragment;
package com.mang.xuedianyun.android.fragment;
import android.content.Context;
import android.graphics.Bitmap;
... ... @@ -11,21 +11,20 @@ import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import com.bumptech.glide.Glide;
import com.mang.xdy.common.Constants;
import com.mang.xdy.core.XdySdk;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.base.BaseRunnable;
import com.mang.xdy.demo.bean.DocEntity;
import com.mang.xdy.demo.bean.WhiteboardUpdateEntity;
import com.mang.xdy.demo.bean.WrapDocBitMapEntity;
import com.mang.xdy.demo.utils.JsonUtil;
import com.mang.xdy.demo.utils.ToastUtil;
import com.mang.xdy.demo.widget.CanvasView;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.base.BaseRunnable;
import com.mang.xuedianyun.android.bean.DocEntity;
import com.mang.xuedianyun.android.bean.WhiteboardUpdateEntity;
import com.mang.xuedianyun.android.bean.WrapDocBitMapEntity;
import com.mang.xuedianyun.android.utils.JsonUtil;
import com.mang.xuedianyun.android.utils.ToastUtil;
import com.mang.xuedianyun.android.widget.CanvasView;
import com.mang.xdy.listener.ObserverListener;
import com.mang.xdy.utils.XdyLogUtil;
... ... @@ -85,7 +84,7 @@ public class DocFragment extends Fragment implements ObserverListener{
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
ToastUtil.showToastshort("图片加载失败",mContext);
ToastUtil.showToastshort(getResources().getString(R.string.imge_load_error),mContext);
}
};
... ... @@ -99,17 +98,15 @@ public class DocFragment extends Fragment implements ObserverListener{
public void init(){
Bundle arguments = getArguments();
if(arguments!=null)
replay = arguments.getBoolean("replay");
DisplayMetrics metric = new DisplayMetrics();
getWindowWith(metric);
docUrlTransformBitmap(null);
// mCanvasView.setZOrderMediaOverlay(false);
// mCanvasView.setZOrderOnTop(false);
//// mCanvasView.getHolder().setFormat(SurfaceView.TRANSPARENT);
// mCanvasView.getHolder().setFormat(SurfaceView.TRANSPARENT);
if(replay) {
mCanvasView.setZOrderMediaOverlay(true);
}
}
private void getWindowWith(DisplayMetrics metric) {
... ... @@ -237,7 +234,7 @@ public class DocFragment extends Fragment implements ObserverListener{
public void call(WrapDocBitMapEntity resource) {
if (resource.getBitmap() == null) {
ToastUtil.showToastshort("图片获取失败",mContext);
ToastUtil.showToastshort(getResources().getString(R.string.imge_load_error),mContext);
Bitmap bitmap = getEmptyBitmap();
mCanvasView.setBitmap(bitmap, false);
} else {
... ...
package com.mang.xdy.demo.fragment;
package com.mang.xuedianyun.android.fragment;
import android.os.Bundle;
... ... @@ -9,7 +9,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
/**
... ...
package com.mang.xdy.demo.fragment;
package com.mang.xuedianyun.android.fragment;
import android.os.Bundle;
... ... @@ -7,12 +7,13 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
/**
* A simple {@link Fragment} subclass.
* Use the {@link PublishFragment#newInstance} factory method to
* create an instance of this fragment.
* @deprecated
*/
public class PublishFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
... ...
package com.mang.xdy.demo.utils;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Rect;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
package com.mang.xuedianyun.android.utils;
import android.annotation.SuppressLint;
import android.app.Activity;
... ...
package com.mang.xdy.demo.utils;
package com.mang.xuedianyun.android.utils;
import android.text.TextUtils;
import android.util.Log;
... ...
package com.mang.xdy.demo.utils;
import android.content.Context;
import android.content.res.Resources;
import android.support.annotation.StringRes;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
package com.mang.xuedianyun.android.utils;
import android.content.Context;
import android.content.res.Resources;
... ...
package com.mang.xdy.demo.utils;
package com.mang.xuedianyun.android.utils;
import android.content.Context;
import android.widget.Toast;
... ...
... ... @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.utils.cache;
package com.mang.xuedianyun.android.utils.cache;
import android.content.Context;
import android.graphics.Bitmap;
... ...
package com.mang.xdy.demo.utils.cache;
package com.mang.xuedianyun.android.utils.cache;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
... ...
package com.mang.xdy.demo.widget;
package com.mang.xuedianyun.android.widget;
import android.content.Context;
import android.graphics.Bitmap;
... ... @@ -17,13 +17,12 @@ import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.bean.AnnotaionEntity;
import com.mang.xdy.demo.bean.PointGroupEntity;
import com.mang.xdy.demo.bean.PointXY;
import com.mang.xdy.demo.utils.DisplayUtil;
import com.mang.xdy.demo.utils.ResUtil;
import com.mang.xdy.utils.XdyLogUtil;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.bean.AnnotaionEntity;
import com.mang.xuedianyun.android.bean.PointGroupEntity;
import com.mang.xuedianyun.android.bean.PointXY;
import com.mang.xuedianyun.android.utils.DisplayUtil;
import com.mang.xuedianyun.android.utils.ResUtil;
import java.util.ArrayList;
import java.util.Iterator;
... ...
package com.mang.xuedianyun.android.widget.answersheet;
import android.content.Context;
import android.os.CountDownTimer;
import android.util.AttributeSet;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.utils.ToastUtil;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* Created by abao on 2017/5/5.
* @deprecated
*/
public class AnswerSheetView extends RelativeLayout {
/*单选多选类型*/
public final static int ANSWER_TYPE_SINGLE_OR_MORE = 1;
/*对错类型*/
public final static int ANSWER_TYPE_RIGHT_OR_WRONG = 2;
/*填空*/
public final static int ANSWER_TYPE_FILLING = 3;
/*单前的type*/
private static int ANSWER_CURRENT_TYPE = 1;
/*倒计时时间 s*/
public static int ANSWER_TIMEOUT = 30;
@BindView(R.id.tv_exam_countdown)
TextView tvExamCountdown;
@BindView(R.id.rel_home_tv_exam_countdown)
RelativeLayout relHomeTvExamCountdown;
@BindView(R.id.cb_exam_A)
CheckBox cbExamA;
@BindView(R.id.cb_exam_B)
CheckBox cbExamB;
@BindView(R.id.cb_exam_C)
CheckBox cbExamC;
@BindView(R.id.cb_exam_D)
CheckBox cbExamD;
@BindView(R.id.ll_exam_SingleOrMore)
LinearLayout llExamSingleOrMore;
@BindView(R.id.rb_exam_R)
RadioButton rbExamR;
@BindView(R.id.rb_exam_W)
RadioButton rbExamW;
@BindView(R.id.ll_exam_selectRightOrWrong)
LinearLayout llExamSelectRightOrWrong;
@BindView(R.id.ll_exam_filling)
LinearLayout llExamFilling;
@BindView(R.id.tv_exam_up)
TextView tvExamUp;
@BindView(R.id.tv_exam_cancle)
TextView tvExamCancle;
@BindView(R.id.ll_exam_submit)
LinearLayout llExamSubmit;
@BindView(R.id.rel_exam_layout)
RelativeLayout relExamLayout;
@BindView(R.id.ll_exam_answer)
LinearLayout llExamAnswer;
private AnswerCount mAnswerCount;
private StringBuffer sb = new StringBuffer();
private Context mContext;
private String character_close="关闭";
private String character_cancle="放弃";
Display display;
private OnAnswerLayoutChangeListener onAnswerLayoutChangeListener;
public interface OnAnswerLayoutChangeListener{
/**
* 改变显示布局的大小
* @param
*/
void setAnswerSheetFramLayout(int num);
void setAnswerSheetNormal(int num);
}
public void setOnAnswerLayoutChangeListener(OnAnswerLayoutChangeListener onAnswerLayoutChangeListener){
this.onAnswerLayoutChangeListener=onAnswerLayoutChangeListener;
}
public AnswerSheetView(Context context) {
this(context, null);
}
public AnswerSheetView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public AnswerSheetView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mContext = context;
View view = initView(context);
this.addView(view);
}
public View initView(Context context) {
View view = LayoutInflater.from(context).inflate(R.layout.item_answer, null);
ButterKnife.bind(this, view);
return view;
}
/*选择答题类型*/
public void selectAnswerSheetType(int type) {
tvExamCountdown.setText("_s");
llExamAnswer.setVisibility(View.GONE);
tvExamUp.setVisibility(View.VISIBLE);
tvExamCancle.setText(character_cancle);
switch (type) {
case ANSWER_TYPE_SINGLE_OR_MORE:
ANSWER_CURRENT_TYPE = ANSWER_TYPE_SINGLE_OR_MORE;
llExamSingleOrMore.setVisibility(View.VISIBLE);
llExamSelectRightOrWrong.setVisibility(View.GONE);
llExamFilling.setVisibility(View.GONE);
break;
case ANSWER_TYPE_RIGHT_OR_WRONG:
ANSWER_CURRENT_TYPE = ANSWER_TYPE_RIGHT_OR_WRONG;
llExamSingleOrMore.setVisibility(View.GONE);
llExamSelectRightOrWrong.setVisibility(View.VISIBLE);
llExamFilling.setVisibility(View.GONE);
break;
case ANSWER_TYPE_FILLING:
ANSWER_CURRENT_TYPE = ANSWER_TYPE_FILLING;
llExamSingleOrMore.setVisibility(View.GONE);
llExamSelectRightOrWrong.setVisibility(View.GONE);
llExamFilling.setVisibility(View.VISIBLE);
break;
}
}
@OnClick({R.id.tv_exam_up, R.id.tv_exam_cancle})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_exam_up:
//提交需要获取结果,清除数据,时间清理
// relExamLayout.setVisibility(GONE);
handleAnswer(ANSWER_CURRENT_TYPE);
ToastUtil.showToastshort("选择答案:" + sb.toString() + sb.length(), mContext);
recoverStatus();
setSubmitAnswer();
break;
case R.id.tv_exam_cancle:
recoverStatus();
// if(character_cancle.equals(tvExamCancle)) {
// setAnsNormalLayout(53);
// }else{
//
// }
if(relExamLayout.isShown()){
relExamLayout.setVisibility(GONE);
}
break;
}
}
/*开始倒计时*/
public void startCountTimer(int time) {
ANSWER_TIMEOUT = time;
cancleCountTimer();
mAnswerCount = new AnswerCount(ANSWER_TIMEOUT * 1000, 1000);
mAnswerCount.start();
//提交需要获取结果,清除数据,时间清理
relExamLayout.setVisibility(VISIBLE);
}
/*销毁倒计时*/
public void cancleCountTimer() {
if (mAnswerCount != null) {
mAnswerCount.cancel();
}
}
/**
* 处理结果,拼装答案
*
* @param type
*/
public void handleAnswer(int type) {
switch (type) {
case ANSWER_TYPE_SINGLE_OR_MORE:
handleSingleOrMore();
break;
case ANSWER_TYPE_RIGHT_OR_WRONG:
handleRightOrWrong();
break;
case ANSWER_TYPE_FILLING:
break;
}
}
/*单选,多选答案拼接*/
public void handleSingleOrMore() {
sb.setLength(0);
if (cbExamA.isChecked()) {
sb.append("A");
}
if (cbExamB.isChecked()) {
sb.append("B");
}
if (cbExamC.isChecked()) {
sb.append("C");
}
if (cbExamD.isChecked()) {
sb.append("D");
}
}
/*处理对错*/
public void handleRightOrWrong() {
sb.setLength(0);
if (rbExamR.isChecked()) {
sb.append("对");
} else {
sb.append("错");
}
}
/*恢复状态*/
public void recoverStatus() {
switch (ANSWER_CURRENT_TYPE) {
case ANSWER_TYPE_SINGLE_OR_MORE:
cbExamA.setChecked(false);
cbExamB.setChecked(false);
cbExamC.setChecked(false);
cbExamD.setChecked(false);
break;
case ANSWER_TYPE_RIGHT_OR_WRONG:
rbExamR.setChecked(true);
rbExamW.setChecked(false);
break;
case ANSWER_TYPE_FILLING:
break;
}
}
/*隐藏所有题目*/
private void hideAllTitle(){
llExamSingleOrMore.setVisibility(View.GONE);
llExamSelectRightOrWrong.setVisibility(View.GONE);
llExamFilling.setVisibility(View.GONE);
}
/*设置显示答案布局大小*/
public void setAnswerLayout(int num){
if(onAnswerLayoutChangeListener!=null) {
onAnswerLayoutChangeListener.setAnswerSheetFramLayout(num);
}
}
/*设置显示答案布局大小*/
public void setAnsNormalLayout(int num){
if(onAnswerLayoutChangeListener!=null) {
onAnswerLayoutChangeListener.setAnswerSheetNormal(num);
}
}
/*提交答案 设置*/
private void setSubmitAnswer(){
hideAllTitle();
llExamAnswer.setVisibility(View.VISIBLE);
cancleCountTimer();
tvExamUp.setVisibility(View.GONE);
tvExamCancle.setText(character_close);
setAnswerLayout(100);
}
@OnClick(R.id.ll_exam_answer)
public void onViewClicked() {
}
/*倒计时处理*/
class AnswerCount extends CountDownTimer {
/**
* @param millisInFuture The number of millis in the future from the call
* to {@link #start()} until the countdown is done and {@link #onFinish()}
* is called.
* @param countDownInterval The interval along the way to receive
* {@link #onTick(long)} callbacks.
*/
public AnswerCount(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
}
@Override
public void onTick(long millisUntilFinished) {
if (millisUntilFinished < 10) {
tvExamCountdown.setText(" " + millisUntilFinished / 1000 + "s");
} else {
tvExamCountdown.setText(millisUntilFinished / 1000 + "s");
}
}
@Override
public void onFinish() {
//这个结束应该做自动提交答案的工作
tvExamCountdown.setText("0s");
}
}
}
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.chat;
package com.mang.xuedianyun.android.widget.chat;
import android.os.Bundle;
import android.view.LayoutInflater;
... ... @@ -22,7 +22,7 @@ import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
import org.kymjs.kjframe.ui.SupportFragment;
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.chat;
package com.mang.xuedianyun.android.widget.chat;
import android.app.Activity;
import android.graphics.Color;
... ... @@ -36,9 +36,9 @@ import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.adapter.FaceAdapter;
import com.mang.xdy.demo.bean.Faceicon;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.adapter.FaceAdapter;
import com.mang.xuedianyun.android.bean.Faceicon;
import org.kymjs.kjframe.ui.SupportFragment;
import org.kymjs.kjframe.utils.StringUtils;
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.chat;
package com.mang.xuedianyun.android.widget.chat;
import android.app.Activity;
import android.content.Context;
... ... @@ -29,8 +29,8 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.adapter.FaceCategroyAdapter;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.adapter.FaceCategroyAdapter;
import java.util.List;
... ...
... ... @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.chat;
package com.mang.xuedianyun.android.widget.chat;
import com.mang.xdy.demo.bean.Faceicon;
import com.mang.xuedianyun.android.bean.Faceicon;
/**
* 表情栏顶部按钮的监听器
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.chat;
package com.mang.xuedianyun.android.widget.chat;
import android.annotation.SuppressLint;
import android.content.Context;
... ... @@ -39,7 +39,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
import java.util.Locale;
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.chat;
package com.mang.xuedianyun.android.widget.chat;
import android.graphics.Rect;
import android.view.View;
... ...
package com.mang.xdy.demo.widget.chat;
package com.mang.xuedianyun.android.widget.chat;
import android.content.Context;
import android.content.Intent;
... ...
package com.mang.xuedianyun.android.widget.dialog;
import android.app.Dialog;
import android.content.Context;
import android.view.Display;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import com.mang.xuedianyun.android.R;
import butterknife.ButterKnife;
/**
* Created by abao on 2017/5/9.
* @deprecated
*/
public class AnswText {
/*单选多选类型*/
public final static int ANSWER_TYPE_SINGLE_OR_MORE = 1;
/*对错类型*/
public final static int ANSWER_TYPE_RIGHT_OR_WRONG = 2;
/*填空*/
public final static int ANSWER_TYPE_FILLING = 3;
/*单前的type*/
private static int ANSWER_CURRENT_TYPE = 1;
/*倒计时时间 s*/
public static int ANSWER_TIMEOUT = 30;
private StringBuffer sb = new StringBuffer();
private Context mContext;
private String character_close="关闭";
private String character_cancle="放弃";
private OnAnswerLayoutChangeListener onAnswerLayoutChangeListener;
public interface OnAnswerLayoutChangeListener{
/**
* 改变显示布局的大小
* @param
*/
void setAnswerSheetFramLayout(int num);
void setAnswerSheetNormal(int num);
}
public void setOnAnswerLayoutChangeListener(OnAnswerLayoutChangeListener onAnswerLayoutChangeListener){
this.onAnswerLayoutChangeListener=onAnswerLayoutChangeListener;
}
private Context context;
private Dialog dialog;
private TextView txt_title;
private TextView txt_cancel;
private LinearLayout lLayout_content;
private ScrollView sLayout_content;
private boolean showTitle = false;
// private List<ActionSheetDialog.SheetItem> sheetItemList;
private Display display;
public AnswText(Context context) {
this.context = context;
this.mContext=context;
WindowManager windowManager = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);
display = windowManager.getDefaultDisplay();
}
public AnswText builder() {
View view = LayoutInflater.from(context).inflate(
R.layout.view_text, null);
ButterKnife.bind(this,view);
view.setMinimumWidth(display.getWidth());
dialog = new Dialog(context, R.style.ActionSheetDialogStyle);
dialog.setContentView(view);
Window dialogWindow = dialog.getWindow();
dialogWindow.setGravity(Gravity.LEFT | Gravity.BOTTOM);
// dialogWindow.setGravity( Gravity.BOTTOM);
WindowManager.LayoutParams lp = dialogWindow.getAttributes();
lp.x = 0;
lp.y = 0;
dialogWindow.setAttributes(lp);
return this;
}
public void show() {
dialog.show();
}
}
... ...
package com.mang.xdy.demo.widget.dialog;
package com.mang.xuedianyun.android.widget.dialog;
import android.app.Dialog;
import android.content.Context;
... ... @@ -12,15 +12,14 @@ import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.utils.ToastUtil;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.utils.ToastUtil;
import com.mang.xdy.utils.XdyLogUtil;
import com.mang.xdy.utils.XdyStringUtils;
... ...
package com.mang.xdy.demo.widget.dialog;
package com.mang.xuedianyun.android.widget.dialog;
import android.content.Context;
import android.view.Gravity;
... ... @@ -7,8 +7,8 @@ import android.widget.Button;
import android.widget.EditText;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.dialog.BaseDialog;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.dialog.BaseDialog;
import com.mang.xdy.utils.UIUtils;
import org.greenrobot.eventbus.EventBus;
... ...
package com.mang.xdy.demo.widget.emoji;
package com.mang.xuedianyun.android.widget.emoji;
import android.view.KeyEvent;
import android.widget.EditText;
... ...
... ... @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.emoji;
package com.mang.xuedianyun.android.widget.emoji;
import android.widget.AbsListView;
import android.widget.TextView;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
import org.kymjs.kjframe.widget.AdapterHolder;
import org.kymjs.kjframe.widget.KJAdapter;
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.emoji;
package com.mang.xuedianyun.android.widget.emoji;
import android.app.Activity;
import android.os.Bundle;
... ... @@ -31,8 +31,8 @@ import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.mang.xdy.demo.R;
import com.mang.xdy.demo.widget.chat.OnOperationListener;
import com.mang.xuedianyun.android.R;
import com.mang.xuedianyun.android.widget.chat.OnOperationListener;
import org.kymjs.kjframe.ui.SupportFragment;
... ...
... ... @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mang.xdy.demo.widget.emoji;
package com.mang.xuedianyun.android.widget.emoji;
/**
* emoji表情的javabean
... ...
package com.mang.xdy.demo.widget.emoji;
package com.mang.xuedianyun.android.widget.emoji;
import com.mang.xdy.demo.R;
import com.mang.xuedianyun.android.R;
import java.util.ArrayList;
import java.util.HashMap;
... ...
package com.mang.xdy.demo.widget.emoji;
package com.mang.xuedianyun.android.widget.emoji;
import android.content.Context;
import android.content.res.TypedArray;
... ...
package com.mang.xdy.demo.widget.emoji;
package com.mang.xuedianyun.android.widget.emoji;
import android.content.Context;
import android.content.res.TypedArray;
... ...
package com.mang.xdy.demo.widget.view;
package com.mang.xuedianyun.android.widget.view;
import android.content.Context;
import android.os.Build;
... ... @@ -7,7 +7,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.mang.xdy.demo.utils.DisplayUtil;
import com.mang.xuedianyun.android.utils.DisplayUtil;
public class AutoAdaptHeaderViewGroup extends RelativeLayout {
... ...
package com.mang.xdy.demo.widget.view;
package com.mang.xuedianyun.android.widget.view;
import android.content.Context;
import android.support.v4.view.ViewPager;
... ...
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/home_btn_green_press" android:state_pressed="true"></item>
<item android:drawable="@color/home_btn_green_press" android:state_checked="true"></item>
<item android:drawable="@color/home_btn_green"></item>
</selector>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/answer_select" android:state_checked="true" />
<item android:drawable="@drawable/answer_unselect" />
</selector>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/spreadback" android:state_checked="true" />
<item android:drawable="@drawable/foldback" />
</selector>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@color/colorSkyBlue" />
<!--<padding-->
<!--android:left="2dp"-->
<!--android:top="1dp"-->
<!--android:right="2dp"-->
<!--android:bottom="1dp" />-->
<!--<solid-->
<!--android:color="@color/actionsheet_red" />-->
<!--<stroke-->
<!--android:width="1dp"-->
<!--android:color="@android:color/white" />-->
<size android:width="18dp"
android:height="18dp" />
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@color/actionsheet_red" />
<!--<padding-->
<!--android:left="2dp"-->
<!--android:top="1dp"-->
<!--android:right="2dp"-->
<!--android:bottom="1dp" />-->
<!--<solid-->
<!--android:color="@color/actionsheet_red" />-->
<!--<stroke-->
<!--android:width="1dp"-->
<!--android:color="@android:color/white" />-->
<size android:width="18dp"
android:height="18dp" />
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 圆角 -->
<corners android:radius="16dp" />
<!-- 填充颜色 -->
<solid android:color="@color/colorSkyBlue" />
<!--&lt;!&ndash;内边距&ndash;&gt;-->
<padding
android:bottom="5dp"
android:left="5dp"
android:right="5dp"
android:top="5dp" />
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 圆角 -->
<corners android:radius="16dp" />
<!-- 填充颜色 -->
<solid android:color="@color/colorGrey" />
<!--内边距-->
<padding
android:bottom="5dp"
android:left="5dp"
android:right="5dp"
android:top="5dp" />
</shape>
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.mang.xdy.demo.MainActivity">
tools:context="com.mang.xuedianyun.android.MainActivity">
<RelativeLayout
android:id="@+id/rl_home_close"
android:layout_width="@dimen/ui_DIMEN_98.0PX"
... ...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_video_play"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#e3e4e6"
tools:context="com.mang.xuedianyun.android.activity.VideoPlayActivity">
<RelativeLayout
android:id="@+id/avg_videoPlay_back"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:paddingLeft="@dimen/ui_DIMEN_20.0PX"
android:paddingRight="@dimen/ui_DIMEN_20.0PX">
<ImageView
android:id="@+id/img_videoPlay_back"
android:layout_width="wrap_content"
android:layout_height="@dimen/ui_titlebar_height"
android:paddingRight="10dp"
android:paddingLeft="15dp"
android:src="@mipmap/back"/>
<TextView
android:layout_toRightOf="@+id/img_videoPlay_back"
android:layout_width="wrap_content"
style="@style/ui_wrapTvBaseStyle"
android:layout_height="@dimen/ui_titlebar_height"
android:text="@string/home_title_back"
android:gravity="center"
android:textColor="@color/white"
android:visibility="gone"
/>
<TextView
android:id="@+id/tv_videoPlay_className"
style="@style/ui_wrapTvBaseStyle"
android:layout_height="@dimen/ui_titlebar_height"
android:gravity="center"
android:layout_centerHorizontal="true"
android:textColor="@color/white"
android:layout_toRightOf="@+id/img_videoPlay_back"
tools:text="dfdfdfdfdfdf"
android:textSize="@dimen/ui_DIMEN_34.0PX"/>
</RelativeLayout>
<!--白板+right-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_below="@+id/avg_videoPlay_back"
android:layout_above="@+id/fl_media"
>
<LinearLayout
android:id="@+id/ll_videoPlay_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:layout_alignParentRight="true"
>
<RelativeLayout
android:id="@+id/rel_videoPlay_play"
android:layout_width="255dp"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:layout_height="wrap_content">
<com.pili.pldroid.player.widget.PLVideoTextureView
android:id="@+id/img_playVideo_replay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"/>
<SurfaceView
android:id="@+id/surfaceview_playVideo"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<ImageView
android:id="@+id/img_playVideo_novideo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/novideo"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</FrameLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentRight="true"
android:id="@+id/linearLayout">
</LinearLayout>
</RelativeLayout>
<!--推流-->
<RelativeLayout
android:id="@+id/rel_videoPlay_publish"
android:layout_width="255dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_below="@+id/rel_videoPlay_play"
android:layout_alignParentRight="true"
android:layout_alignLeft="@+id/rel_videoPlay_play"
android:layout_marginTop="8dp"
>
<SurfaceView
android:id="@+id/sur_plaVideo_publish"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
tools:visibility="visible"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
/>
<FrameLayout
android:id="@+id/fra_videoPlay_student_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/student"
tools:visibility="visible"
android:layout_gravity="center"
android:scaleType="fitCenter"
/>
</FrameLayout>
<ImageView
android:id="@+id/img_playVideo_publishAudio"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/audio_mode"
android:visibility="gone"
tools:visibility="visible"
android:scaleType="fitCenter"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
/>
<FrameLayout
android:id="@+id/fra_videoPlay_start"
android:layout_width="50dp"
android:layout_height="50dp"
tools:visibility="visible"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
>
<ImageView
android:id="@+id/img_videoPlay_start"
android:layout_width="20dp"
android:layout_height="12dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="5dp"
android:background="@mipmap/camera_normal2x"
/>
</FrameLayout>
<!--音频-->
<FrameLayout
android:id="@+id/fra_videoPlay_start_audio"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_toRightOf="@+id/fra_videoPlay_start"
tools:visibility="visible"
android:layout_alignParentBottom="true"
>
<ImageView
android:id="@+id/img_videoPlay_start_audio"
android:layout_width="12dp"
android:layout_height="20dp"
android:layout_marginTop="15dp"
android:background="@mipmap/mic_normal2x"
/>
</FrameLayout>
<FrameLayout
android:id="@+id/fra_videoPlay_stopPublish"
android:layout_width="70dp"
android:layout_height="50dp"
android:visibility="gone"
tools:visibility="visible"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_alignBottom="@+id/sur_plaVideo_publish"
>
<ImageView
android:id="@+id/img_videoPlay_stopPublish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginLeft="15dp"
android:enabled="false"
android:background="@mipmap/hangup_normal2x"
/>
</FrameLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_videoPlay_tablet_chat"
android:layout_width="255dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginTop="8dp"
/>
</LinearLayout>
<!--Tablet文档-->
<LinearLayout
android:id="@+id/ll_videoPlay_tablet_doc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:orientation="vertical"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
android:layout_toLeftOf="@+id/ll_videoPlay_right"
/>
</RelativeLayout>
<com.flyco.tablayout.SlidingTabLayout
android:id="@+id/stl_videoPlay_tab"
android:layout_width="match_parent"
android:layout_height="@dimen/ui_titlebar_height"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:background="#fafafa"
custom:tl_indicator_color="@color/home_tab_selected"
custom:tl_indicator_corner_radius="1.5dp"
custom:tl_indicator_height="@dimen/ui_DIMEN_5.0PX"
custom:tl_tab_space_equal="true"
custom:tl_textSelectColor="@color/home_tab_selected"
custom:tl_textUnselectColor="@color/home_tab_unselected"
custom:tl_textsize="@dimen/ui_DIMEN_28.0PX"/>
<com.mang.xuedianyun.android.widget.view.NoScrollViewPager
android:id="@+id/viewpager"
android:layout_below="@+id/stl_videoPlay_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/stl_videoPlay_tab"
android:background="@android:color/white" >
</com.mang.xuedianyun.android.widget.view.NoScrollViewPager>
<FrameLayout
android:id="@+id/fl_media"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
>
<include
layout="@layout/home_media_controller"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</FrameLayout>
</RelativeLayout>
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_video_play"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.mang.xuedianyun.android.activity.VideoPlayActivity">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
>
<SurfaceView
android:id="@+id/surfaceview_playVideo"
android:layout_width="match_parent"
android:layout_height="200dp"
android:visibility="gone"/>
<ImageView
android:id="@+id/img_playVideo_novideo"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@mipmap/novideo"
/>
</RelativeLayout>
<SurfaceView
android:id="@+id/surfaceview_pubisherVideo"
android:layout_width="match_parent"
android:layout_height="300dp" />
<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:background="@android:color/white" />
<TextView
android:id="@+id/tv_videoPlay_url"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/btn_videoPlay_chat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="发送hello"
android:visibility="gone"
/>
<Button
android:id="@+id/btn_videoPlay_pubsherVideo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="获取推流地址推送视频"
android:enabled="false"
/>
<Button
android:id="@+id/btn_videoPlay_publisherAudio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="获取推流地址推送音频"
android:enabled="false"
/>
<Button
android:id="@+id/btn_videoPlay_stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="停止推流"
/>
</LinearLayout>
</LinearLayout>
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="@dimen/ui_DIMEN_500.0PX"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/radius_solid_white_stroke_999"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="@dimen/ui_DIMEN_20.0PX"
xmlns:android="http://schemas.android.com/apk/res/android">
<EditText
android:id="@+id/dialog_edt_username"
style="@style/home_login_edit_style"
android:hint="用户名"/>
<EditText
android:id="@+id/dialog_edt_userpwd"
style="@style/home_login_edit_style"
android:hint="密码"/>
<Button
android:id="@+id/dialog_btn_enter"
android:layout_width="100dp"
android:layout_height="wrap_content"
style="@style/home_site_btn_style"
android:text="登录"
/>
</LinearLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_chat_fragment_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ebebeb"
android:orientation="vertical">
<com.mang.xuedianyun.android.widget.chat.KJChatKeyboard
android:id="@+id/chat_msg_input_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
<ListView
android:id="@+id/chat_listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/chat_msg_input_box"
android:cacheColorHint="#00000000"
android:divider="@null"
android:dividerHeight="8.33dp"
android:scrollbarStyle="outsideOverlay"
android:transcriptMode="normal" />
<View
android:id="@+id/view_line"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/chat_listview"
android:background="#7fd8d8d8" />
<!-- -->
</RelativeLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<com.mang.xuedianyun.android.widget.CanvasView
android:id="@+id/canvas_doc_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
\ No newline at end of file
... ...