Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
huangxinbao
/
Android_Sdk
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
huangxinbao
8 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
39fa918230d45751c248e0431e07bbbe979db5d3
39fa9182
1 parent
7883bb5f
add apart of answersheet
隐藏空白字符变更
内嵌
并排对比
正在显示
8 个修改的文件
包含
234 行增加
和
288 行删除
MyApplication/.idea/misc.xml
MyApplication/XdyDemo/src/main/java/com/mang/xdy/demo/activity/VideoPlayActivity.java
MyApplication/XdyDemo/src/main/res/layout/activity_main.xml
MyApplication/XdyDemo/src/main/res/layout/activity_video_play.xml
MyApplication/iOS_Dialog_Library/build/intermediates/incremental/mergeReleaseResources/compile-file-map.properties
MyApplication/iOS_Dialog_Library/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties
MyApplication/iOS_Dialog_Library/build/outputs/aar/iOS_Dialog_Library-release.aar
MyApplication/xdy/src/main/java/com/mang/xdy/utils/XdyStringUtils.java
MyApplication/.idea/misc.xml
查看文件 @
39fa918
...
...
@@ -37,7 +37,7 @@
<ConfirmationsSetting
value=
"0"
id=
"Add"
/>
<ConfirmationsSetting
value=
"0"
id=
"Remove"
/>
</component>
<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"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_
8
"
default=
"true"
assert-keyword=
"true"
jdk-15=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
MyApplication/XdyDemo/src/main/java/com/mang/xdy/demo/activity/VideoPlayActivity.java
查看文件 @
39fa918
package
com
.
mang
.
xdy
.
demo
.
activity
;
;
import
android.annotation.SuppressLint
;
import
android.app.ProgressDialog
;
import
android.content.DialogInterface
;
...
...
@@ -15,10 +15,12 @@ import android.util.Log;
import
android.view.SurfaceHolder
;
import
android.view.SurfaceView
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.WindowManager
;
import
android.widget.FrameLayout
;
import
android.widget.ImageButton
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.SeekBar
;
import
android.widget.TextView
;
...
...
@@ -29,7 +31,6 @@ import com.google.gson.Gson;
import
com.mang.xdy.bean.VideoPlayBean
;
import
com.mang.xdy.cache.ACache
;
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.SimpleFragmentPagerAdapter
;
...
...
@@ -41,9 +42,11 @@ import com.mang.xdy.demo.bean.TimeEntity;
import
com.mang.xdy.demo.bean.VideoOrAudioStopEntity
;
import
com.mang.xdy.demo.utils.JsonUtil
;
import
com.mang.xdy.demo.utils.ToastUtil
;
import
com.mang.xdy.demo.widget.answersheet.AnswerSheetView
;
import
com.mang.xdy.demo.widget.dialog.LoginDialog
;
import
com.mang.xdy.demo.widget.view.NoScrollViewPager
;
import
com.mang.xdy.listener.ObserverListener
;
import
com.mang.xdy.utils.SPUtil
;
import
com.mang.xdy.utils.UIUtils
;
import
com.mang.xdy.utils.XdyLogUtil
;
import
com.mang.xdy.utils.XdyStringUtils
;
...
...
@@ -51,6 +54,7 @@ import com.pili.pldroid.player.AVOptions;
import
com.pili.pldroid.player.PLMediaPlayer
;
import
com.pili.pldroid.player.widget.PLVideoTextureView
;
import
com.pili.pldroid.player.widget.PLVideoView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
...
...
@@ -66,7 +70,9 @@ import zhangphil.iosdialog.widget.ActionSheetDialog;
import
static
com
.
pili
.
pldroid
.
player
.
AVOptions
.
KEY_DELAY_OPTIMIZATION
;
public
class
VideoPlayActivity
extends
AppCompatActivity
implements
ObserverListener
,
PLMediaPlayer
.
OnErrorListener
,
PLMediaPlayer
.
OnInfoListener
,
NoScrollViewPager
.
OnRplayTouchListener
{
;
public
class
VideoPlayActivity
extends
AppCompatActivity
implements
ObserverListener
,
PLMediaPlayer
.
OnErrorListener
,
PLMediaPlayer
.
OnInfoListener
,
NoScrollViewPager
.
OnRplayTouchListener
{
private
final
static
String
TAG
=
"VideoPlayActivity"
;
@BindView
(
R
.
id
.
img_playVideo_novideo
)
ImageView
img_playVideo_novideo
;
...
...
@@ -74,6 +80,8 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
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
;
...
...
@@ -91,6 +99,8 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
SlidingTabLayout
mSlidingTab
;
@BindView
(
R
.
id
.
img_playVideo_publishAudio
)
ImageView
mIamgeView_PublishAudio
;
@BindView
(
R
.
id
.
asv_videoPlay_answer
)
AnswerSheetView
mAnswerSheetView
;
private
String
username
=
""
;
private
String
userpwd
=
""
;
private
SimpleFragmentPagerAdapter
pagerAdapter
;
...
...
@@ -99,13 +109,13 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
private
LoginDialog
mLoginDialog
;
private
ProgressDialog
mProgressDialog
;
private
String
playVideoOrAudioId
=
""
;
private
String
playVideoOrAudioId
=
""
;
//播放视频模式还是音频模式
private
boolean
isPlayVideoMode
=
true
;
private
boolean
isPlayVideoMode
=
true
;
/*推流视频模式还是音频模式*/
private
boolean
isPublsishVideoMode
=
true
;
private
boolean
isPublsishVideoMode
=
true
;
/*mcu断开或者网络原因为false*/
private
boolean
isDefaultExit
=
true
;
private
boolean
isDefaultExit
=
true
;
private
AlertDialog
mErrorDialog
;
private
ACache
aCache
;
//是否是回放状态,
...
...
@@ -114,7 +124,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
/*课堂名字*/
private
String
className
;
/*课堂类型*/
private
int
classType
=
2
;
private
int
classType
=
2
;
private
String
[]
titles
;
private
Handler
mmHandler
=
new
Handler
()
{
@Override
...
...
@@ -123,7 +133,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
ResponseEntity
responseEntity
=
(
ResponseEntity
)
msg
.
obj
;
switch
(
responseEntity
.
getType
())
{
case
Constants
.
CLASS_EXIT
:
ToastUtil
.
showToast
(
"退出课堂"
,
VideoPlayActivity
.
this
);
ToastUtil
.
showToast
(
"退出课堂"
,
VideoPlayActivity
.
this
);
progressDialogDismiss
();
exit
();
break
;
...
...
@@ -146,20 +156,20 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
try
{
jsonObject
=
new
JSONObject
(
userJson
);
seek
=
jsonObject
.
optLong
(
"recordPlaybackMaxTime"
);
className
=
jsonObject
.
optString
(
"className"
);
classType
=
jsonObject
.
optInt
(
"classType"
);
XdyLogUtil
.
i
(
"课堂类型"
,
""
+
classType
);
seek
=
jsonObject
.
optLong
(
"recordPlaybackMaxTime"
);
className
=
jsonObject
.
optString
(
"className"
);
classType
=
jsonObject
.
optInt
(
"classType"
);
XdyLogUtil
.
i
(
"课堂类型"
,
""
+
classType
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
if
(!
TextUtils
.
isEmpty
(
className
))
{
if
(!
TextUtils
.
isEmpty
(
className
))
{
mTextView_ClassName
.
setText
(
className
);
}
if
(
replay
)
{
if
(
replay
)
{
initRecordSeek
(
userJson
);
}
else
{
}
else
{
if
(
classType
==
2
)
{
fra_videoPlay_start
.
setVisibility
(
View
.
GONE
);
}
else
{
...
...
@@ -169,21 +179,21 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
break
;
case
Constants
.
VIDEO_PLAY
:
//播放视频
playVideoOrAudioId
=
responseEntity
.
getParam
();
isPlayVideoMode
=
true
;
playVideoOrAudioId
=
responseEntity
.
getParam
();
isPlayVideoMode
=
true
;
playVideo
(
responseEntity
.
getParam
());
break
;
case
Constants
.
AUDIO_PLAY
:
//播放音频
isPlayVideoMode
=
false
;
playVideoOrAudioId
=
responseEntity
.
getParam
();
isPlayVideoMode
=
false
;
playVideoOrAudioId
=
responseEntity
.
getParam
();
playAudio
(
responseEntity
.
getParam
());
break
;
case
Constants
.
VIDEO_STOP
:
//停止播放
case
Constants
.
AUDIO_STOP
:
//停止播放
playVideoOrAudioId
=
""
;
playVideoOrAudioId
=
""
;
stopPlay
(
responseEntity
.
getParam
());
break
;
case
Constants
.
PLAY_SUCCESS
:
...
...
@@ -191,8 +201,8 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
img_playVideo_novideo
.
setVisibility
(
View
.
GONE
);
break
;
case
Constants
.
CLASS_UPDATE_TIMER
:
if
(
replay
&&!
mDragging
)
handleTime
(
responseEntity
.
getParam
());
if
(
replay
&&
!
mDragging
)
handleTime
(
responseEntity
.
getParam
());
break
;
case
Constants
.
RECORD_PLAYBACK_UPDATE
:
handleRecord
(
responseEntity
.
getParam
());
...
...
@@ -210,47 +220,49 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
setContentView
(
R
.
layout
.
activity_video_play
);
EventBus
.
getDefault
().
register
(
this
);
ButterKnife
.
bind
(
this
);
aCache
=
ACache
.
get
(
this
);
aCache
=
ACache
.
get
(
this
);
xdySdk
=
XdySdk
.
getXdyInstance
();
xdySdk
.
add
(
this
);
init
();
progressDialogShow
();
setTablayout
();
setAnswerLayout
();
}
public
void
init
()
{
ArrayList
<
String
>
arrayList
=
getIntent
().
getStringArrayListExtra
(
"init"
);
if
(
arrayList
!=
null
&&
arrayList
.
size
()>
1
){
initClass
=
arrayList
.
get
(
0
);
if
(
TextUtils
.
isEmpty
(
arrayList
.
get
(
1
))){
replay
=
true
;
}
else
{
replay
=
false
;
ArrayList
<
String
>
arrayList
=
getIntent
().
getStringArrayListExtra
(
"init"
);
if
(
arrayList
!=
null
&&
arrayList
.
size
()
>
1
)
{
initClass
=
arrayList
.
get
(
0
);
if
(
TextUtils
.
isEmpty
(
arrayList
.
get
(
1
)))
{
replay
=
true
;
}
else
{
replay
=
false
;
}
}
if
(!
replay
)
{
if
(!
replay
)
{
mVideoView
.
setVisibility
(
View
.
GONE
);
mMediaContainer
.
setVisibility
(
View
.
GONE
);
// mFramenLayout_stopPublish.setVisibility(View.VISIBLE);
}
else
{
}
else
{
surfaceviewPlayVideo
.
setVisibility
(
View
.
GONE
);
initReplay
();
}
if
(!
replay
)
{
if
(!
replay
)
{
xdySdk
.
api
(
"init"
,
initClass
);
}
else
{
}
else
{
xdySdk
.
api
(
"initRecordPlayback"
,
initClass
);
}
currentTime
=
0
;
currentTime
=
0
;
mFramenLayout_stopPublish
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
isPublsishVideoMode
)
{
if
(
isPublsishVideoMode
)
{
xdySdk
.
api
(
"stopPublishVideo"
,
""
);
}
else
{
}
else
{
xdySdk
.
api
(
"stopPublishAudio"
,
""
);
}
...
...
@@ -299,7 +311,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
// tabLayout.setTabMode(TabLayout.MODE_FIXED);
// }
public
void
showSelectPublishMode
()
{
public
void
showSelectPublishMode
()
{
new
ActionSheetDialog
(
VideoPlayActivity
.
this
)
.
builder
()
.
setTitle
(
"选择列表"
)
...
...
@@ -319,7 +331,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
sh
.
setType
(
SurfaceHolder
.
SURFACE_TYPE_PUSH_BUFFERS
);
surfaceView_publish
.
setZOrderMediaOverlay
(
true
);
xdySdk
.
api
(
"publishVideo"
,
""
,
surfaceView_publish
,
VideoPlayActivity
.
this
);
isPublsishVideoMode
=
true
;
isPublsishVideoMode
=
true
;
}
})
.
addSheetItem
(
"推送音频"
,
ActionSheetDialog
.
SheetItemColor
.
Blue
...
...
@@ -334,14 +346,44 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
fra_videoPlay_start
.
setEnabled
(
false
);
mFramenLayout_stopPublish
.
setEnabled
(
true
);
xdySdk
.
api
(
Constants
.
PUBLISH_AUDIO
,
""
,
null
,
VideoPlayActivity
.
this
);
isPublsishVideoMode
=
false
;
isPublsishVideoMode
=
false
;
}
})
.
addSheetItem
(
"开始答题"
,
ActionSheetDialog
.
SheetItemColor
.
Blue
,
new
ActionSheetDialog
.
OnSheetItemClickListener
()
{
@Override
public
void
onClick
(
int
which
)
{
//填写事件
mAnswerSheetView
.
selectAnswerSheetType
(
AnswerSheetView
.
ANSWER_TYPE_SINGLE_OR_MORE
);
mAnswerSheetView
.
startCountTimer
(
22
);
setAnswerSheetLayout_Nornal
(
53
);
}
})
.
addSheetItem
(
"对错选择"
,
ActionSheetDialog
.
SheetItemColor
.
Blue
,
new
ActionSheetDialog
.
OnSheetItemClickListener
()
{
@Override
public
void
onClick
(
int
which
)
{
//填写事件
mAnswerSheetView
.
selectAnswerSheetType
(
AnswerSheetView
.
ANSWER_TYPE_RIGHT_OR_WRONG
);
mAnswerSheetView
.
startCountTimer
(
15
);
setAnswerSheetLayout_Nornal
(
53
);
}
})
.
addSheetItem
(
"填空题"
,
ActionSheetDialog
.
SheetItemColor
.
Blue
,
new
ActionSheetDialog
.
OnSheetItemClickListener
()
{
@Override
public
void
onClick
(
int
which
)
{
//填写事件
mAnswerSheetView
.
selectAnswerSheetType
(
AnswerSheetView
.
ANSWER_TYPE_FILLING
);
mAnswerSheetView
.
startCountTimer
(
15
);
setAnswerSheetLayout_Nornal
(
53
);
}
}).
show
();
}
public
void
setTablayout
(){
public
void
setTablayout
()
{
titles
=
new
String
[]{
"文档"
,
"聊天"
};
pagerAdapter
=
new
SimpleFragmentPagerAdapter
(
getSupportFragmentManager
(),
this
,
replay
);
pagerAdapter
=
new
SimpleFragmentPagerAdapter
(
getSupportFragmentManager
(),
this
,
replay
);
viewPager
.
setAdapter
(
pagerAdapter
);
viewPager
.
setOnRplayTouchListener
(
this
);
viewPager
.
setPagingEnabled
(
false
);
...
...
@@ -418,11 +460,11 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
// progressDialogDismiss();
if
(
replay
)
{
if
(
replay
)
{
playRecord
(
response
);
}
else
{
if
(!
checkPermission
()){
}
else
{
if
(!
checkPermission
())
{
return
;
}
...
...
@@ -430,31 +472,31 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
getWindowManager
().
getDefaultDisplay
().
getMetrics
(
dm
);
int
widthPixels
=
dm
.
widthPixels
;
int
heightPixels
=
dm
.
heightPixels
;
if
(
surfaceviewPlayVideo
!=
null
)
{
if
(
surfaceviewPlayVideo
!=
null
)
{
// int margin = (mSurfaceViewWidth - w) / 2;
SurfaceHolder
surfaceHolder
=
surfaceviewPlayVideo
.
getHolder
();
SurfaceHolder
surfaceHolder
=
surfaceviewPlayVideo
.
getHolder
();
RelativeLayout
.
LayoutParams
lp
=
new
RelativeLayout
.
LayoutParams
(
RelativeLayout
.
LayoutParams
.
MATCH_PARENT
,
RelativeLayout
.
LayoutParams
.
MATCH_PARENT
);
int
setWidth
=
640
;
int
setHeight
=
480
;
int
leftW
=
0
;
int
leftH
=
0
;
int
width
=
surfaceviewPlayVideo
.
getWidth
();
int
height
=
surfaceviewPlayVideo
.
getHeight
();
if
(
width
>
height
){
setWidth
=
width
;
setHeight
=
height
*(
4
/
3
);
leftH
=
0
;
leftW
=(
widthPixels
-
setHeight
)/
2
;
}
else
{
int
setWidth
=
640
;
int
setHeight
=
480
;
int
leftW
=
0
;
int
leftH
=
0
;
int
width
=
surfaceviewPlayVideo
.
getWidth
();
int
height
=
surfaceviewPlayVideo
.
getHeight
();
if
(
width
>
height
)
{
setWidth
=
width
;
setHeight
=
height
*
(
4
/
3
);
leftH
=
0
;
leftW
=
(
widthPixels
-
setHeight
)
/
2
;
}
else
{
}
lp
.
setMargins
(
leftW
,
0
,
leftW
,
0
);
// surfaceHolder.setFixedSize(640,480);
XdyLogUtil
.
e
(
"surface 高度计算:"
,
surfaceviewPlayVideo
.
getWidth
()+
"高:"
+
surfaceviewPlayVideo
.
getHeight
());
XdyLogUtil
.
e
(
"surface 高度计算:"
,
surfaceviewPlayVideo
.
getWidth
()
+
"高:"
+
surfaceviewPlayVideo
.
getHeight
());
surfaceviewPlayVideo
.
setLayoutParams
(
lp
);
XdyLogUtil
.
e
(
"surface 设置后的高度的高度计算:"
,
surfaceviewPlayVideo
.
getWidth
()+
"高:"
+
surfaceviewPlayVideo
.
getHeight
());
XdyLogUtil
.
e
(
"surface 设置后的高度的高度计算:"
,
surfaceviewPlayVideo
.
getWidth
()
+
"高:"
+
surfaceviewPlayVideo
.
getHeight
());
}
xdySdk
.
api
(
"playVideo"
,
response
+
""
,
surfaceviewPlayVideo
,
VideoPlayActivity
.
this
);
...
...
@@ -463,6 +505,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
ToastUtil
.
showToastshort
(
"视频播放初始化"
,
VideoPlayActivity
.
this
);
}
}
/**
* 播放音频
*
...
...
@@ -470,12 +513,12 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
*/
public
void
playAudio
(
String
response
)
{
if
(
replay
)
{
if
(
replay
)
{
playRecord
(
response
);
img_playVideo_novideo
.
setImageResource
(
R
.
mipmap
.
audio_mode
);
img_playVideo_novideo
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
if
(!
checkPermission
()){
}
else
{
if
(!
checkPermission
())
{
return
;
}
xdySdk
.
api
(
"playAudio"
,
response
,
null
,
VideoPlayActivity
.
this
);
...
...
@@ -491,7 +534,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
exit_dialog
();
}
public
void
exit_dialog
(){
public
void
exit_dialog
()
{
final
AlertDialog
alertDialog
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
"退出"
)
.
setMessage
(
"是否离开课堂"
)
...
...
@@ -554,7 +597,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
case
"911"
:
progressDialogDismiss
();
exit
();
ToastUtil
.
showToastshort
(
errorEntity
.
getReson
(),
this
);
ToastUtil
.
showToastshort
(
errorEntity
.
getReson
(),
this
);
break
;
case
"10000"
:
ToastUtil
.
showToastshort
(
errorEntity
.
getReson
(),
this
);
...
...
@@ -563,7 +606,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
ToastUtil
.
showToastshort
(
errorEntity
.
getReson
(),
this
);
break
;
case
"20000"
:
isDefaultExit
=
false
;
isDefaultExit
=
false
;
showErrorDialog
();
ToastUtil
.
showToastshort
(
errorEntity
.
getReson
(),
this
);
break
;
...
...
@@ -571,10 +614,11 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
}
@Subscribe
(
threadMode
=
ThreadMode
.
POSTING
)
public
void
finishActivity
(
String
res
){
if
(
"home"
.
equals
(
res
))
{
this
.
finish
();
public
void
finishActivity
(
String
res
)
{
if
(
"home"
.
equals
(
res
))
{
this
.
finish
();
}
}
...
...
@@ -589,12 +633,12 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
protected
void
onPause
()
{
super
.
onPause
();
xdySdk
.
onPlayStop
(
playVideoOrAudioId
);
if
(
isPlayVideoMode
)
{
if
(
isPlayVideoMode
)
{
stopVideo
();
}
else
{
}
else
{
stopAudio
();
}
if
(
replay
)
{
if
(
replay
)
{
xdySdk
.
api
(
"pauseRecordPlayback"
,
""
);
}
xdySdk
.
onPublisherPause
();
...
...
@@ -603,14 +647,14 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
@Override
protected
void
onResume
()
{
super
.
onResume
();
if
(
isPlayVideoMode
)
{
if
(!
TextUtils
.
isEmpty
(
playVideoOrAudioId
))
if
(
isPlayVideoMode
)
{
if
(!
TextUtils
.
isEmpty
(
playVideoOrAudioId
))
playVideo
(
playVideoOrAudioId
);
}
else
{
if
(!
TextUtils
.
isEmpty
(
playVideoOrAudioId
))
}
else
{
if
(!
TextUtils
.
isEmpty
(
playVideoOrAudioId
))
playAudio
(
playVideoOrAudioId
);
}
if
(
replay
)
{
}
if
(
replay
)
{
xdySdk
.
api
(
"startRecordPlayback"
,
""
);
}
xdySdk
.
onPublisherResume
();
...
...
@@ -621,16 +665,16 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
*/
public
void
exit
()
{
progressDialogDismiss
();
isDefaultExit
=
true
;
xdySdk
.
api
(
"stopPublishVideo"
,
""
);
isDefaultExit
=
true
;
xdySdk
.
api
(
"stopPublishVideo"
,
""
);
xdySdk
.
api
(
"leaveClass"
,
""
);
xdySdk
.
remove
(
this
);
xdySdk
.
onPublisherStop
();
if
(
mVideoView
!=
null
)
{
if
(
mVideoView
!=
null
)
{
mVideoView
.
stopPlayback
();
}
UIUtils
.
closeDialog
(
mLoginDialog
);
if
(!
replay
)
{
if
(!
replay
)
{
xdySdk
.
removeAll
();
}
...
...
@@ -659,13 +703,13 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
*/
public
void
stopPlay
(
String
response
)
{
if
(
replay
){
if
(
isPlayVideoMode
){
if
(
replay
)
{
if
(
isPlayVideoMode
)
{
stopVideo
();
}
else
{
}
else
{
stopAudio
();
}
}
else
{
}
else
{
VideoOrAudioStopEntity
entity
=
JsonUtil
.
parseJsonToBean
(
response
,
VideoOrAudioStopEntity
.
class
);
if
(
entity
!=
null
)
{
if
(
xdySdk
.
onPlayStop
(
entity
.
getMediaId
()
+
""
))
{
...
...
@@ -676,13 +720,14 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
}
}
public
void
showErrorDialog
()
{
if
(
isDefaultExit
)
{
if
(
isDefaultExit
)
{
return
;
}
if
(
mErrorDialog
!=
null
)
return
;
progressDialogDismiss
();
progressDialogDismiss
();
mErrorDialog
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
"退出"
)
.
setMessage
(
"您设备的网络属于断开状态,请重新进入"
)
...
...
@@ -699,8 +744,10 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
mErrorDialog
.
show
();
}
private
boolean
isCameraCheckFirst
=
true
;
private
boolean
isAudioCheckFirst
=
true
;
private
boolean
isCameraCheckFirst
=
true
;
private
boolean
isAudioCheckFirst
=
true
;
private
boolean
checkPermission
()
{
// try {
// int pRecordAudio = PermissionChecker.checkCallingOrSelfPermission(this, "android.permission.RECORD_AUDIO");
...
...
@@ -731,37 +778,40 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
// }
return
true
;
}
@Override
public
void
observerUpData
(
String
type
,
String
parameter
)
{
XdyLogUtil
.
e
(
TAG
+
"observer:"
,
Thread
.
currentThread
().
getId
()
+
"type:"
+
type
);
XdyLogUtil
.
e
(
TAG
+
"observer:"
,
Thread
.
currentThread
().
getId
()
+
"type:"
+
type
);
ResponseEntity
responseEntity
=
new
ResponseEntity
(
type
,
parameter
);
Message
message
=
Message
.
obtain
();
message
.
obj
=
responseEntity
;
mmHandler
.
sendMessage
(
message
);
}
/*************************************** 回放***************************************************/
/***************************************
* 回放
***************************************************/
private
static
final
int
FADE_OUT
=
1
;
private
static
final
int
SHOW_PROGRESS
=
2
;
private
boolean
mShowing
;
private
boolean
mDragging
;
private
RelativeLayout
mMediaControllerRight
;
private
boolean
pause
=
true
;
private
boolean
pause
=
true
;
/**
* 退出标记
*/
private
boolean
quit
;
private
boolean
isOver
;
@BindView
(
R
.
id
.
fl_media
)
FrameLayout
mMediaContainer
;
FrameLayout
mMediaContainer
;
@BindView
(
R
.
id
.
iv_operation_play
)
ImageButton
mPauseButton
;
@BindView
(
R
.
id
.
sb_live
)
SeekBar
mSeekBar
;
@BindView
(
R
.
id
.
rl_operation_play
)
RelativeLayout
mPauseContainer
;
RelativeLayout
mPauseContainer
;
private
TextView
mClassName
;
@BindView
(
R
.
id
.
tv_end_time
)
TextView
mEndTime
;
...
...
@@ -786,6 +836,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
}
}
};
public
void
initReplay
()
{
mVideoView
.
setOnInfoListener
(
this
);
mVideoView
.
setOnErrorListener
(
this
);
...
...
@@ -845,7 +896,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
public
void
onClick
(
View
v
)
{
//开启或暂停回放
boolean
pause
=
getRecordStatus
();
pauseAndStart
(!
pause
);
pauseAndStart
(!
pause
);
}
});
}
...
...
@@ -876,6 +927,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
public
void
setCurrentTime
(
int
currentTime
)
{
this
.
currentTime
=
currentTime
;
}
public
void
seekRecordPlay
(
long
b
)
{
//TODO 清除以前的数据
// chatView.clearChatHistory();
...
...
@@ -884,6 +936,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
EventBus
.
getDefault
().
post
(
"chat"
);
seekRecordPlayback
(
b
);
}
private
SeekBar
.
OnSeekBarChangeListener
mSeekListener
=
new
SeekBar
.
OnSeekBarChangeListener
()
{
public
void
onStartTrackingTouch
(
SeekBar
bar
)
{
...
...
@@ -900,15 +953,15 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
public
void
onProgressChanged
(
SeekBar
bar
,
int
progress
,
boolean
fromuser
)
{
if
(!
fromuser
)
return
;
setCurrentTime
((
int
)
(
progress
*(
seek
/
100
)));
setCurrentTime
((
int
)
(
progress
*
(
seek
/
100
)));
String
time
=
generateTime
(
currentTime
);
if
(
mCurrentTime
!=
null
)
mCurrentTime
.
setText
(
time
);
}
public
void
onStopTrackingTouch
(
SeekBar
bar
)
{
XdyLogUtil
.
i
(
"视频播放:"
,
""
+
bar
.
getProgress
()*
bar
.
getProgress
()*(
seek
/
100
));
seekRecordPlay
(
bar
.
getProgress
()
==
0
?
1
:
bar
.
getProgress
()*(
seek
/
100
));
XdyLogUtil
.
i
(
"视频播放:"
,
""
+
bar
.
getProgress
()
*
bar
.
getProgress
()
*
(
seek
/
100
));
seekRecordPlay
(
bar
.
getProgress
()
==
0
?
1
:
bar
.
getProgress
()
*
(
seek
/
100
));
showMediaContainer
(
TIME_OUT
);
mHandler
.
removeMessages
(
SHOW_PROGRESS
);
mDragging
=
false
;
...
...
@@ -949,11 +1002,11 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
if
(
mCurrentTime
!=
null
)
{
mCurrentTime
.
setText
(
generateTime
(
currentTime
));
}
if
(
mSeekBar
!=
null
&&
seek
!=
0
)
{
if
(
mSeekBar
!=
null
&&
seek
!=
0
)
{
// mSeekBar.setProgress(currentTime);
// XdyLogUtil.e("视频播放进度:seek:"+seek+" Currentime:"+currentTime);
// XdyLogUtil.e("视频播放进度:setProgress:"+ ((currentTime*1.0)/(seek))+":"+(int) (currentTime/seek*100)+":"+ ((currentTime/seek))*100);
mSeekBar
.
setProgress
((
int
)
(((
currentTime
*
1.0
)/
seek
)*
100
));
mSeekBar
.
setProgress
((
int
)
(((
currentTime
*
1.0
)
/
seek
)
*
100
));
}
}
}
...
...
@@ -985,6 +1038,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
mShowing
=
false
;
}
}
public
void
updatePausePlay
()
{
if
(
pause
)
mPauseButton
.
setImageResource
(
R
.
mipmap
.
play
);
...
...
@@ -1005,7 +1059,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
case
Constants
.
RECORD_PLAYING
:
pause
=
false
;
isOver
=
false
;
pauseOrStartEverything
();
pauseOrStartEverything
();
break
;
case
Constants
.
RECORD_SEEK
:
isOver
=
false
;
...
...
@@ -1026,7 +1080,7 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
case
Constants
.
RECORD_PAUSE
:
isOver
=
false
;
pause
=
true
;
pauseOrStartEverything
();
pauseOrStartEverything
();
break
;
}
updatePausePlay
();
...
...
@@ -1034,12 +1088,14 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
e
.
printStackTrace
();
}
}
long
seek
=
1
;
long
seek
=
1
;
int
currentTime
;
/**
* 录制回放初始化 seek长度等信息
*/
public
void
initRecordSeek
(
String
response
){
public
void
initRecordSeek
(
String
response
)
{
setProgress
();
mHandler
.
postDelayed
(
new
Runnable
()
{
...
...
@@ -1054,18 +1110,20 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
private
void
handleTime
(
String
pa
)
{
try
{
JSONObject
jsonObject
=
new
JSONObject
(
pa
);
//防止时间超了
currentTime
=
jsonObject
.
optInt
(
"classTimestamp"
);
boolean
isRe
=
jsonObject
.
optBoolean
(
"recordStatus"
);
//防止时间超了
currentTime
=
jsonObject
.
optInt
(
"classTimestamp"
);
boolean
isRe
=
jsonObject
.
optBoolean
(
"recordStatus"
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
setProgress
();
setProgress
();
}
public
boolean
getRecordStatus
()
{
return
pause
;
}
public
void
pauseOrStartEverything
()
{
boolean
isPause
=
getRecordStatus
();
if
(
isPause
&&
mVideoView
!=
null
&&
mVideoView
.
isPlaying
())
{
...
...
@@ -1076,22 +1134,24 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
XdyLogUtil
.
i
(
TAG
,
"视频开始"
);
}
}
/**
* 回放 播放 音视频
*
* @param response
*/
public
void
playRecord
(
String
response
){
String
json_video
=
aCache
.
getAsString
(
response
);
if
(
TextUtils
.
isEmpty
(
json_video
)){
public
void
playRecord
(
String
response
)
{
String
json_video
=
aCache
.
getAsString
(
response
);
if
(
TextUtils
.
isEmpty
(
json_video
))
{
///给出相应的提示表示没有 这个id
XdyLogUtil
.
e
(
TAG
,
"Play Video Can not find this VideoId"
);
XdyLogUtil
.
e
(
TAG
,
"Play Video Can not find this VideoId"
);
return
;
}
VideoPlayBean
videoPlayBean
=
JsonUtil
.
parseJsonToBean
(
json_video
,
VideoPlayBean
.
class
);
if
(
videoPlayBean
!=
null
){
VideoPlayBean
videoPlayBean
=
JsonUtil
.
parseJsonToBean
(
json_video
,
VideoPlayBean
.
class
);
if
(
videoPlayBean
!=
null
)
{
//回放不会出现Constants.PLAY_SUCCESS:
if
(
img_playVideo_novideo
!=
null
)
img_playVideo_novideo
.
setVisibility
(
View
.
GONE
);
if
(
img_playVideo_novideo
!=
null
)
img_playVideo_novideo
.
setVisibility
(
View
.
GONE
);
if
(
mVideoView
.
isPlaying
())
{
mVideoView
.
stopPlayback
();
}
...
...
@@ -1114,16 +1174,16 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
});
if
(
isPlayVideoMode
&&
mVideoView
!=
null
&&
mVideoView
.
isPlaying
())
mVideoView
.
stopPlayback
();
if
(
isPlayVideoMode
&&
mVideoView
!=
null
&&
mVideoView
.
isPlaying
())
mVideoView
.
stopPlayback
();
}
public
void
stopAudio
()
{
img_playVideo_novideo
.
setImageResource
(
R
.
mipmap
.
no_video
);
img_playVideo_novideo
.
setVisibility
(
View
.
VISIBLE
);
if
(
isPlayVideoMode
&&
mVideoView
!=
null
&&
mVideoView
.
isPlaying
())
mVideoView
.
stopPlayback
();
if
(
isPlayVideoMode
&&
mVideoView
!=
null
&&
mVideoView
.
isPlaying
())
mVideoView
.
stopPlayback
();
}
...
...
@@ -1141,20 +1201,47 @@ public class VideoPlayActivity extends AppCompatActivity implements ObserverList
public
void
pauseAndStart
(
boolean
b
)
{
if
(
b
)
{
pauseRecordPlayback
();
pauseRecordPlayback
();
}
else
{
startRecordPlayback
();
}
}
public
void
pauseRecordPlayback
()
{
xdySdk
.
api
(
"pauseRecordPlayback"
,
""
);
xdySdk
.
api
(
"pauseRecordPlayback"
,
""
);
}
public
void
startRecordPlayback
()
{
xdySdk
.
api
(
"startRecordPlayback"
,
""
);
xdySdk
.
api
(
"startRecordPlayback"
,
""
);
}
public
void
seekRecordPlayback
(
long
time
)
{
TimeEntity
timeEntity
=
new
TimeEntity
(
time
);
TimeEntity
timeEntity
=
new
TimeEntity
(
time
);
xdySdk
.
api
(
"seekRecordPlayback"
,
new
Gson
().
toJson
(
timeEntity
));
}
/********************************答题卡*********************************************************/
public
void
setAnswerLayout
(){
mAnswerSheetView
.
setOnAnswerLayoutChangeListener
(
new
AnswerSheetView
.
OnAnswerLayoutChangeListener
()
{
@Override
public
void
setAnswerSheetFramLayout
(
int
num
)
{
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
XdyStringUtils
.
dp2px
(
VideoPlayActivity
.
this
,
num
));
fraVideoPlayAnswer
.
setLayoutParams
(
layoutParams
);
}
@Override
public
void
setAnswerSheetNormal
(
int
num
)
{
setAnswerSheetLayout_Nornal
(
num
);
}
});
}
public
void
setAnswerSheetLayout_Nornal
(
int
num
){
fraVideoPlayAnswer
.
setVisibility
(
View
.
VISIBLE
);
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
XdyStringUtils
.
dp2px
(
VideoPlayActivity
.
this
,
num
));
fraVideoPlayAnswer
.
setLayoutParams
(
layoutParams
);
}
}
...
...
MyApplication/XdyDemo/src/main/res/layout/activity_main.xml
查看文件 @
39fa918
...
...
@@ -44,7 +44,7 @@
style=
"@style/home_input_edit_style"
android:hint=
"请输入课堂号"
android:inputType=
"number"
android:text=
"
763307927
"
/>
android:text=
"
124709334
"
/>
<View
style=
"@style/ui_divider_line_horizontal"
...
...
MyApplication/XdyDemo/src/main/res/layout/activity_video_play.xml
查看文件 @
39fa918
...
...
@@ -137,17 +137,7 @@
</FrameLayout>
</RelativeLayout>
</RelativeLayout>
<SurfaceView
android:id=
"@+id/surfaceview_playVideo_text"
android:layout_width=
"150dp"
android:layout_height=
"200dp"
android:visibility=
"gone"
/>
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
</FrameLayout>
<android.support.design.widget.TabLayout
android:id=
"@+id/sliding_tabs"
android:layout_width=
"match_parent"
...
...
@@ -176,7 +166,9 @@
android:layout_width=
"match_parent"
android:layout_height=
"0px"
android:layout_weight=
"1"
android:background=
"@android:color/white"
/>
android:background=
"@android:color/white"
>
</com.mang.xdy.demo.widget.view.NoScrollViewPager>
<FrameLayout
android:id=
"@+id/fl_media"
android:layout_width=
"match_parent"
...
...
@@ -190,152 +182,14 @@
</FrameLayout>
<FrameLayout
android:id=
"@+id/fra_videoPlay_answer"
android:layout_width=
"match_parent"
android:visibility=
"gone"
android:layout_height=
"@dimen/ui_titlebar_height"
>
<RelativeLayout
<com.mang.xdy.demo.widget.answersheet.AnswerSheetView
android:id=
"@+id/asv_videoPlay_answer"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<!--倒计时-->
<RelativeLayout
android:id=
"@+id/ll_home_tv_exam_countdown"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_exam_countdown"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"5dp"
android:layout_alignParentLeft=
"true"
android:text=
"30s"
android:textColor=
"@color/actionsheet_red"
android:background=
"@color/white"
/>
</RelativeLayout>
<RelativeLayout
android:layout_marginLeft=
"5dp"
android:layout_toRightOf=
"@+id/ll_home_tv_exam_countdown"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<!--单选多选-->
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_toLeftOf=
"@+id/ll_exam_submit"
android:gravity=
"center"
android:visibility=
"gone"
android:orientation=
"horizontal"
>
<CheckBox
android:id=
"@+id/rb_exam_A"
style=
"@style/exam_cb_style"
android:drawableLeft=
"@drawable/selector_exam"
android:text=
"A"
/>
<CheckBox
android:id=
"@+id/rb_exam_B"
style=
"@style/exam_cb_style"
android:drawableLeft=
"@drawable/selector_exam"
android:text=
"B"
/>
<CheckBox
android:id=
"@+id/rb_exam_C"
style=
"@style/exam_cb_style"
android:drawableLeft=
"@drawable/selector_exam"
android:text=
"C"
/>
<CheckBox
android:id=
"@+id/rb_exam_D"
style=
"@style/exam_cb_style"
android:drawableLeft=
"@drawable/selector_exam"
android:text=
"D"
/>
</LinearLayout>
<!--对错-->
<LinearLayout
android:id=
"@+id/ll_exam_selectRightOrWrong"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_toLeftOf=
"@+id/ll_exam_submit"
android:gravity=
"center"
android:visibility=
"gone"
android:orientation=
"horizontal"
>
<CheckBox
android:id=
"@+id/cb_exam_R"
style=
"@style/exam_cb_style"
android:drawableLeft=
"@drawable/selector_exam"
android:text=
"正确"
/>
<CheckBox
android:id=
"@+id/cb_exam_W"
style=
"@style/exam_cb_style"
android:drawableLeft=
"@drawable/selector_exam"
android:text=
"错误"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_exam_filling"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_toLeftOf=
"@+id/ll_exam_submit"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<EditText
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:hint=
"一"
/>
<EditText
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:hint=
"二"
/>
<EditText
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:hint=
"输入答案"
/>
</LinearLayout>
<!--提交-->
<LinearLayout
android:id=
"@+id/ll_exam_submit"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
android:gravity=
"center"
android:layout_marginLeft=
"10dp"
android:layout_alignParentRight=
"true"
>
<TextView
android:id=
"@+id/tv_exam_up"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"提交"
android:layout_gravity=
"center_vertical"
android:textColor=
"@android:color/white"
android:background=
"@drawable/shape_bg_full_circle_blue"
android:layout_marginRight=
"10dp"
/>
<TextView
android:id=
"@+id/tv_exam_cancle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"放弃"
android:layout_gravity=
"center_vertical"
android:textColor=
"@android:color/white"
android:background=
"@drawable/shape_bg_full_circle_blue"
android:layout_marginRight=
"10dp"
/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</com.mang.xdy.demo.widget.answersheet.AnswerSheetView>
</FrameLayout>
</LinearLayout>
...
...
MyApplication/iOS_Dialog_Library/build/intermediates/incremental/mergeReleaseResources/compile-file-map.properties
查看文件 @
39fa918
#
Fri May 05 18:08:22
CST 2017
#
Mon May 08 17:38:00
CST 2017
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
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
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
...
...
MyApplication/iOS_Dialog_Library/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties
查看文件 @
39fa918
#
Fri May 05 18:04:58
CST 2017
#
Mon May 08 17:37:17
CST 2017
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
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
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
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
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
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
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
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
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
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
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
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
...
...
MyApplication/iOS_Dialog_Library/build/outputs/aar/iOS_Dialog_Library-release.aar
查看文件 @
39fa918
不能预览此文件类型
MyApplication/xdy/src/main/java/com/mang/xdy/utils/XdyStringUtils.java
查看文件 @
39fa918
package
com
.
mang
.
xdy
.
utils
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.util.Log
;
...
...
@@ -75,4 +76,8 @@ public class XdyStringUtils {
.
toString
();
}
}
public
static
int
dp2px
(
Context
context
,
float
dp
)
{
return
(
int
)
Math
.
ceil
(
context
.
getResources
().
getDisplayMetrics
().
density
*
dp
);
}
}
...
...
请
注册
或
登录
后发表评论