huangxinbao

add teacher client operate student

正在显示 31 个修改的文件 包含 1594 行增加57 行删除
@@ -5,7 +5,21 @@ @@ -5,7 +5,21 @@
5 <GradleProjectSettings> 5 <GradleProjectSettings>
6 <option name="distributionType" value="LOCAL" /> 6 <option name="distributionType" value="LOCAL" />
7 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 7 <option name="externalProjectPath" value="$PROJECT_DIR$" />
8 - <option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.14.1" /> 8 + <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/m2repository/com/android/tools/build/gradle/2.2.0" />
  9 + <option name="modules">
  10 + <set>
  11 + <option value="$PROJECT_DIR$" />
  12 + <option value="$PROJECT_DIR$/XdyDemo" />
  13 + <option value="$PROJECT_DIR$/app" />
  14 + <option value="$PROJECT_DIR$/easeUI_CN" />
  15 + <option value="$PROJECT_DIR$/iOS_Dialog_Library" />
  16 + <option value="$PROJECT_DIR$/myapplication2" />
  17 + <option value="$PROJECT_DIR$/mylibrary" />
  18 + <option value="$PROJECT_DIR$/sdklibraryssss" />
  19 + <option value="$PROJECT_DIR$/smartPlayer" />
  20 + <option value="$PROJECT_DIR$/xdy" />
  21 + </set>
  22 + </option>
9 <option name="resolveModulePerSourceSet" value="false" /> 23 <option name="resolveModulePerSourceSet" value="false" />
10 </GradleProjectSettings> 24 </GradleProjectSettings>
11 </option> 25 </option>
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
  3 + <component name="EntryPointsManager">
  4 + <entry_points version="2.0" />
  5 + </component>
  6 + <component name="NullableNotNullManager">
  7 + <option name="myDefaultNullable" value="android.support.annotation.Nullable" />
  8 + <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
  9 + <option name="myNullables">
  10 + <value>
  11 + <list size="4">
  12 + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
  13 + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
  14 + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
  15 + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
  16 + </list>
  17 + </value>
  18 + </option>
  19 + <option name="myNotNulls">
  20 + <value>
  21 + <list size="4">
  22 + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
  23 + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
  24 + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
  25 + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
  26 + </list>
  27 + </value>
  28 + </option>
  29 + </component>
3 <component name="ProjectLevelVcsManager" settingsEditedManually="false"> 30 <component name="ProjectLevelVcsManager" settingsEditedManually="false">
4 <OptionsSetting value="true" id="Add" /> 31 <OptionsSetting value="true" id="Add" />
5 <OptionsSetting value="true" id="Remove" /> 32 <OptionsSetting value="true" id="Remove" />
@@ -10,7 +37,7 @@ @@ -10,7 +37,7 @@
10 <ConfirmationsSetting value="0" id="Add" /> 37 <ConfirmationsSetting value="0" id="Add" />
11 <ConfirmationsSetting value="0" id="Remove" /> 38 <ConfirmationsSetting value="0" id="Remove" />
12 </component> 39 </component>
13 - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="true" assert-keyword="false" jdk-15="false"> 40 + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
14 <output url="file://$PROJECT_DIR$/build/classes" /> 41 <output url="file://$PROJECT_DIR$/build/classes" />
15 </component> 42 </component>
16 <component name="ProjectType"> 43 <component name="ProjectType">
@@ -3,6 +3,15 @@ @@ -3,6 +3,15 @@
3 <component name="ProjectModuleManager"> 3 <component name="ProjectModuleManager">
4 <modules> 4 <modules>
5 <module fileurl="file://$PROJECT_DIR$/MyApplication.iml" filepath="$PROJECT_DIR$/MyApplication.iml" /> 5 <module fileurl="file://$PROJECT_DIR$/MyApplication.iml" filepath="$PROJECT_DIR$/MyApplication.iml" />
  6 + <module fileurl="file://$PROJECT_DIR$/XdyDemo/XdyDemo.iml" filepath="$PROJECT_DIR$/XdyDemo/XdyDemo.iml" />
  7 + <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
  8 + <module fileurl="file://$PROJECT_DIR$/easeUI_CN/easeUI_CN.iml" filepath="$PROJECT_DIR$/easeUI_CN/easeUI_CN.iml" />
  9 + <module fileurl="file://$PROJECT_DIR$/iOS_Dialog_Library/iOS_Dialog_Library.iml" filepath="$PROJECT_DIR$/iOS_Dialog_Library/iOS_Dialog_Library.iml" />
  10 + <module fileurl="file://$PROJECT_DIR$/myapplication2/myapplication2.iml" filepath="$PROJECT_DIR$/myapplication2/myapplication2.iml" />
  11 + <module fileurl="file://$PROJECT_DIR$/mylibrary/mylibrary.iml" filepath="$PROJECT_DIR$/mylibrary/mylibrary.iml" />
  12 + <module fileurl="file://$PROJECT_DIR$/sdklibraryssss/sdklibraryssss.iml" filepath="$PROJECT_DIR$/sdklibraryssss/sdklibraryssss.iml" />
  13 + <module fileurl="file://$PROJECT_DIR$/smartPlayer/smartPlayer.iml" filepath="$PROJECT_DIR$/smartPlayer/smartPlayer.iml" />
  14 + <module fileurl="file://$PROJECT_DIR$/xdy/xdy.iml" filepath="$PROJECT_DIR$/xdy/xdy.iml" />
6 </modules> 15 </modules>
7 </component> 16 </component>
8 </project> 17 </project>
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 android:supportsRtl="true" 43 android:supportsRtl="true"
44 android:theme="@style/AppTheme"> 44 android:theme="@style/AppTheme">
45 <activity android:name=".MainActivity" 45 <activity android:name=".MainActivity"
46 - 46 + android:windowSoftInputMode="adjustPan|stateHidden"
47 android:screenOrientation="portrait"> 47 android:screenOrientation="portrait">
48 <intent-filter> 48 <intent-filter>
49 <action android:name="android.intent.action.MAIN" /> 49 <action android:name="android.intent.action.MAIN" />
@@ -52,7 +52,9 @@ @@ -52,7 +52,9 @@
52 </intent-filter> 52 </intent-filter>
53 </activity> 53 </activity>
54 <activity android:name=".activity.VideoPlayActivity" 54 <activity android:name=".activity.VideoPlayActivity"
55 - android:screenOrientation="landscape" 55 + android:configChanges="keyboardHidden|orientation|screenSize"
  56 + android:screenOrientation="portrait"
  57 + android:windowSoftInputMode="adjustPan|stateHidden"
56 > 58 >
57 </activity> 59 </activity>
58 </application> 60 </application>
@@ -14,7 +14,6 @@ import android.support.v4.app.FragmentActivity; @@ -14,7 +14,6 @@ import android.support.v4.app.FragmentActivity;
14 import android.support.v4.app.FragmentManager; 14 import android.support.v4.app.FragmentManager;
15 import android.support.v4.app.FragmentTransaction; 15 import android.support.v4.app.FragmentTransaction;
16 import android.support.v7.app.AlertDialog; 16 import android.support.v7.app.AlertDialog;
17 -import android.support.v7.app.AppCompatActivity;  
18 import android.text.TextUtils; 17 import android.text.TextUtils;
19 import android.util.DisplayMetrics; 18 import android.util.DisplayMetrics;
20 import android.util.Log; 19 import android.util.Log;
@@ -43,6 +42,7 @@ import com.mang.xdy.demo.adapter.SimpleFragmentPagerAdapter; @@ -43,6 +42,7 @@ import com.mang.xdy.demo.adapter.SimpleFragmentPagerAdapter;
43 import com.mang.xdy.demo.bean.ErrorEntity; 42 import com.mang.xdy.demo.bean.ErrorEntity;
44 import com.mang.xdy.demo.bean.InitClassSuccessEntity; 43 import com.mang.xdy.demo.bean.InitClassSuccessEntity;
45 import com.mang.xdy.demo.bean.JoinClass; 44 import com.mang.xdy.demo.bean.JoinClass;
  45 +import com.mang.xdy.demo.bean.ProcessVideoOrAudioByTeacherEntity;
46 import com.mang.xdy.demo.bean.ResponseEntity; 46 import com.mang.xdy.demo.bean.ResponseEntity;
47 import com.mang.xdy.demo.bean.TimeEntity; 47 import com.mang.xdy.demo.bean.TimeEntity;
48 import com.mang.xdy.demo.bean.VideoOrAudioStopEntity; 48 import com.mang.xdy.demo.bean.VideoOrAudioStopEntity;
@@ -50,7 +50,6 @@ import com.mang.xdy.demo.fragment.ChatFragment; @@ -50,7 +50,6 @@ import com.mang.xdy.demo.fragment.ChatFragment;
50 import com.mang.xdy.demo.fragment.DocFragment; 50 import com.mang.xdy.demo.fragment.DocFragment;
51 import com.mang.xdy.demo.utils.JsonUtil; 51 import com.mang.xdy.demo.utils.JsonUtil;
52 import com.mang.xdy.demo.utils.ToastUtil; 52 import com.mang.xdy.demo.utils.ToastUtil;
53 -import com.mang.xdy.demo.widget.answersheet.AnswerSheetView;  
54 import com.mang.xdy.demo.widget.dialog.LoginDialog; 53 import com.mang.xdy.demo.widget.dialog.LoginDialog;
55 import com.mang.xdy.demo.widget.view.NoScrollViewPager; 54 import com.mang.xdy.demo.widget.view.NoScrollViewPager;
56 import com.mang.xdy.listener.ObserverListener; 55 import com.mang.xdy.listener.ObserverListener;
@@ -224,6 +223,17 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -224,6 +223,17 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
224 case Constants.RECORD_PLAYBACK_UPDATE: 223 case Constants.RECORD_PLAYBACK_UPDATE:
225 handleRecord(responseEntity.getParam()); 224 handleRecord(responseEntity.getParam());
226 break; 225 break;
  226 + case Constants.VIDEO_BROADCAST:
  227 + if(!replay) {
  228 + processVideoOrAudioByTeacher(responseEntity.getParam(),true);
  229 + }
  230 + break;
  231 + case Constants.AUDIO_BROADCAST:
  232 + if(!replay) {
  233 + processVideoOrAudioByTeacher(responseEntity.getParam(),false);
  234 + }
  235 + break;
  236 +
227 237
228 238
229 } 239 }
@@ -279,18 +289,8 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -279,18 +289,8 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
279 mFramenLayout_stopPublish.setOnClickListener(new View.OnClickListener() { 289 mFramenLayout_stopPublish.setOnClickListener(new View.OnClickListener() {
280 @Override 290 @Override
281 public void onClick(View v) { 291 public void onClick(View v) {
282 - if (isPublsishVideoMode) {  
283 - xdySdk.api("stopPublishVideo", "");  
284 - } else {  
285 - xdySdk.api("stopPublishAudio", "");  
286 - } 292 + stopPublish();
287 293
288 - fra_videoPlay_start.setEnabled(true);  
289 - mFramenLayout_stopPublish.setEnabled(false);  
290 - mFramenLayout_stopPublish.setVisibility(View.GONE);  
291 - fra_videoPlay_start.setVisibility(View.VISIBLE);  
292 - surfaceView_publish.setVisibility(View.GONE);  
293 - mIamgeView_PublishAudio.setVisibility(View.GONE);  
294 } 294 }
295 }); 295 });
296 296
@@ -298,7 +298,11 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -298,7 +298,11 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
298 @Override 298 @Override
299 public void onClick(View v) { 299 public void onClick(View v) {
300 // 300 //
301 - showSelectPublishMode(); 301 + if(isTablet(VideoPlayActivity.this)){
  302 + publishVideo();
  303 + }else {
  304 + showSelectPublishMode();
  305 + }
302 // AnswerSheetDialog answerSheetDialog= new AnswerSheetDialog(VideoPlayActivity.this); 306 // AnswerSheetDialog answerSheetDialog= new AnswerSheetDialog(VideoPlayActivity.this);
303 // answerSheetDialog.builder().show(); 307 // answerSheetDialog.builder().show();
304 // new AnswerSheetDialog(VideoPlayActivity.this).builder().show(); 308 // new AnswerSheetDialog(VideoPlayActivity.this).builder().show();
@@ -351,16 +355,18 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -351,16 +355,18 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
351 @Override 355 @Override
352 public void onClick(int which) { 356 public void onClick(int which) {
353 //填写事件 357 //填写事件
354 - mFramenLayout_stopPublish.setVisibility(View.VISIBLE);  
355 - fra_videoPlay_start.setVisibility(View.GONE);  
356 - surfaceView_publish.setVisibility(View.VISIBLE);  
357 - fra_videoPlay_start.setEnabled(false);  
358 - mFramenLayout_stopPublish.setEnabled(true);  
359 - sh = surfaceView_publish.getHolder();  
360 - sh.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);  
361 - surfaceView_publish.setZOrderMediaOverlay(true);  
362 - xdySdk.api("publishVideo", "", surfaceView_publish, VideoPlayActivity.this);  
363 - isPublsishVideoMode = true; 358 +// coverStudent(true);
  359 +// mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
  360 +// fra_videoPlay_start.setVisibility(View.GONE);
  361 +// surfaceView_publish.setVisibility(View.VISIBLE);
  362 +// fra_videoPlay_start.setEnabled(false);
  363 +// mFramenLayout_stopPublish.setEnabled(true);
  364 +// sh = surfaceView_publish.getHolder();
  365 +// sh.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
  366 +// surfaceView_publish.setZOrderMediaOverlay(true);
  367 +// xdySdk.api("publishVideo", "", surfaceView_publish, VideoPlayActivity.this);
  368 +// isPublsishVideoMode = true;
  369 + publishVideo();
364 } 370 }
365 }) 371 })
366 .addSheetItem(getResources().getString(R.string.home_dialog_pushAudio), ActionSheetDialog.SheetItemColor.Blue 372 .addSheetItem(getResources().getString(R.string.home_dialog_pushAudio), ActionSheetDialog.SheetItemColor.Blue
@@ -368,14 +374,16 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -368,14 +374,16 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
368 @Override 374 @Override
369 public void onClick(int which) { 375 public void onClick(int which) {
370 //填写事件 376 //填写事件
371 - mFramenLayout_stopPublish.setVisibility(View.VISIBLE);  
372 - fra_videoPlay_start.setVisibility(View.GONE);  
373 - surfaceView_publish.setVisibility(View.GONE);  
374 - mIamgeView_PublishAudio.setVisibility(View.VISIBLE);  
375 - fra_videoPlay_start.setEnabled(false);  
376 - mFramenLayout_stopPublish.setEnabled(true);  
377 - xdySdk.api(Constants.PUBLISH_AUDIO, "", null, VideoPlayActivity.this);  
378 - isPublsishVideoMode = false; 377 +// coverStudent(true);
  378 +// mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
  379 +// fra_videoPlay_start.setVisibility(View.GONE);
  380 +// surfaceView_publish.setVisibility(View.GONE);
  381 +// mIamgeView_PublishAudio.setVisibility(View.VISIBLE);
  382 +// fra_videoPlay_start.setEnabled(false);
  383 +// mFramenLayout_stopPublish.setEnabled(true);
  384 +// xdySdk.api(Constants.PUBLISH_AUDIO, "", null, VideoPlayActivity.this);
  385 +// isPublsishVideoMode = false;
  386 + publishAudio();
379 } 387 }
380 }) 388 })
381 .addSheetItem("单选或者多选", ActionSheetDialog.SheetItemColor.Blue 389 .addSheetItem("单选或者多选", ActionSheetDialog.SheetItemColor.Blue
@@ -589,6 +597,27 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -589,6 +597,27 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
589 ToastUtil.showToastshort(getResources().getString(R.string.home_msg_play_audio_init), VideoPlayActivity.this); 597 ToastUtil.showToastshort(getResources().getString(R.string.home_msg_play_audio_init), VideoPlayActivity.this);
590 } 598 }
591 } 599 }
  600 + /*教师端主动开始视频,或关闭视频*/
  601 + public void processVideoOrAudioByTeacher(String parameter,boolean video){
  602 + ProcessVideoOrAudioByTeacherEntity entity=JsonUtil.parseJsonToBean(parameter,ProcessVideoOrAudioByTeacherEntity.class);
  603 + if(entity!=null&&entity.getToNodeId()!=0){
  604 + switch (entity.getActionType()){
  605 + case 1:
  606 + //开启
  607 + if(video) {
  608 + publishVideo();
  609 + }else {
  610 + publishAudio();
  611 + }
  612 + break;
  613 + case 2:
  614 + //关闭
  615 + stopPublish();
  616 + break;
  617 +
  618 + }
  619 + }
  620 + }
592 621
593 @Override 622 @Override
594 public void onBackPressed() { 623 public void onBackPressed() {
@@ -1305,29 +1334,94 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -1305,29 +1334,94 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
1305 1334
1306 1335
1307 /********************************平板*********************************************************/ 1336 /********************************平板*********************************************************/
1308 - 1337 + private LinearLayout llvideoPlayright;
  1338 + private FrameLayout fra_videoPlay_student_cover;
  1339 + /*打开音频*/
  1340 + private FrameLayout fra_videoPlay_start_audio;
  1341 + /*推流*/
  1342 + private RelativeLayout rel_videoPlay_publish;
1309 public void initTablet(){ 1343 public void initTablet(){
1310 if(!isTablet(this)){ 1344 if(!isTablet(this)){
1311 return; 1345 return;
1312 } 1346 }
  1347 + //如果是横排,则改为竖排
  1348 + if(getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
  1349 + {
  1350 + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
  1351 + }
1313 DisplayMetrics metric = new DisplayMetrics(); 1352 DisplayMetrics metric = new DisplayMetrics();
1314 this.getWindowManager().getDefaultDisplay().getMetrics(metric); 1353 this.getWindowManager().getDefaultDisplay().getMetrics(metric);
1315 int winWidth = metric.widthPixels; // 屏幕宽度(像素) 1354 int winWidth = metric.widthPixels; // 屏幕宽度(像素)
1316 int winHeight = metric.heightPixels; // 屏幕高度(像素) 1355 int winHeight = metric.heightPixels; // 屏幕高度(像素)
  1356 + int offset=30;//默认偏移
  1357 + double ratio_tablet=(winWidth*1.0)/winHeight;
  1358 + double ratio_width=4;
1317 llVideo_table_chat= (LinearLayout) findViewById(R.id.ll_videoPlay_tablet_chat); 1359 llVideo_table_chat= (LinearLayout) findViewById(R.id.ll_videoPlay_tablet_chat);
1318 - LinearLayout.LayoutParams layoutParams=new LinearLayout.LayoutParams(winWidth/4,winWidth/3);  
1319 - XdyLogUtil.e("学点云Tablet:",""+winWidth/3+"::"+winWidth/4+":"+winWidth);  
1320 - llVideo_table_chat.setLayoutParams(layoutParams);  
1321 - //如果是横排,则改为竖排  
1322 - if(getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)  
1323 - {  
1324 - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); 1360 + llvideoPlayright= (LinearLayout) findViewById(R.id.ll_videoPlay_right);
  1361 + fra_videoPlay_student_cover= (FrameLayout) findViewById(R.id.fra_videoPlay_student_cover);
  1362 + fra_videoPlay_start_audio= (FrameLayout) findViewById(R.id.fra_videoPlay_start_audio);
  1363 + rel_videoPlay_publish= (RelativeLayout) findViewById(R.id.rel_videoPlay_publish);
  1364 + if(replay){
  1365 + rel_videoPlay_publish.setVisibility(View.GONE);
  1366 + }else {
  1367 + rel_videoPlay_publish.setVisibility(View.VISIBLE);
  1368 + }
  1369 + if(ratio_tablet>1.4){
  1370 + //偏移尽量小,或者偏移不
  1371 + offset=30;
  1372 + ratio_width=4.5;
  1373 + }else{
  1374 + offset=75;
  1375 + ratio_width=4;
1325 } 1376 }
  1377 + XdyLogUtil.e("学点云Tablet:",""+winWidth/4+"::"+(5*winWidth)/(16)+":"+winWidth+"offset:"+offset+"ratio_width:"+ratio_width);
  1378 + RelativeLayout.LayoutParams layoutParams_right=new RelativeLayout.LayoutParams((int) (winWidth/ratio_width), RelativeLayout.LayoutParams.MATCH_PARENT);
  1379 + layoutParams_right.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
  1380 + layoutParams_right.setMargins(0,0,XdyStringUtils.dp2px(this,5),0);
  1381 + llvideoPlayright.setLayoutParams(layoutParams_right);
  1382 +
  1383 + LinearLayout.LayoutParams layoutParams=new LinearLayout.LayoutParams((int)(winWidth/ratio_width),(int)(winWidth/ratio_width+offset));
  1384 + layoutParams.setMargins(0,XdyStringUtils.dp2px(this,8),0,0);
  1385 + llVideo_table_chat.setLayoutParams(layoutParams);
  1386 +
1326 FragmentManager fm = getSupportFragmentManager(); 1387 FragmentManager fm = getSupportFragmentManager();
1327 FragmentTransaction transaction = fm.beginTransaction(); 1388 FragmentTransaction transaction = fm.beginTransaction();
1328 transaction.add(R.id.ll_videoPlay_tablet_chat,ChatFragment.newInstance(replay),"tag"); 1389 transaction.add(R.id.ll_videoPlay_tablet_chat,ChatFragment.newInstance(replay),"tag");
1329 transaction.commit(); 1390 transaction.commit();
  1391 + setListenerPublishAudio();
  1392 + }
  1393 + /*打开音频*/
  1394 + public void setListenerPublishAudio(){
  1395 + fra_videoPlay_start_audio.setOnClickListener(new View.OnClickListener() {
  1396 + @Override
  1397 + public void onClick(View v) {
  1398 + publishAudio();
  1399 + }
  1400 + });
  1401 + }
  1402 + /*显示或隐藏Audio按钮*/
  1403 + public void tabletShowAudio(boolean show){
  1404 + if(!isTablet(this)){
  1405 + return;
  1406 + }
  1407 + if(show){
  1408 + fra_videoPlay_start_audio.setVisibility(View.GONE);
  1409 + }else{
  1410 + fra_videoPlay_start_audio.setVisibility(View.VISIBLE);
  1411 + }
  1412 + }
1330 1413
  1414 +
  1415 + /*显示或隐藏学生播放Cover*/
  1416 + public void coverStudent(boolean show){
  1417 + if(!isTablet(this)){
  1418 + return;
  1419 + }
  1420 + if(show) {
  1421 + fra_videoPlay_student_cover.setVisibility(View.GONE);
  1422 + }else{
  1423 + fra_videoPlay_student_cover.setVisibility(View.VISIBLE);
  1424 + }
1331 } 1425 }
1332 /** 1426 /**
1333 * 判断当前设备是手机还是平板,代码来自 Google I/O App for Android 1427 * 判断当前设备是手机还是平板,代码来自 Google I/O App for Android
@@ -1337,5 +1431,52 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe @@ -1337,5 +1431,52 @@ public class VideoPlayActivity extends FragmentActivity implements ObserverListe
1337 public static boolean isTablet(Context context) { 1431 public static boolean isTablet(Context context) {
1338 return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE; 1432 return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
1339 } 1433 }
1340 - 1434 +/******************************************************公共**********************************/
  1435 +
  1436 +
  1437 + /*播放视频*/
  1438 + public void publishVideo(){
  1439 + //填写事件
  1440 + coverStudent(true);
  1441 + tabletShowAudio(true);
  1442 + mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
  1443 + fra_videoPlay_start.setVisibility(View.GONE);
  1444 + surfaceView_publish.setVisibility(View.VISIBLE);
  1445 + fra_videoPlay_start.setEnabled(false);
  1446 + mFramenLayout_stopPublish.setEnabled(true);
  1447 + sh = surfaceView_publish.getHolder();
  1448 + sh.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
  1449 + surfaceView_publish.setZOrderMediaOverlay(true);
  1450 + xdySdk.api("publishVideo", "", surfaceView_publish, VideoPlayActivity.this);
  1451 + isPublsishVideoMode = true;
  1452 + }
  1453 + /*播放音频*/
  1454 + public void publishAudio(){
  1455 + coverStudent(true);
  1456 + tabletShowAudio(true);
  1457 + mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
  1458 + fra_videoPlay_start.setVisibility(View.GONE);
  1459 + surfaceView_publish.setVisibility(View.GONE);
  1460 + mIamgeView_PublishAudio.setVisibility(View.VISIBLE);
  1461 + fra_videoPlay_start.setEnabled(false);
  1462 + mFramenLayout_stopPublish.setEnabled(true);
  1463 + xdySdk.api(Constants.PUBLISH_AUDIO, "", null, VideoPlayActivity.this);
  1464 + isPublsishVideoMode = false;
  1465 + }
  1466 + /*停止推流*/
  1467 + public void stopPublish(){
  1468 + if (isPublsishVideoMode) {
  1469 + xdySdk.api("stopPublishVideo", "");
  1470 + } else {
  1471 + xdySdk.api("stopPublishAudio", "");
  1472 + }
  1473 + coverStudent(false);
  1474 + fra_videoPlay_start.setEnabled(true);
  1475 + mFramenLayout_stopPublish.setEnabled(false);
  1476 + mFramenLayout_stopPublish.setVisibility(View.GONE);
  1477 + fra_videoPlay_start.setVisibility(View.VISIBLE);
  1478 + surfaceView_publish.setVisibility(View.GONE);
  1479 + mIamgeView_PublishAudio.setVisibility(View.GONE);
  1480 + tabletShowAudio(false);
  1481 + }
1341 } 1482 }
  1 +package com.mang.xdy.demo.bean;
  2 +
  3 +/**
  4 + * 教师端主动开启视频
  5 + */
  6 +
  7 +public class ProcessVideoOrAudioByTeacherEntity {
  8 +
  9 + /**
  10 + * fromNodeId : 663230246
  11 + * toNodeId : 565646
  12 + * actionType : 1
  13 + * data : 开始视频推流1487675015981
  14 + */
  15 +
  16 + private int fromNodeId;
  17 + private int toNodeId;
  18 + private int actionType;
  19 + private String data;
  20 +
  21 + public int getFromNodeId() {
  22 + return fromNodeId;
  23 + }
  24 +
  25 + public void setFromNodeId(int fromNodeId) {
  26 + this.fromNodeId = fromNodeId;
  27 + }
  28 +
  29 + public int getToNodeId() {
  30 + return toNodeId;
  31 + }
  32 +
  33 + public void setToNodeId(int toNodeId) {
  34 + this.toNodeId = toNodeId;
  35 + }
  36 +
  37 + public int getActionType() {
  38 + return actionType;
  39 + }
  40 +
  41 + public void setActionType(int actionType) {
  42 + this.actionType = actionType;
  43 + }
  44 +
  45 + public String getData() {
  46 + return data;
  47 + }
  48 +
  49 + public void setData(String data) {
  50 + this.data = data;
  51 + }
  52 +}
@@ -467,7 +467,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V @@ -467,7 +467,7 @@ public class CanvasView extends SurfaceView implements SurfaceHolder.Callback, V
467 this.setOnTouchListener(this); 467 this.setOnTouchListener(this);
468 // 设置背景为透明 否则是黑色 468 // 设置背景为透明 否则是黑色
469 this.setZOrderOnTop(true); 469 this.setZOrderOnTop(true);
470 - this.getHolder().setFormat(PixelFormat.TRANSPARENT); 470 + this.getHolder().setFormat(PixelFormat.TRANSLUCENT);
471 // this.setZOrderMediaOverlay(true); 471 // this.setZOrderMediaOverlay(true);
472 472
473 screenWidth = DisplayUtil.getScreenWidth(getContext()); 473 screenWidth = DisplayUtil.getScreenWidth(getContext());
  1 +package com.mang.xdy.demo.widget.dialog;
  2 +
  3 +import android.app.Dialog;
  4 +import android.content.Context;
  5 +import android.graphics.Color;
  6 +import android.os.CountDownTimer;
  7 +import android.view.Display;
  8 +import android.view.Gravity;
  9 +import android.view.LayoutInflater;
  10 +import android.view.View;
  11 +import android.view.ViewGroup;
  12 +import android.view.Window;
  13 +import android.view.WindowManager;
  14 +import android.widget.CheckBox;
  15 +import android.widget.ImageView;
  16 +import android.widget.LinearLayout;
  17 +import android.widget.RadioButton;
  18 +import android.widget.RelativeLayout;
  19 +import android.widget.ScrollView;
  20 +import android.widget.TextView;
  21 +
  22 +import com.mang.xdy.demo.R;
  23 +import com.mang.xdy.demo.utils.ToastUtil;
  24 +import com.mang.xdy.utils.XdyLogUtil;
  25 +import com.mang.xdy.utils.XdyStringUtils;
  26 +
  27 +import butterknife.BindView;
  28 +import butterknife.ButterKnife;
  29 +import butterknife.OnClick;
  30 +
  31 +
  32 +/**
  33 + * Created by abao on 2017/5/9.
  34 + */
  35 +
  36 +public class AnswerSheetDialog {
  37 +
  38 + /*单选多选类型*/
  39 + public final static int ANSWER_TYPE_SINGLE_OR_MORE = 1;
  40 + /*对错类型*/
  41 + public final static int ANSWER_TYPE_RIGHT_OR_WRONG = 2;
  42 + /*填空*/
  43 + public final static int ANSWER_TYPE_FILLING = 3;
  44 + /*单前的type*/
  45 + private static int ANSWER_CURRENT_TYPE = 1;
  46 + /*倒计时时间 s*/
  47 + public static int ANSWER_TIMEOUT = 30;
  48 + @BindView(R.id.tv_exam_countdown)
  49 + TextView tvExamCountdown;
  50 + @BindView(R.id.rel_home_tv_exam_countdown)
  51 + RelativeLayout relHomeTvExamCountdown;
  52 + @BindView(R.id.cb_exam_A)
  53 + CheckBox cbExamA;
  54 + @BindView(R.id.cb_exam_B)
  55 + CheckBox cbExamB;
  56 + @BindView(R.id.cb_exam_C)
  57 + CheckBox cbExamC;
  58 + @BindView(R.id.cb_exam_D)
  59 + CheckBox cbExamD;
  60 + @BindView(R.id.ll_exam_SingleOrMore)
  61 + LinearLayout llExamSingleOrMore;
  62 + @BindView(R.id.rb_exam_R)
  63 + RadioButton rbExamR;
  64 + @BindView(R.id.rb_exam_W)
  65 + RadioButton rbExamW;
  66 + @BindView(R.id.ll_exam_selectRightOrWrong)
  67 + LinearLayout llExamSelectRightOrWrong;
  68 + @BindView(R.id.ll_exam_filling)
  69 + LinearLayout llExamFilling;
  70 + @BindView(R.id.tv_exam_up)
  71 + TextView tvExamUp;
  72 + @BindView(R.id.tv_exam_cancle)
  73 + TextView tvExamCancle;
  74 + @BindView(R.id.ll_exam_submit)
  75 + LinearLayout llExamSubmit;
  76 + @BindView(R.id.rel_exam_layout)
  77 + RelativeLayout relExamLayout;
  78 + @BindView(R.id.ll_exam_answer)
  79 + LinearLayout llExamAnswer;
  80 + @BindView(R.id.ll_exam_Myanswer)
  81 + LinearLayout llExamMyanswer;
  82 + @BindView(R.id.ll_exam_Correctanswer)
  83 + LinearLayout llExamCorrectanswer;
  84 + @BindView(R.id.cb_exam_spreadOrfold)
  85 + CheckBox cbxamSpreadOrfold;
  86 + @BindView(R.id.ll_exam_spreadOrfold)
  87 + LinearLayout llExamSpreadOrfold;
  88 +
  89 + private AnswerCount mAnswerCount;
  90 +
  91 + private StringBuffer sb = new StringBuffer();
  92 + private Context mContext;
  93 + private String character_close = "关闭";
  94 + private String character_cancle = "放弃";
  95 +
  96 + private OnAnswerLayoutChangeListener onAnswerLayoutChangeListener;
  97 +
  98 + public interface OnAnswerLayoutChangeListener {
  99 + /**
  100 + * 改变显示布局的大小
  101 + *
  102 + * @param
  103 + */
  104 + void setAnswerSheetFramLayout(int num);
  105 +
  106 + void setAnswerSheetNormal(int num);
  107 + }
  108 +
  109 + public void setOnAnswerLayoutChangeListener(OnAnswerLayoutChangeListener onAnswerLayoutChangeListener) {
  110 + this.onAnswerLayoutChangeListener = onAnswerLayoutChangeListener;
  111 + }
  112 +
  113 + private Dialog dialog;
  114 + private TextView txt_title;
  115 + private TextView txt_cancel;
  116 + private LinearLayout lLayout_content;
  117 + private ScrollView sLayout_content;
  118 + private boolean showTitle = false;
  119 + // private List<ActionSheetDialog.SheetItem> sheetItemList;
  120 + private Display display;
  121 +
  122 + public AnswerSheetDialog(Context context) {
  123 + this.mContext = context;
  124 + WindowManager windowManager = (WindowManager) context
  125 + .getSystemService(Context.WINDOW_SERVICE);
  126 + display = windowManager.getDefaultDisplay();
  127 + }
  128 +
  129 + public AnswerSheetDialog builder() {
  130 + View view = LayoutInflater.from(mContext).inflate(
  131 + R.layout.item_answer, null);
  132 + ButterKnife.bind(this, view);
  133 + view.setMinimumWidth(display.getWidth());
  134 +
  135 + dialog = new Dialog(mContext, R.style.AnswerSheetDialogStyle);
  136 + dialog.setContentView(view);
  137 + Window dialogWindow = dialog.getWindow();
  138 + dialogWindow.setGravity(Gravity.LEFT | Gravity.BOTTOM);
  139 + WindowManager.LayoutParams lp = dialogWindow.getAttributes();
  140 + lp.x = 0;
  141 + lp.y = 0;
  142 + dialogWindow.setAttributes(lp);
  143 + return this;
  144 + }
  145 +
  146 + public void show() {
  147 + dialog.show();
  148 + }
  149 +
  150 +
  151 + /*选择答题类型*/
  152 + public void selectAnswerSheetType(int type) {
  153 +
  154 + tvExamCountdown.setText("_s");
  155 + llExamAnswer.setVisibility(View.GONE);
  156 + tvExamUp.setVisibility(View.VISIBLE);
  157 + tvExamCancle.setText(character_cancle);
  158 +// llExamSubmit.setLayoutParams(new RelativeLayout.LayoutParams(XdyStringUtils.dp2px(mContext,100), RelativeLayout.LayoutParams.MATCH_PARENT));
  159 + switch (type) {
  160 + case ANSWER_TYPE_SINGLE_OR_MORE:
  161 + ANSWER_CURRENT_TYPE = ANSWER_TYPE_SINGLE_OR_MORE;
  162 + llExamSingleOrMore.setVisibility(View.VISIBLE);
  163 + llExamSelectRightOrWrong.setVisibility(View.GONE);
  164 + llExamFilling.setVisibility(View.GONE);
  165 + break;
  166 + case ANSWER_TYPE_RIGHT_OR_WRONG:
  167 + ANSWER_CURRENT_TYPE = ANSWER_TYPE_RIGHT_OR_WRONG;
  168 + llExamSingleOrMore.setVisibility(View.GONE);
  169 + llExamSelectRightOrWrong.setVisibility(View.VISIBLE);
  170 + llExamFilling.setVisibility(View.GONE);
  171 + break;
  172 + case ANSWER_TYPE_FILLING:
  173 + ANSWER_CURRENT_TYPE = ANSWER_TYPE_FILLING;
  174 + llExamSingleOrMore.setVisibility(View.GONE);
  175 + llExamSelectRightOrWrong.setVisibility(View.GONE);
  176 + llExamFilling.setVisibility(View.VISIBLE);
  177 + break;
  178 +
  179 + }
  180 + }
  181 +
  182 + @OnClick({R.id.tv_exam_up, R.id.tv_exam_cancle,R.id.cb_exam_spreadOrfold})
  183 + public void onViewClicked(View view) {
  184 + switch (view.getId()) {
  185 + case R.id.tv_exam_up:
  186 + //提交需要获取结果,清除数据,时间清理
  187 +// relExamLayout.setVisibility(GONE);
  188 + handleAnswer(ANSWER_CURRENT_TYPE);
  189 + ToastUtil.showToastshort("选择答案:" + sb.toString() + sb.length(), mContext);
  190 + recoverStatus();
  191 + setSubmitAnswer();
  192 + break;
  193 + case R.id.tv_exam_cancle:
  194 + recoverStatus();
  195 + if (relExamLayout.isShown()) {
  196 + relExamLayout.setVisibility(View.GONE);
  197 + }
  198 + if (dialog != null) {
  199 + dialog.dismiss();
  200 + }
  201 + break;
  202 + case R.id.cb_exam_spreadOrfold:
  203 +// imgExamSpreadOrfold.setImageResource(R.mipmap.foldback);
  204 + break;
  205 + }
  206 + }
  207 +
  208 + /*开始倒计时*/
  209 + public void startCountTimerAndResizeLayout(int time, int dimens) {
  210 + ANSWER_TIMEOUT = time;
  211 + cancleCountTimer();
  212 + mAnswerCount = new AnswerCount(ANSWER_TIMEOUT * 1000, 1000);
  213 + mAnswerCount.start();
  214 + //提交需要获取结果,清除数据,时间清理
  215 + relExamLayout.setVisibility(View.VISIBLE);
  216 + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, XdyStringUtils.dp2px(mContext, dimens));
  217 + relExamLayout.setLayoutParams(layoutParams);
  218 +
  219 + }
  220 +
  221 + /*销毁倒计时*/
  222 + public void cancleCountTimer() {
  223 + if (mAnswerCount != null) {
  224 + mAnswerCount.cancel();
  225 + }
  226 + }
  227 +
  228 + /**
  229 + * 处理结果,拼装答案
  230 + *
  231 + * @param type
  232 + */
  233 + public void handleAnswer(int type) {
  234 + switch (type) {
  235 + case ANSWER_TYPE_SINGLE_OR_MORE:
  236 + handleSingleOrMore();
  237 + break;
  238 + case ANSWER_TYPE_RIGHT_OR_WRONG:
  239 + handleRightOrWrong();
  240 + break;
  241 + case ANSWER_TYPE_FILLING:
  242 +
  243 + break;
  244 + }
  245 +
  246 + }
  247 +
  248 + /*单选,多选答案拼接*/
  249 + public void handleSingleOrMore() {
  250 + sb.setLength(0);
  251 + if (cbExamA.isChecked()) {
  252 + sb.append("A");
  253 + }
  254 + if (cbExamB.isChecked()) {
  255 + sb.append("B");
  256 + }
  257 + if (cbExamC.isChecked()) {
  258 + sb.append("C");
  259 + }
  260 + if (cbExamD.isChecked()) {
  261 + sb.append("D");
  262 + }
  263 +
  264 + }
  265 +
  266 + /*处理对错*/
  267 + public void handleRightOrWrong() {
  268 + sb.setLength(0);
  269 + if (rbExamR.isChecked()) {
  270 + sb.append("对");
  271 + } else {
  272 + sb.append("错");
  273 + }
  274 +
  275 + }
  276 +
  277 + /*恢复状态*/
  278 + public void recoverStatus() {
  279 + switch (ANSWER_CURRENT_TYPE) {
  280 + case ANSWER_TYPE_SINGLE_OR_MORE:
  281 + cbExamA.setChecked(false);
  282 + cbExamB.setChecked(false);
  283 + cbExamC.setChecked(false);
  284 + cbExamD.setChecked(false);
  285 + break;
  286 + case ANSWER_TYPE_RIGHT_OR_WRONG:
  287 + rbExamR.setChecked(true);
  288 + rbExamW.setChecked(false);
  289 + break;
  290 + case ANSWER_TYPE_FILLING:
  291 + break;
  292 + }
  293 + }
  294 +
  295 + /*隐藏所有题目*/
  296 + private void hideAllTitle() {
  297 + llExamSingleOrMore.setVisibility(View.GONE);
  298 + llExamSelectRightOrWrong.setVisibility(View.GONE);
  299 + llExamFilling.setVisibility(View.GONE);
  300 + }
  301 +
  302 + /*设置显示答案布局大小*/
  303 + public void setAnswerLayout(int num) {
  304 + if (onAnswerLayoutChangeListener != null) {
  305 + onAnswerLayoutChangeListener.setAnswerSheetFramLayout(num);
  306 + }
  307 +
  308 +// RelativeLayout.LayoutParams layoutParams=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT,XdyStringUtils.dp2px(mContext,num));
  309 +// llExamAnswer.setLayoutParams(layoutParams);
  310 +
  311 + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, XdyStringUtils.dp2px(mContext, num));
  312 + relExamLayout.setLayoutParams(layoutParams);
  313 + llExamAnswer.setVisibility(View.VISIBLE);
  314 + //改变取消按钮布局大小
  315 + RelativeLayout.LayoutParams layoutParams_submit = new RelativeLayout.LayoutParams(XdyStringUtils.dp2px(mContext, 50), RelativeLayout.LayoutParams.MATCH_PARENT);
  316 + layoutParams_submit.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
  317 + llExamSubmit.setLayoutParams(layoutParams_submit);
  318 +
  319 + }
  320 +
  321 + /*设置显示答案布局大小*/
  322 + public void setAnsNormalLayout(int num) {
  323 + if (onAnswerLayoutChangeListener != null) {
  324 + onAnswerLayoutChangeListener.setAnswerSheetNormal(num);
  325 + }
  326 + }
  327 +
  328 + /*提交答案 设置*/
  329 + private void setSubmitAnswer() {
  330 + hideAllTitle();
  331 + cancleCountTimer();
  332 + tvExamUp.setVisibility(View.GONE);
  333 + tvExamCancle.setText(character_close);
  334 + setAnswerLayout(100);
  335 + char[] myAnswer = new char[sb.length()];
  336 + for (int i = 0; i < sb.length(); i++) {
  337 + myAnswer[i] = sb.charAt(i);
  338 + }
  339 + showAnswer(myAnswer, myAnswer);
  340 +
  341 + }
  342 +
  343 + /*设置答案*/
  344 + public void showAnswer(char[] myAnswer, char[] currectAnswer) {
  345 + llExamMyanswer.removeAllViews();
  346 + llExamCorrectanswer.removeAllViews();
  347 + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
  348 + LinearLayout.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
  349 + layoutParams.setMargins(5, 0, 5, 0);
  350 + for (int i = 0; i < myAnswer.length; i++) {
  351 + TextView textView = new TextView(mContext);
  352 + textView.setBackgroundResource(R.drawable.shape_bg_circle_answer_normal);
  353 + textView.setText(myAnswer[i] + "");
  354 + textView.setTextSize(15);
  355 + XdyLogUtil.e("答题卡,单双选择:", "" + XdyStringUtils.dp2px(mContext, 12));
  356 + textView.setTextColor(Color.WHITE);
  357 + textView.setGravity(Gravity.CENTER);
  358 +
  359 + textView.setLayoutParams(layoutParams);
  360 + llExamMyanswer.addView(textView);
  361 +
  362 + }
  363 +
  364 +
  365 + for (int i = 0; i < currectAnswer.length; i++) {
  366 + TextView textView = new TextView(mContext);
  367 + textView.setBackgroundResource(R.drawable.shape_bg_circle_answer_red);
  368 + textView.setText(currectAnswer[i] + "");
  369 + textView.setTextSize(15);
  370 + textView.setGravity(Gravity.CENTER);
  371 + textView.setTextColor(Color.WHITE);
  372 + textView.setLayoutParams(layoutParams);
  373 + llExamCorrectanswer.addView(textView);
  374 +
  375 + }
  376 + }
  377 +
  378 + @OnClick(R.id.ll_exam_answer)
  379 + public void onViewClicked() {
  380 + }
  381 +
  382 + /*倒计时处理*/
  383 + class AnswerCount extends CountDownTimer {
  384 +
  385 + /**
  386 + * @param millisInFuture The number of millis in the future from the call
  387 + * to {@link #start()} until the countdown is done and {@link #onFinish()}
  388 + * is called.
  389 + * @param countDownInterval The interval along the way to receive
  390 + * {@link #onTick(long)} callbacks.
  391 + */
  392 + public AnswerCount(long millisInFuture, long countDownInterval) {
  393 + super(millisInFuture, countDownInterval);
  394 + }
  395 +
  396 + @Override
  397 + public void onTick(long millisUntilFinished) {
  398 + if (millisUntilFinished < 10) {
  399 + tvExamCountdown.setText(" " + millisUntilFinished / 1000 + "s");
  400 + } else {
  401 + tvExamCountdown.setText(millisUntilFinished / 1000 + "s");
  402 + }
  403 +
  404 + }
  405 +
  406 + @Override
  407 + public void onFinish() {
  408 + //这个结束应该做自动提交答案的工作
  409 + tvExamCountdown.setText("0s");
  410 + }
  411 + }
  412 +}
  413 +
  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/activity_main"
  5 + android:layout_width="match_parent"
  6 + android:layout_height="match_parent"
  7 + android:orientation="vertical"
  8 + tools:context="com.mang.xdy.demo.MainActivity">
  9 + <RelativeLayout
  10 + android:id="@+id/rl_home_close"
  11 + android:layout_width="@dimen/ui_DIMEN_98.0PX"
  12 + android:layout_height="@dimen/ui_DIMEN_98.0PX">
  13 +
  14 + <ImageView
  15 + style="@style/ui_wrap_wrap"
  16 + android:layout_centerInParent="true"
  17 + android:src="@mipmap/close"/>
  18 + </RelativeLayout>
  19 +
  20 + <ImageView
  21 + android:id="@+id/iv_logo"
  22 + android:layout_width="wrap_content"
  23 + android:layout_height="wrap_content"
  24 + android:layout_gravity="center_horizontal"
  25 + android:layout_centerHorizontal="true"
  26 + android:layout_marginTop="@dimen/ui_DIMEN_24.0PX"
  27 + android:src="@mipmap/logo_home"/>
  28 +
  29 +
  30 + <RelativeLayout
  31 + android:id="@+id/rl_classid"
  32 + style="@style/home_input_style"
  33 + android:layout_marginTop="@dimen/ui_DIMEN_80.0PX">
  34 +
  35 + <TextView
  36 + android:id="@+id/tv_home_classid"
  37 + style="@style/home_input_title_style"
  38 + android:layout_centerVertical="true"
  39 + android:text="@string/home_classid_hint"/>
  40 +
  41 + <android.support.v7.widget.AppCompatEditText
  42 + android:id="@+id/edt_home_classId"
  43 + android:layout_toRightOf="@+id/tv_home_classid"
  44 + style="@style/home_input_edit_style"
  45 + android:hint="classId"
  46 + android:inputType="number"
  47 + android:text="118417229"/>
  48 +
  49 + <View
  50 + style="@style/ui_divider_line_horizontal"
  51 + android:layout_alignParentBottom="true"
  52 + android:background="#cccccc"/>
  53 + </RelativeLayout>
  54 +
  55 + <!--role-->
  56 + <RelativeLayout
  57 + android:id="@+id/rl_userrole"
  58 + style="@style/home_input_style"
  59 + android:layout_below="@id/rl_classid">
  60 +
  61 + <TextView
  62 + android:id="@+id/tv_home_userrole"
  63 + style="@style/home_input_title_style"
  64 + android:layout_centerVertical="true"
  65 + android:text="@string/home_role_hint"/>
  66 + <EditText
  67 + android:id="@+id/edt_home_role"
  68 + android:layout_toRightOf="@+id/tv_home_userrole"
  69 + style="@style/home_input_edit_style"
  70 + android:hint="role"
  71 + android:text="normal"
  72 + />
  73 + <View
  74 + style="@style/ui_divider_line_horizontal"
  75 + android:layout_alignParentBottom="true"
  76 + android:background="#cccccc"/>
  77 + </RelativeLayout>
  78 +
  79 + <!--portal-->
  80 + <RelativeLayout
  81 + android:id="@+id/rl_portal"
  82 + style="@style/home_input_style"
  83 + android:layout_below="@id/rl_userrole">
  84 +
  85 + <TextView
  86 + android:id="@+id/tv_home_portal"
  87 + style="@style/home_input_title_style"
  88 + android:layout_centerVertical="true"
  89 + android:text="@string/home_portal_hint"/>
  90 + <EditText
  91 + android:id="@+id/edt_home_serviceIp"
  92 + android:layout_toRightOf="@+id/tv_home_portal"
  93 + style="@style/home_input_edit_style"
  94 + android:hint="portal"
  95 + android:text="112.126.80.182:90"
  96 + />
  97 + <View
  98 + style="@style/ui_divider_line_horizontal"
  99 + android:layout_alignParentBottom="true"
  100 + android:background="#cccccc"/>
  101 + </RelativeLayout>
  102 +
  103 +
  104 + <!-- userid -->
  105 + <RelativeLayout
  106 + android:id="@+id/rl_userid"
  107 + style="@style/home_input_style"
  108 + android:layout_below="@id/rl_portal">
  109 +
  110 + <TextView
  111 + android:id="@+id/tv_home_userid"
  112 + style="@style/home_input_title_style"
  113 + android:layout_centerVertical="true"
  114 + android:text="@string/home_userid_hint"/>
  115 + <EditText
  116 + android:id="@+id/edt_home_userId"
  117 + android:layout_toRightOf="@+id/tv_home_userid"
  118 + style="@style/home_input_edit_style"
  119 + android:hint="userId"
  120 + android:text="0"
  121 + />
  122 + <View
  123 + style="@style/ui_divider_line_horizontal"
  124 + android:layout_alignParentBottom="true"
  125 + android:background="#cccccc"/>
  126 + </RelativeLayout>
  127 +
  128 + <Button
  129 + android:id="@+id/btn_home_enter_class"
  130 + android:layout_width="match_parent"
  131 + android:layout_height="wrap_content"
  132 + android:text="@string/home_enter_class"
  133 + android:textColor="@color/white"
  134 + android:background="@drawable/home_selector_bottom_btn_blue"
  135 + android:layout_marginLeft="20dp"
  136 + android:layout_marginRight="20dp"
  137 + android:layout_marginTop="55dp"
  138 + />
  139 + <Button
  140 + android:id="@+id/btn_home_enter_publisher"
  141 + android:layout_width="match_parent"
  142 + android:layout_height="wrap_content"
  143 + android:layout_marginTop="15dp"
  144 + android:layout_marginLeft="20dp"
  145 + android:layout_marginRight="20dp"
  146 + android:text="@string/home_enter_replay"
  147 + android:textColor="@color/white"
  148 + android:background="@drawable/home_selector_bottom_btn_green"
  149 + />
  150 +
  151 +</LinearLayout>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:my="http://schemas.android.com/apk/res-auto"
  4 + xmlns:tools="http://schemas.android.com/tools"
  5 + android:layout_width="match_parent"
  6 + android:layout_height="wrap_content"
  7 + android:orientation="vertical"
  8 + android:paddingLeft="@dimen/ui_DIMEN_24.0PX"
  9 + android:paddingRight="@dimen/ui_DIMEN_24.0PX">
  10 +
  11 + <TextView
  12 + android:id="@+id/chat_item_date"
  13 + android:layout_width="@dimen/ui_DIMEN_80.0PX"
  14 + android:layout_height="@dimen/ui_DIMEN_35.0PX"
  15 + android:layout_gravity="center_horizontal"
  16 + android:background="@drawable/home_chat_item_date_bg"
  17 + android:gravity="center"
  18 + android:textColor="@color/white"
  19 + android:textSize="@dimen/ui_DIMEN_22.0PX"
  20 + android:visibility="gone"/>
  21 +
  22 + <RelativeLayout
  23 + android:layout_width="match_parent"
  24 + android:layout_height="wrap_content"
  25 + android:layout_marginTop="@dimen/ui_DIMEN_6.0PX">
  26 +
  27 + <ImageView
  28 + android:id="@+id/chat_item_avatar"
  29 + style="@style/home_chat_item_avatar"
  30 + android:layout_alignParentRight="true"/>
  31 + <LinearLayout
  32 + android:id="@+id/ll_item_name_parent"
  33 + android:orientation="horizontal"
  34 + android:layout_marginRight="@dimen/ui_DIMEN_20.0PX"
  35 + android:layout_toLeftOf="@id/chat_item_avatar"
  36 + android:layout_width="wrap_content"
  37 + android:layout_height="wrap_content">
  38 +
  39 + <TextView
  40 + android:id="@+id/chat_item_name"
  41 + android:layout_width="wrap_content"
  42 + android:layout_height="wrap_content"
  43 + android:text=""
  44 + android:textColor="@color/COLOR_808080"
  45 + android:textSize="@dimen/ui_DIMEN_22.0PX"/>
  46 + <TextView
  47 + android:id="@+id/chat_item_taacher_bg"
  48 + android:textColor="@color/white"
  49 + android:text="老师"
  50 + android:visibility="gone"
  51 + android:paddingLeft="@dimen/ui_DIMEN_10.0PX"
  52 + android:paddingRight="@dimen/ui_DIMEN_10.0PX"
  53 + android:gravity="center"
  54 + android:layout_marginLeft="@dimen/ui_DIMEN_8.0PX"
  55 + android:textSize="@dimen/ui_DIMEN_20.0PX"
  56 + android:background="@drawable/home_chat_teacher_bg"
  57 + android:layout_width="wrap_content"
  58 + android:layout_height="wrap_content" />
  59 + </LinearLayout>
  60 +
  61 + <RelativeLayout
  62 + android:id="@+id/chat_item_layout_content"
  63 + style="@style/home_chat_item_content"
  64 + android:layout_below="@id/ll_item_name_parent"
  65 + android:layout_centerVertical="true"
  66 + android:layout_marginRight="@dimen/ui_DIMEN_6.0PX"
  67 + android:layout_toLeftOf="@id/chat_item_avatar"
  68 + android:gravity="end">
  69 +
  70 + <com.mang.xdy.demo.widget.emoji.EmoticonsTextView
  71 + android:id="@+id/chat_item_content_text"
  72 + style="@style/home_chat_item_text_content"
  73 + android:layout_centerVertical="true"
  74 + android:background="@drawable/chat_pop_send"
  75 + android:gravity="start|center_vertical"
  76 + android:textColor="@color/white"
  77 + android:includeFontPadding="false"
  78 + android:paddingLeft="@dimen/ui_DIMEN_10.0PX"
  79 + android:paddingRight="@dimen/ui_DIMEN_20.0PX"
  80 + tools:text=""
  81 + my:emojiconSize="@dimen/ui_DIMEN_40.0PX"/>
  82 +
  83 + <ImageView
  84 + android:id="@+id/chat_item_content_image"
  85 + style="@style/home_chat_item_image_content"/>
  86 + </RelativeLayout>
  87 +
  88 + <ImageView
  89 + android:id="@+id/chat_item_fail"
  90 + android:layout_width="25dp"
  91 + android:layout_height="25dp"
  92 + android:layout_centerVertical="true"
  93 + android:layout_toLeftOf="@+id/chat_item_layout_content"
  94 + android:background="@mipmap/msg_state_fail_resend"
  95 + android:focusable="false"
  96 + android:visibility="gone"/>
  97 +
  98 + <ProgressBar
  99 + android:id="@+id/chat_item_progress"
  100 + style="@android:style/Widget.ProgressBar.Small.Inverse"
  101 + android:layout_width="wrap_content"
  102 + android:layout_height="wrap_content"
  103 + android:layout_centerVertical="true"
  104 + android:layout_toLeftOf="@+id/chat_item_layout_content"
  105 + android:visibility="gone"/>
  106 + </RelativeLayout>
  107 +
  108 +</LinearLayout>
  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:paddingLeft="10dp"
  6 + android:paddingRight="10dp">
  7 +
  8 + <LinearLayout
  9 + android:id="@+id/chat_menu_images"
  10 + android:layout_width="wrap_content"
  11 + android:layout_height="wrap_content"
  12 + android:layout_marginLeft="10dp"
  13 + android:layout_marginRight="10dp"
  14 + android:layout_marginTop="10dp"
  15 + android:clickable="true"
  16 + android:focusable="false"
  17 + android:orientation="vertical">
  18 +
  19 + <ImageView
  20 + android:layout_width="wrap_content"
  21 + android:layout_height="wrap_content"
  22 + />
  23 +
  24 + <TextView
  25 + android:layout_width="wrap_content"
  26 + android:layout_height="wrap_content"
  27 + android:layout_gravity="center_horizontal"
  28 + android:layout_marginTop="5dp"
  29 + android:text="图片"/>
  30 + </LinearLayout>
  31 +
  32 + <LinearLayout
  33 + android:id="@+id/chat_menu_photo"
  34 + android:layout_width="wrap_content"
  35 + android:layout_height="wrap_content"
  36 + android:layout_marginLeft="10dp"
  37 + android:layout_marginRight="10dp"
  38 + android:layout_marginTop="10dp"
  39 + android:layout_toRightOf="@id/chat_menu_images"
  40 + android:clickable="true"
  41 + android:focusable="false"
  42 + android:orientation="vertical">
  43 +
  44 + <ImageView
  45 + android:layout_width="wrap_content"
  46 + android:layout_height="wrap_content"
  47 + />
  48 +
  49 + <TextView
  50 + android:layout_width="wrap_content"
  51 + android:layout_height="wrap_content"
  52 + android:layout_gravity="center_horizontal"
  53 + android:layout_marginTop="5dp"
  54 + android:text="拍照"/>
  55 + </LinearLayout>
  56 +
  57 +</RelativeLayout>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:app="http://schemas.android.com/apk/res-auto"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="wrap_content"
  6 + android:orientation="vertical">
  7 +
  8 + <RelativeLayout
  9 + android:id="@+id/messageToolBox"
  10 + android:layout_width="match_parent"
  11 + android:layout_height="@dimen/ui_DIMEN_96.0PX"
  12 + android:background="#f1f1f1"
  13 + android:orientation="horizontal">
  14 +
  15 + <ImageView
  16 + android:id="@+id/toolbox_btn_send"
  17 + android:layout_width="wrap_content"
  18 + android:layout_height="wrap_content"
  19 + android:layout_alignParentRight="true"
  20 + android:layout_centerVertical="true"
  21 + android:layout_marginLeft="@dimen/ui_DIMEN_24.0PX"
  22 + android:layout_marginRight="@dimen/ui_DIMEN_24.0PX"
  23 + android:src="@drawable/home_selector_chat_send_btn" />
  24 +
  25 + <!-- android:background="@drawable/selector_chat_more"-->
  26 + <CheckBox
  27 + android:id="@+id/toolbox_btn_more"
  28 + android:layout_width="35dp"
  29 + android:layout_height="35dp"
  30 + android:layout_marginLeft="2dp"
  31 + android:layout_marginRight="5dp"
  32 + android:layout_toRightOf="@+id/toolbox_btn_face"
  33 + android:visibility="gone"
  34 + android:button="@null"/>
  35 +
  36 + <com.mang.xdy.demo.widget.emoji.EmoticonsEditText
  37 + android:id="@+id/toolbox_et_message"
  38 + android:layout_width="match_parent"
  39 + android:layout_height="wrap_content"
  40 + android:layout_centerVertical="true"
  41 + android:layout_toLeftOf="@id/toolbox_btn_send"
  42 + android:layout_toRightOf="@+id/toolbox_btn_face"
  43 + android:background="@drawable/home_chat_input_bg"
  44 + android:inputType="textMultiLine"
  45 + android:maxHeight="@dimen/ui_DIMEN_68.0PX"
  46 + android:paddingLeft="@dimen/ui_DIMEN_8.0PX"
  47 + android:minHeight="@dimen/ui_DIMEN_68.0PX"
  48 + android:singleLine="false"
  49 + android:textSize="@dimen/ui_DIMEN_26.0PX" />
  50 +
  51 + <CheckBox
  52 + android:id="@+id/toolbox_btn_face"
  53 + android:layout_width="wrap_content"
  54 + android:layout_height="wrap_content"
  55 + android:layout_centerVertical="true"
  56 + android:layout_marginLeft="@dimen/ui_DIMEN_24.0PX"
  57 + android:layout_marginRight="@dimen/ui_DIMEN_24.0PX"
  58 + android:background="@drawable/home_selector_chat_emoji_btn"
  59 + android:button="@null" />
  60 +
  61 + <LinearLayout
  62 + android:id="@+id/ll_cover"
  63 + android:orientation="horizontal"
  64 + android:background="@color/transparent"
  65 + android:layout_width="match_parent"
  66 + android:layout_height="match_parent"/>
  67 +
  68 + </RelativeLayout>
  69 +
  70 + <RelativeLayout
  71 + android:id="@+id/toolbox_layout_face"
  72 + android:layout_width="match_parent"
  73 + android:layout_height="wrap_content"
  74 + android:visibility="gone">
  75 +
  76 + <android.support.v4.view.ViewPager
  77 + android:id="@+id/toolbox_pagers_face"
  78 + android:layout_width="match_parent"
  79 + android:layout_height="160dp"></android.support.v4.view.ViewPager>
  80 +
  81 + <com.mang.xdy.demo.widget.chat.PagerSlidingTabStrip
  82 + android:id="@+id/toolbox_tabs"
  83 + android:layout_width="match_parent"
  84 + android:layout_height="40dp"
  85 + android:layout_below="@+id/toolbox_pagers_face"
  86 + android:background="#ffffff"
  87 + android:visibility="visible"
  88 + app:home_pstsDividerColor="#a7a5a5"
  89 + app:home_pstsIndicatorColor="#ffffff"
  90 + app:home_pstsShouldExpand="true"
  91 + app:home_pstsTabPaddingLeftRight="14dip"
  92 + app:home_pstsUnderlineColor="#ffffff" />
  93 + </RelativeLayout>
  94 +</LinearLayout>
  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:layout_width="@dimen/ui_DIMEN_500.0PX"
  9 + android:layout_height="wrap_content"
  10 + android:layout_centerInParent="true"
  11 + android:background="@drawable/radius_solid_white_stroke_999"
  12 + android:gravity="center_horizontal"
  13 + android:orientation="vertical"
  14 + android:paddingBottom="@dimen/ui_DIMEN_20.0PX">
  15 +
  16 + <EditText
  17 + android:id="@+id/et_username"
  18 + style="@style/home_login_edit_style"
  19 + android:hint="@string/home_enter_username"/>
  20 +
  21 + <EditText
  22 + android:id="@+id/et_password"
  23 + style="@style/home_login_edit_style"
  24 + android:hint="@string/home_enter_password"
  25 + android:inputType="textPassword"
  26 + android:visibility="gone"/>
  27 +
  28 + <Button
  29 + android:id="@+id/btn_login"
  30 + style="@style/home_site_btn_style"
  31 + android:text="@string/home_enter_login"
  32 + android:textColor="@color/white"/>
  33 + </LinearLayout>
  34 +
  35 +</RelativeLayout>
  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="wrap_content">
  6 +
  7 + <ImageView
  8 + android:layout_width="match_parent"
  9 + android:layout_height="wrap_content"
  10 + android:background="@mipmap/gradient_play"/>
  11 +
  12 + <RelativeLayout
  13 + android:paddingLeft="@dimen/ui_DIMEN_20.0PX"
  14 + android:id="@+id/rl_operation_play"
  15 + android:layout_width="@dimen/ui_DIMEN_70.0PX"
  16 + android:layout_centerVertical="true"
  17 + android:layout_height="@dimen/ui_DIMEN_70.0PX">
  18 +
  19 + <ImageButton
  20 + android:layout_marginLeft="@dimen/ui_DIMEN_20.0PX"
  21 + android:id="@+id/iv_operation_play"
  22 + android:layout_width="wrap_content"
  23 + android:layout_centerInParent="true"
  24 + android:layout_height="wrap_content"
  25 + android:background="@null"
  26 + android:src="@mipmap/play"/>
  27 +
  28 + </RelativeLayout>
  29 + <RelativeLayout
  30 + android:id="@+id/rl_meadia_contriller_right"
  31 + android:gravity="center"
  32 + android:layout_toRightOf="@id/rl_operation_play"
  33 + android:layout_width="match_parent"
  34 + android:layout_marginTop="@dimen/ui_DIMEN_6.0PX"
  35 + android:layout_height="@dimen/ui_DIMEN_70.0PX">
  36 + <TextView
  37 + android:id="@+id/tv_current_time"
  38 + style="@style/ui_wrapTvBaseStyle"
  39 + android:minWidth="@dimen/ui_DIMEN_100.0PX"
  40 + android:textColor="@color/white"
  41 + android:gravity="end"
  42 + tools:text="12:00:12"/>
  43 +
  44 + <TextView
  45 + android:id="@+id/tv_end_time"
  46 + style="@style/ui_wrapTvBaseStyle"
  47 + android:layout_alignParentRight="true"
  48 + android:layout_marginRight="@dimen/ui_DIMEN_30.0PX"
  49 + android:textColor="@color/white"
  50 + tools:text="12:00"/>
  51 +
  52 + <SeekBar
  53 + android:id="@+id/sb_live"
  54 + style="@style/home_seek_bar"
  55 + android:layout_width="match_parent"
  56 + android:layout_height="wrap_content"
  57 + android:layout_toLeftOf="@id/tv_end_time"
  58 + android:layout_toRightOf="@id/tv_current_time"/>
  59 + </RelativeLayout>
  60 +
  61 +
  62 +</RelativeLayout>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:tool="http://schemas.android.com/tools"
  4 +
  5 + android:layout_width="match_parent"
  6 + tool:visibility="visible"
  7 + android:layout_height="match_parent"
  8 + android:orientation="vertical"
  9 + >
  10 + <LinearLayout
  11 + android:id="@+id/ll_exam_spreadOrfold"
  12 + android:layout_width="60dp"
  13 + android:layout_height="60dp"
  14 + android:layout_marginBottom="-20dp"
  15 + android:layout_gravity="right"
  16 + android:visibility="gone"
  17 + android:orientation="vertical">
  18 +
  19 + </LinearLayout>
  20 + <CheckBox
  21 + android:id="@+id/cb_exam_spreadOrfold"
  22 + android:layout_width="45dp"
  23 + android:layout_height="45dp"
  24 + android:layout_marginBottom="-17dp"
  25 + android:layout_gravity="right"
  26 + android:button="@null"
  27 + android:drawableRight="@drawable/selector_exam_fold"/>
  28 + <!--<CheckBox-->
  29 + <!--android:id="@+id/cb_exam_A"-->
  30 + <!--style="@style/exam_cb_style_SingleOrMore"-->
  31 + <!--android:drawableLeft="@drawable/selector_exam"-->
  32 + <!--android:text="A" />-->
  33 + <!--倒计时-->
  34 + <RelativeLayout
  35 + android:layout_width="match_parent"
  36 + android:background="#e3e3e3"
  37 + android:id="@+id/rel_exam_layout"
  38 + android:layout_height="90dp">
  39 + <RelativeLayout
  40 + android:id="@+id/rel_home_tv_exam_countdown"
  41 + android:layout_width="wrap_content"
  42 + android:layout_height="match_parent"
  43 + android:orientation="vertical">
  44 + <TextView
  45 + android:id="@+id/tv_exam_countdown"
  46 + android:layout_width="23dp"
  47 + android:layout_height="15dp"
  48 + android:layout_marginRight="5dp"
  49 + android:layout_alignParentLeft="true"
  50 + android:text="__s"
  51 + android:textSize="12dp"
  52 + android:textColor="@color/actionsheet_red"
  53 + android:background="@color/white"
  54 + />
  55 + </RelativeLayout>
  56 + <RelativeLayout
  57 + android:layout_marginLeft="5dp"
  58 + android:layout_toRightOf="@+id/rel_home_tv_exam_countdown"
  59 + android:layout_width="match_parent"
  60 + android:layout_height="match_parent"
  61 + >
  62 + <!--单选多选-->
  63 + <LinearLayout
  64 + android:id="@+id/ll_exam_SingleOrMore"
  65 + android:layout_width="match_parent"
  66 + android:layout_height="match_parent"
  67 + android:layout_toLeftOf="@+id/ll_exam_submit"
  68 + android:gravity="center"
  69 + android:visibility="gone"
  70 + android:orientation="horizontal"
  71 + >
  72 + <CheckBox
  73 + android:id="@+id/cb_exam_A"
  74 + style="@style/exam_cb_style_SingleOrMore"
  75 + android:drawableLeft="@drawable/selector_exam"
  76 + android:text="A" />
  77 +
  78 + <CheckBox
  79 + android:id="@+id/cb_exam_B"
  80 + style="@style/exam_cb_style_SingleOrMore"
  81 + android:drawableLeft="@drawable/selector_exam"
  82 + android:text="B" />
  83 +
  84 + <CheckBox
  85 + android:id="@+id/cb_exam_C"
  86 + style="@style/exam_cb_style_SingleOrMore"
  87 + android:drawableLeft="@drawable/selector_exam"
  88 + android:text="C" />
  89 +
  90 + <CheckBox
  91 + android:id="@+id/cb_exam_D"
  92 + style="@style/exam_cb_style_SingleOrMore"
  93 + android:drawableLeft="@drawable/selector_exam"
  94 + android:text="D" />
  95 + </LinearLayout>
  96 + <!--对错-->
  97 + <LinearLayout
  98 + android:id="@+id/ll_exam_selectRightOrWrong"
  99 + android:layout_width="match_parent"
  100 + android:layout_height="match_parent"
  101 + android:layout_toLeftOf="@+id/ll_exam_submit"
  102 + android:gravity="center"
  103 + android:visibility="gone"
  104 + tool:visibility="visible"
  105 + android:orientation="horizontal"
  106 + >
  107 + <RadioGroup
  108 + android:layout_width="match_parent"
  109 + android:layout_height="match_parent"
  110 + android:orientation="horizontal"
  111 + >
  112 + <RadioButton
  113 + android:id="@+id/rb_exam_R"
  114 + style="@style/exam_cb_style_RightOrWrong"
  115 + android:drawableLeft="@drawable/selector_exam"
  116 + android:checked="true"
  117 + android:text="对" />
  118 +
  119 + <RadioButton
  120 + android:id="@+id/rb_exam_W"
  121 + style="@style/exam_cb_style_RightOrWrong"
  122 + android:drawableLeft="@drawable/selector_exam"
  123 + android:text="错" />
  124 + </RadioGroup>
  125 + </LinearLayout>
  126 +
  127 + <LinearLayout
  128 + android:id="@+id/ll_exam_filling"
  129 + android:layout_width="match_parent"
  130 + android:layout_height="match_parent"
  131 + android:layout_toLeftOf="@+id/ll_exam_submit"
  132 + android:gravity="center"
  133 + android:visibility="gone"
  134 + android:orientation="horizontal"
  135 + >
  136 + <TextView
  137 + android:layout_width="wrap_content"
  138 + android:layout_height="wrap_content"
  139 + android:layout_weight="1"
  140 + android:hint="一"
  141 + />
  142 + <TextView
  143 + android:layout_width="wrap_content"
  144 + android:layout_height="wrap_content"
  145 + android:layout_weight="1"
  146 + android:hint="二"
  147 + />
  148 +
  149 + <EditText
  150 + android:layout_width="20dp"
  151 + android:layout_height="wrap_content"
  152 + android:layout_weight="1"
  153 + android:maxLength="20"
  154 + android:singleLine="true"
  155 + android:hint="输入答案"
  156 + />
  157 + </LinearLayout>
  158 +
  159 +
  160 + <!--答案-->
  161 + <LinearLayout
  162 + android:id="@+id/ll_exam_answer"
  163 + android:layout_width="match_parent"
  164 + android:layout_height="match_parent"
  165 + android:layout_toLeftOf="@+id/ll_exam_submit"
  166 + android:gravity="center|left"
  167 + android:visibility="gone"
  168 + tool:visibility="visible"
  169 + android:orientation="vertical"
  170 + >
  171 + <LinearLayout
  172 + android:layout_width="wrap_content"
  173 + android:layout_height="wrap_content"
  174 + android:orientation="horizontal">
  175 + <TextView
  176 + android:layout_width="wrap_content"
  177 + android:layout_height="wrap_content"
  178 + android:text="我的答案:"
  179 + />
  180 +
  181 + <LinearLayout
  182 + android:id="@+id/ll_exam_Myanswer"
  183 + android:layout_width="wrap_content"
  184 + android:layout_height="wrap_content"
  185 + android:gravity="center"
  186 + android:orientation="horizontal">
  187 + </LinearLayout>
  188 + </LinearLayout>
  189 + <LinearLayout
  190 + android:layout_width="match_parent"
  191 + android:layout_height="wrap_content"
  192 + android:layout_marginTop="5dp"
  193 + android:orientation="horizontal">
  194 + <TextView
  195 + android:layout_width="wrap_content"
  196 + android:layout_height="wrap_content"
  197 + android:text="正确答案:"
  198 + />
  199 + <TextView
  200 + android:layout_width="wrap_content"
  201 + android:layout_height="wrap_content"
  202 + android:layout_centerInParent="true"
  203 + android:layout_margin="4dp"
  204 + android:background="@mipmap/lv_bj"
  205 + android:gravity="center"
  206 + android:textColor="@android:color/white"
  207 + android:text="C"
  208 + android:visibility="gone"
  209 + />
  210 + <LinearLayout
  211 + android:id="@+id/ll_exam_Correctanswer"
  212 + android:layout_width="wrap_content"
  213 + android:layout_height="wrap_content"
  214 + android:gravity="center"
  215 + android:orientation="horizontal">
  216 + </LinearLayout>
  217 +
  218 + <TextView
  219 + android:layout_width="wrap_content"
  220 + android:layout_height="wrap_content"
  221 + android:layout_marginLeft="10dp"
  222 + android:text="正确率:"
  223 + />
  224 + <TextView
  225 + android:layout_width="wrap_content"
  226 + android:layout_height="wrap_content"
  227 + android:text="20%"
  228 + />
  229 + </LinearLayout>
  230 +
  231 + </LinearLayout>
  232 + <!--提交-->
  233 + <LinearLayout
  234 + android:id="@+id/ll_exam_submit"
  235 + android:layout_width="100dp"
  236 + android:layout_height="match_parent"
  237 + android:orientation="horizontal"
  238 + android:gravity="center"
  239 + android:layout_marginLeft="10dp"
  240 + android:layout_alignParentRight="true"
  241 + >
  242 + <TextView
  243 + android:id="@+id/tv_exam_up"
  244 + android:layout_width="wrap_content"
  245 + android:layout_height="wrap_content"
  246 +
  247 + android:text="提交"
  248 + android:layout_gravity="center_vertical"
  249 + android:textColor="@android:color/white"
  250 + android:background="@drawable/shape_bg_full_circle_blue"
  251 + android:layout_marginRight="10dp"
  252 + android:textSize="12sp"
  253 + />
  254 + <TextView
  255 + android:id="@+id/tv_exam_cancle"
  256 + android:layout_width="wrap_content"
  257 + android:layout_height="wrap_content"
  258 + android:text="放弃"
  259 + android:layout_gravity="center_vertical"
  260 + android:textColor="@android:color/white"
  261 + android:background="@drawable/shape_bg_full_circle_grey"
  262 + android:layout_marginRight="8dp"
  263 + android:textSize="12sp"
  264 + />
  265 + </LinearLayout>
  266 + </RelativeLayout>
  267 + </RelativeLayout>
  268 + </LinearLayout>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:orientation="vertical" android:layout_width="match_parent"
  4 + android:background="#e3e3e3"
  5 + android:layout_height="match_parent">
  6 + <TextView
  7 + android:layout_width="match_parent"
  8 + android:text="wo jiusldjflkdjf"
  9 + android:layout_height="wrap_content" />
  10 +</LinearLayout>
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 style="@style/home_input_edit_style" 44 style="@style/home_input_edit_style"
45 android:hint="classId" 45 android:hint="classId"
46 android:inputType="number" 46 android:inputType="number"
47 - android:text="124709334"/> 47 + android:text="118417229"/>
48 48
49 <View 49 <View
50 style="@style/ui_divider_line_horizontal" 50 style="@style/ui_divider_line_horizontal"
@@ -97,8 +97,8 @@ @@ -97,8 +97,8 @@
97 /> 97 />
98 <ImageView 98 <ImageView
99 android:id="@+id/img_playVideo_publishAudio" 99 android:id="@+id/img_playVideo_publishAudio"
100 - android:layout_width="120dp"  
101 - android:layout_height="150dp" 100 + android:layout_width="150dp"
  101 + android:layout_height="120dp"
102 android:background="@mipmap/audio_mode" 102 android:background="@mipmap/audio_mode"
103 android:visibility="gone" 103 android:visibility="gone"
104 tools:visibility="visible" 104 tools:visibility="visible"
  1 +<resources>
  2 + <string name="app_name">学点云</string>
  3 +
  4 + <!-- TODO: Remove or change this placeholder text -->
  5 + <string name="hello_blank_fragment">Hello blank fragment</string>
  6 +
  7 + <string name="home_classid_hint">classid</string>
  8 + <string name="home_role_hint">userRole</string>
  9 + <string name="home_userid_hint">userid</string>
  10 + <string name="home_portal_hint">portal</string>
  11 + <string name="home_enter_class">Enter the classroom</string>
  12 + <string name="home_enter_replay">Enter the recording playback</string>
  13 + <string name="home_enter_login">Sign in</string>
  14 + <string name="home_enter_password">password</string>
  15 + <string name="home_enter_username">username</string>
  16 + <string name="home_content_doc">Document</string>
  17 + <string name="home_content_chat">Chat</string>
  18 + <string name="home_dialog_pushAudio">Push Audio</string>
  19 + <string name="home_dialog_pushVideo">Push Video</string>
  20 + <string name="home_dialog_selectList">Selective listing</string>
  21 + <string name="home_msg_leave_character">Sign out</string>
  22 + <string name="home_msg_leave_class_whether">Are you sure you want to end the current class?</string>
  23 + <string name="home_msg_exit_class">Have dropped out of the classroom</string>
  24 + <string name="home_msg_leave_no">NO</string>
  25 + <string name="home_msg_leave_yes">YES</string>
  26 + <string name="home_msg_loading">loading</string>
  27 + <string name="home_msg_join_class_success">Joining classroom Success</string>
  28 + <string name="home_msg_error_net_disconnection">The device network belongs to the off state, please re-enter</string>
  29 + <string name="home_msg_verify">Determine</string>
  30 + <string name="home_title_back">Back</string>
  31 + <string name="home_msg_play_audio_init">Audio playback initialization</string>
  32 + <string name="home_msg_play_video_init">Video playback initialization</string>
  33 + <!--登录-->
  34 + <string name="main_login_error_classId">Please enter class number</string>
  35 + <string name="main_login_error_portal">Please enter portal</string>
  36 + <string name="main_login_error_role">Please enter role</string>
  37 + <string name="main_login_error_userId">Please enter userId</string>
  38 +</resources>
@@ -36,14 +36,14 @@ @@ -36,14 +36,14 @@
36 "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_normal.9.png" 36 "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_normal.9.png"
37 }, 37 },
38 { 38 {
39 - "merged": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_top_normal.9.png",  
40 - "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_top_normal.9.png"  
41 - },  
42 - {  
43 "merged": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\alert_btn_left_pressed.9.png", 39 "merged": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\alert_btn_left_pressed.9.png",
44 "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_left_pressed.9.png" 40 "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_left_pressed.9.png"
45 }, 41 },
46 { 42 {
  43 + "merged": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_top_normal.9.png",
  44 + "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_top_normal.9.png"
  45 + },
  46 + {
47 "merged": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_single_pressed.9.png", 47 "merged": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_single_pressed.9.png",
48 "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_pressed.9.png" 48 "source": "D:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_pressed.9.png"
49 }, 49 },
1 -#Fri May 12 10:52:43 CST 2017 1 +#Mon May 15 14:28:08 CST 2017
2 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_bottom_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_bottom_pressed.9.png 2 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_bottom_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_bottom_pressed.9.png
3 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_single_normal.9.png 3 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_single_normal.9.png
4 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\anim\\actionsheet_dialog_out.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\anim\\actionsheet_dialog_out.xml 4 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\anim\\actionsheet_dialog_out.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\anim\\actionsheet_dialog_out.xml
@@ -9,8 +9,8 @@ D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\a @@ -9,8 +9,8 @@ D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\a
9 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\trans_bg.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\trans_bg.png 9 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\trans_bg.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\trans_bg.png
10 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_middle_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_middle_pressed.9.png 10 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_middle_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_middle_pressed.9.png
11 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\actionsheet_bottom_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable\\actionsheet_bottom_selector.xml 11 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\actionsheet_bottom_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable\\actionsheet_bottom_selector.xml
12 -D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_left_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\alert_btn_left_pressed.9.png  
13 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_right_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\alert_btn_right_pressed.9.png 12 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_right_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\alert_btn_right_pressed.9.png
  13 +D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_left_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\alert_btn_left_pressed.9.png
14 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_top_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_top_normal.9.png 14 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_top_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_top_normal.9.png
15 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_middle_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_middle_normal.9.png 15 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_middle_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable-hdpi-v4\\actionsheet_middle_normal.9.png
16 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\alertdialog_right_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable\\alertdialog_right_selector.xml 16 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\alertdialog_right_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\res\\merged\\release\\drawable\\alertdialog_right_selector.xml
1 -#Fri May 12 10:51:43 CST 2017 1 +#Mon May 15 14:27:37 CST 2017
2 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_bottom_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\actionsheet_bottom_pressed.9.png 2 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_bottom_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\actionsheet_bottom_pressed.9.png
3 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\actionsheet_single_normal.9.png 3 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_single_normal.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\actionsheet_single_normal.9.png
4 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\anim\\actionsheet_dialog_out.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\anim\\actionsheet_dialog_out.xml 4 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\anim\\actionsheet_dialog_out.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\anim\\actionsheet_dialog_out.xml
@@ -6,8 +6,8 @@ D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hd @@ -6,8 +6,8 @@ D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hd
6 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\actionsheet_middle_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable\\actionsheet_middle_selector.xml 6 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\actionsheet_middle_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable\\actionsheet_middle_selector.xml
7 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\anim\\actionsheet_dialog_in.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\anim\\actionsheet_dialog_in.xml 7 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\anim\\actionsheet_dialog_in.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\anim\\actionsheet_dialog_in.xml
8 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\alertdialog_left_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable\\alertdialog_left_selector.xml 8 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\alertdialog_left_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable\\alertdialog_left_selector.xml
9 -D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_middle_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\actionsheet_middle_pressed.9.png  
10 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\trans_bg.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\trans_bg.png 9 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\trans_bg.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\trans_bg.png
  10 +D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\actionsheet_middle_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\actionsheet_middle_pressed.9.png
11 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\actionsheet_bottom_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable\\actionsheet_bottom_selector.xml 11 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable\\actionsheet_bottom_selector.xml=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable\\actionsheet_bottom_selector.xml
12 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_right_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\alert_btn_right_pressed.9.png 12 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_right_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\alert_btn_right_pressed.9.png
13 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_left_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\alert_btn_left_pressed.9.png 13 D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\src\\main\\res\\drawable-hdpi\\alert_btn_left_pressed.9.png=D\:\\Android_Sdk\\MyApplication\\iOS_Dialog_Library\\build\\intermediates\\bundles\\release\\res\\drawable-hdpi-v4\\alert_btn_left_pressed.9.png
@@ -52,6 +52,10 @@ public interface Constants { @@ -52,6 +52,10 @@ public interface Constants {
52 */ 52 */
53 String VIDEO_BROADCAST = "video_broadcast"; 53 String VIDEO_BROADCAST = "video_broadcast";
54 /** 54 /**
  55 + * 远程开启音频
  56 + */
  57 + String AUDIO_BROADCAST="audio_broadcast";
  58 + /**
55 * 错误标记 59 * 错误标记
56 */ 60 */
57 String ERROR_CODE = "error_event"; 61 String ERROR_CODE = "error_event";
@@ -12,5 +12,6 @@ public class APIContants { @@ -12,5 +12,6 @@ public class APIContants {
12 12
13 // protected final static String BASE_URL="http://192.168.1.109/xdysdk/web/"; 13 // protected final static String BASE_URL="http://192.168.1.109/xdysdk/web/";
14 protected final static String BASE_URL="http://h5.test.3mang.com/web/"; 14 protected final static String BASE_URL="http://h5.test.3mang.com/web/";
  15 +// protected final static String BASE_URL="http://192.168.1.120:80/index.html";
15 16
16 } 17 }
@@ -13,6 +13,7 @@ import android.view.SurfaceView; @@ -13,6 +13,7 @@ import android.view.SurfaceView;
13 13
14 import com.daniulive.smartpublisher.SmartPublisherJni; 14 import com.daniulive.smartpublisher.SmartPublisherJni;
15 import com.eventhandle.SmartEventCallback; 15 import com.eventhandle.SmartEventCallback;
  16 +import com.mang.xdy.utils.SystemUtils;
16 import com.mang.xdy.utils.XdyLogUtil; 17 import com.mang.xdy.utils.XdyLogUtil;
17 import com.voiceengine.NTAudioRecord; 18 import com.voiceengine.NTAudioRecord;
18 19
@@ -262,6 +263,11 @@ public class XdyPublisher implements SurfaceHolder.Callback, Camera.PreviewCallb @@ -262,6 +263,11 @@ public class XdyPublisher implements SurfaceHolder.Callback, Camera.PreviewCallb
262 camera.addCallbackBuffer(new byte[bufferSize]); 263 camera.addCallbackBuffer(new byte[bufferSize]);
263 } else { 264 } else {
264 if (isStart) { 265 if (isStart) {
  266 + if(SystemUtils.isTablet(mActivity)){
  267 + currentOrigentation=LANDSCAPE;
  268 + }else{
  269 + currentOrigentation=PORTRAIT;
  270 + }
265 xdyPublisher.SmartPublisherOnCaptureVideoData(data, data.length, currentCameraType, currentOrigentation); 271 xdyPublisher.SmartPublisherOnCaptureVideoData(data, data.length, currentCameraType, currentOrigentation);
266 } 272 }
267 camera.addCallbackBuffer(data); 273 camera.addCallbackBuffer(data);
  1 +package com.mang.xdy.utils;
  2 +
  3 +import android.content.Context;
  4 +import android.content.Intent;
  5 +import android.content.res.Configuration;
  6 +import android.net.Uri;
  7 +import android.os.Build;
  8 +
  9 +public class SystemUtils {
  10 + /**
  11 + * @return
  12 + *
  13 + * 跳转到程序的设置页
  14 + */
  15 +
  16 + @SuppressWarnings("unused")
  17 + public static Intent getAppDetailSettingIntent(Context context) {
  18 + Intent localIntent=null;
  19 + try {
  20 + localIntent = new Intent();
  21 + localIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  22 + if (Build.VERSION.SDK_INT >= 9) {
  23 + localIntent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS");
  24 + localIntent.setData(Uri.fromParts("package", context.getPackageName(),null));
  25 + } else if (Build.VERSION.SDK_INT <= 8) {
  26 + localIntent.setAction(Intent.ACTION_VIEW);
  27 + localIntent.setClassName("com.android.settings","com.android.settings.InstalledAppDetails");
  28 + localIntent.putExtra("com.android.settings.ApplicationPkgName", context.getPackageName());
  29 + }
  30 + } catch (Exception e) {
  31 + // TODO: handle exception
  32 + }
  33 + return localIntent;
  34 + }
  35 +
  36 + /**
  37 + * 判断当前设备是手机还是平板,代码来自 Google I/O App for Android
  38 + * @param context
  39 + * @return 平板返回 True,手机返回 False
  40 + */
  41 + public static boolean isTablet(Context context) {
  42 + return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
  43 + }
  44 +
  45 +}