Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c4b587ef
authored
Aug 07, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播点赞数
parent
6f3b25be
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
265 additions
and
25 deletions
learnCenter/src/main/java/com/dayu/learncenter/ui/fragment/LiveListFragment.java
liveModule/src/main/java/com/dayu/livemodule/MLVBLiveRoom.java
liveModule/src/main/java/com/dayu/livemodule/MLVBLiveRoomImpl.java
liveModule/src/main/java/com/dayu/livemodule/roomutil/http/HttpResponse.java
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/TCGlobalConfig.java
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/anchor/TCBaseAnchorActivity.java
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/anchor/TCCameraAnchorActivity.java
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/audience/TCAudienceActivity.java
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/common/msg/TCChatMsgListAdapter.java
liveModule/src/main/res/layout/activity_audience.xml
liveModule/src/main/res/layout/activity_camera_anchor.xml
liveModule/src/main/res/layout/activity_screen_anchor.xml
liveModule/src/main/res/layout/layout_live_pusher_info.xml
liveModule/src/main/res/layout/listview_msg_item_right.xml
learnCenter/src/main/java/com/dayu/learncenter/ui/fragment/LiveListFragment.java
View file @
c4b587ef
...
...
@@ -7,6 +7,7 @@ import android.widget.ImageView;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.base.api.APIService
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.api.protocol.AddShareRecordData
;
import
com.dayu.base.ui.fragment.BaseFragment
;
...
...
@@ -19,12 +20,14 @@ import com.dayu.learncenter.databinding.FragmentLiveListBinding;
import
com.dayu.learncenter.event.RefreshLeanTabEvent
;
import
com.dayu.learncenter.ui.activity.VideoPlayActivity
;
import
com.dayu.livemodule.event.LiveFinishEvent
;
import
com.dayu.livemodule.xiaozhibo.TCGlobalConfig
;
import
com.dayu.livemodule.xiaozhibo.audience.TCAudienceActivity
;
import
com.dayu.livemodule.xiaozhibo.common.utils.TCConstants
;
import
com.dayu.livemodule.xiaozhibo.main.videolist.utils.TCVideoInfo
;
import
com.dayu.livemodule.xiaozhibo.main.videolist.utils.TCVideoListMgr
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.GlideImageLoader
;
import
com.dayu.utils.UserManager
;
import
com.dayu.widgets.TextDialog
;
import
com.dayu.widgets.WechatShareDialog
;
import
com.umeng.socialize.bean.SHARE_MEDIA
;
...
...
@@ -66,6 +69,7 @@ public class LiveListFragment extends BaseFragment<SImplePresenter, FragmentLive
mBind
.
refreshLayout
.
setOnRefreshListener
(
refreshLayout
->
{
mPage
=
1
;
initData
();
getUserInfo
();
EventBus
.
getDefault
().
post
(
new
RefreshLeanTabEvent
());
});
mBind
.
refreshLayout
.
setOnLoadMoreListener
(
refreshLayout
->
{
...
...
@@ -87,6 +91,19 @@ public class LiveListFragment extends BaseFragment<SImplePresenter, FragmentLive
EventBus
.
getDefault
().
unregister
(
this
);
}
//获取用户信息
private
void
getUserInfo
()
{
Api
.
getService
(
APIService
.
class
).
getEngineerInfo
(
mUserId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
info
->{
if
(
mUserInfo
!=
null
){
mUserInfo
.
setLiveStatus
(
info
.
getLiveStatus
());
mUserInfo
.
setLiveStatus
(
info
.
getLianmaiStatus
());
UserManager
.
getInstance
().
saveUser
(
mUserInfo
);
}
}));
}
private
void
initData
()
{
getLiveList
();
getPlayBackVideos
();
...
...
@@ -126,6 +143,13 @@ public class LiveListFragment extends BaseFragment<SImplePresenter, FragmentLive
}
private
void
startLivePlay
(
final
TCVideoInfo
item
)
{
initUser
();
if
(
mUserInfo
.
getLiveStatus
()
==
1
){
TCGlobalConfig
.
ENABLE_LINKMIC
=
true
;
}
else
{
TCGlobalConfig
.
ENABLE_LINKMIC
=
false
;
}
Intent
intent
;
intent
=
new
Intent
(
mActivity
,
TCAudienceActivity
.
class
);
intent
.
putExtra
(
TCConstants
.
PLAY_URL
,
item
.
playUrl
);
...
...
liveModule/src/main/java/com/dayu/livemodule/MLVBLiveRoom.java
View file @
c4b587ef
...
...
@@ -130,6 +130,8 @@ public abstract class MLVBLiveRoom {
*/
public
abstract
void
getRoomList
(
int
index
,
int
count
,
final
IMLVBLiveRoomListener
.
GetRoomListCallback
callback
);
public
abstract
void
getRoomInfo
(
final
IMLVBLiveRoomListener
.
GetRoomListCallback
callback
);
/**
* 获取观众列表
*
...
...
liveModule/src/main/java/com/dayu/livemodule/MLVBLiveRoomImpl.java
View file @
c4b587ef
...
...
@@ -310,6 +310,34 @@ public class MLVBLiveRoomImpl extends MLVBLiveRoom implements HttpRequests.Heart
});
}
@Override
public
void
getRoomInfo
(
IMLVBLiveRoomListener
.
GetRoomListCallback
callback
)
{
TXCLog
.
e
(
TAG
,
"custom_msg updateAnchors"
);
mHttpRequest
.
getPushers
(
mCurrRoomID
,
new
HttpRequests
.
OnResponseCallback
<
HttpResponse
.
PusherList
>()
{
@Override
public
void
onResponse
(
final
int
retcode
,
String
retmsg
,
final
HttpResponse
.
PusherList
data
)
{
callbackOnThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
retcode
==
HttpResponse
.
CODE_OK
)
{
if
(
data
!=
null
)
{
mRoomStatusCode
=
data
.
roomStatusCode
;
TXCLog
.
e
(
TAG
,
"custom_msg "
+
data
.
custom
);
}
}
else
{
TXCLog
.
e
(
TAG
,
"更新主播列表失败"
);
callbackOnThread
(
mListener
,
"onDebugLog"
,
"[LiveRoom] 获取主播列表失败"
);
if
(
callback
!=
null
)
{
}
}
}
});
}
});
}
/**
* 获取观众列表
* <p>
...
...
@@ -2143,6 +2171,7 @@ public class MLVBLiveRoomImpl extends MLVBLiveRoom implements HttpRequests.Heart
}
protected
void
updateAnchors
(
final
boolean
excludeRoomCreator
,
final
UpdateAnchorsCallback
callback
)
{
mHttpRequest
.
getPushers
(
mCurrRoomID
,
new
HttpRequests
.
OnResponseCallback
<
HttpResponse
.
PusherList
>()
{
@Override
public
void
onResponse
(
final
int
retcode
,
String
retmsg
,
final
HttpResponse
.
PusherList
data
)
{
...
...
liveModule/src/main/java/com/dayu/livemodule/roomutil/http/HttpResponse.java
View file @
c4b587ef
...
...
@@ -36,6 +36,8 @@ public class HttpResponse {
public
String
mixedPlayURL
;
public
int
roomStatusCode
;
public
List
<
AnchorInfo
>
pushers
;
public
String
custom
;
}
public
static
class
AudienceList
extends
HttpResponse
{
...
...
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/TCGlobalConfig.java
View file @
c4b587ef
...
...
@@ -103,6 +103,7 @@ public class TCGlobalConfig {
* 由于连麦功能使用了比较昂贵的 BGP 专用线路,所以是按照通话时长进行收费的。最初级的体验包包含 3000 分钟的连麦时长,只需要 9.8 元。
* 购买链接:https://buy.cloud.tencent.com/mobilelive?urlctr=yes&micconn=3000m##
*/
public
static
final
boolean
ENABLE_LINKMIC
=
true
;
public
static
boolean
ENABLE_LINKMIC
=
false
;
// public static final boolean ENABLE_LINKMIC = true;
}
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/anchor/TCBaseAnchorActivity.java
View file @
c4b587ef
...
...
@@ -66,9 +66,12 @@ public class TCBaseAnchorActivity extends Activity implements IMLVBLiveRoomListe
// 消息列表相关
private
ListView
mLvMessage
;
// 消息控件
private
ListView
mLvMessage2
;
// 消息控件(点赞消息)
private
TCInputTextMsgDialog
mInputTextMsgDialog
;
// 消息输入框
private
TCChatMsgListAdapter
mChatMsgListAdapter
;
// 消息列表的Adapter
private
ArrayList
<
TCChatEntity
>
mArrayListChatEntity
;
// 消息内容
private
TCChatMsgListAdapter
mChatMsgListAdapter2
;
// 消息列表的Adapter
private
ArrayList
<
TCChatEntity
>
mArrayListChatEntity2
;
// 消息内容
private
ErrorDialogFragment
mErrDlgFragment
;
// 错误提示弹窗
private
TCHeartLayout
mHeartLayout
;
// 点赞动画的布局
...
...
@@ -115,6 +118,7 @@ public class TCBaseAnchorActivity extends Activity implements IMLVBLiveRoomListe
mLocation
=
intent
.
getStringExtra
(
TCConstants
.
USER_LOC
);
mArrayListChatEntity
=
new
ArrayList
<>();
mArrayListChatEntity2
=
new
ArrayList
<>();
mErrDlgFragment
=
new
ErrorDialogFragment
();
mLiveRoom
=
MLVBLiveRoom
.
sharedInstance
(
this
);
...
...
@@ -146,6 +150,7 @@ public class TCBaseAnchorActivity extends Activity implements IMLVBLiveRoomListe
// mTCSwipeAnimationController.setAnimationView(controllLayer);
mLvMessage
=
(
ListView
)
findViewById
(
R
.
id
.
im_msg_listview
);
mLvMessage2
=
(
ListView
)
findViewById
(
R
.
id
.
im_msg_listview2
);
mHeartLayout
=
(
TCHeartLayout
)
findViewById
(
R
.
id
.
heart_layout
);
mInputTextMsgDialog
=
new
TCInputTextMsgDialog
(
this
,
R
.
style
.
InputDialog
);
...
...
@@ -153,6 +158,8 @@ public class TCBaseAnchorActivity extends Activity implements IMLVBLiveRoomListe
mChatMsgListAdapter
=
new
TCChatMsgListAdapter
(
this
,
mLvMessage
,
mArrayListChatEntity
);
mLvMessage
.
setAdapter
(
mChatMsgListAdapter
);
mChatMsgListAdapter2
=
new
TCChatMsgListAdapter
(
this
,
mLvMessage2
,
mArrayListChatEntity2
,
true
);
mLvMessage2
.
setAdapter
(
mChatMsgListAdapter2
);
IDanmakuView
danmakuView
=
(
IDanmakuView
)
findViewById
(
R
.
id
.
anchor_danmaku_view
);
mDanmuMgr
=
new
TCDanmuMgr
(
this
);
...
...
@@ -465,7 +472,7 @@ public class TCBaseAnchorActivity extends Activity implements IMLVBLiveRoomListe
//todo:修改显示类型
entity
.
setType
(
TCConstants
.
PRAISE
);
notifyMsg
(
entity
);
notifyMsg
2
(
entity
);
}
/**
...
...
@@ -577,6 +584,21 @@ public class TCBaseAnchorActivity extends Activity implements IMLVBLiveRoomListe
});
}
private
void
notifyMsg2
(
final
TCChatEntity
entity
)
{
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
mArrayListChatEntity2
.
size
()
>
1000
)
{
while
(
mArrayListChatEntity2
.
size
()
>
900
)
{
mArrayListChatEntity2
.
remove
(
0
);
}
}
mArrayListChatEntity2
.
add
(
entity
);
mChatMsgListAdapter2
.
notifyDataSetChanged
();
}
});
}
/**
* /////////////////////////////////////////////////////////////////////////////////
...
...
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/anchor/TCCameraAnchorActivity.java
View file @
c4b587ef
...
...
@@ -70,6 +70,7 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
private
ImageView
mRecordBall
;
// 表明正在录制的红点球
private
TextView
mBroadcastTime
;
// 已经开播的时间
private
TextView
mMemberCount
;
// 观众数量
private
TextView
mLikeCount
;
// 点赞数量
private
int
baseUserCount
=
0
;
//观众基数
...
...
@@ -130,7 +131,10 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
mHeadIcon
=
(
ImageView
)
findViewById
(
R
.
id
.
anchor_iv_head_icon
);
showHeadIcon
(
mHeadIcon
,
TCUserMgr
.
getInstance
().
getAvatar
());
mMemberCount
=
(
TextView
)
findViewById
(
R
.
id
.
anchor_tv_member_counts
);
mMemberCount
.
setText
(
baseUserCount
+
""
);
mLikeCount
=
(
TextView
)
findViewById
(
R
.
id
.
anchor_tv_like_count
);
mMemberCount
.
setText
(
"观众:"
+
baseUserCount
);
mLikeCount
.
setVisibility
(
View
.
VISIBLE
);
setlikeCount
();
//AudioControl
mAudioCtrl
=
(
TCAudioControl
)
findViewById
(
R
.
id
.
anchor_audio_control
);
...
...
@@ -156,6 +160,16 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
});
}
@Override
protected
void
handlePraiseMsg
(
TCSimpleUserInfo
userInfo
)
{
super
.
handlePraiseMsg
(
userInfo
);
setlikeCount
();
}
private
void
setlikeCount
()
{
mLikeCount
.
setText
(
"点赞:"
+
mHeartCount
);
}
private
void
changePushView
(
AnchorInfo
item
)
{
final
TCVideoView
videoView
=
mPlayerVideoViewList
.
applyVideoView
(
item
.
userID
);
if
(
videoView
==
null
)
{
...
...
@@ -601,14 +615,14 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
//更新头像列表 返回false表明已存在相同用户,将不会更新数据
if
(
mAvatarListAdapter
.
addItem
(
userInfo
))
super
.
handleMemberJoinMsg
(
userInfo
);
mMemberCount
.
setText
(
String
.
format
(
Locale
.
CHINA
,
"%d"
,
mCurrentMemberCount
+
baseUserCount
));
mMemberCount
.
setText
(
"观众:"
+
String
.
format
(
Locale
.
CHINA
,
"%d"
,
mCurrentMemberCount
+
baseUserCount
));
}
@Override
protected
void
handleMemberQuitMsg
(
TCSimpleUserInfo
userInfo
)
{
mAvatarListAdapter
.
removeItem
(
userInfo
.
userid
);
super
.
handleMemberQuitMsg
(
userInfo
);
mMemberCount
.
setText
(
String
.
format
(
Locale
.
CHINA
,
"%d"
,
mCurrentMemberCount
+
baseUserCount
));
mMemberCount
.
setText
(
"观众:"
+
String
.
format
(
Locale
.
CHINA
,
"%d"
,
mCurrentMemberCount
+
baseUserCount
));
}
...
...
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/audience/TCAudienceActivity.java
View file @
c4b587ef
...
...
@@ -97,7 +97,10 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
private
TCInputTextMsgDialog
mInputTextMsgDialog
;
// 消息输入框
private
ListView
mListViewMsg
;
// 消息列表控件
private
ArrayList
<
TCChatEntity
>
mArrayListChatEntity
=
new
ArrayList
<>();
// 消息列表集合
private
ListView
mListViewMsg2
;
// 消息列表控件(点赞消息)
private
ArrayList
<
TCChatEntity
>
mArrayListChatEntity2
=
new
ArrayList
<>();
// 消息列表集合
private
TCChatMsgListAdapter
mChatMsgListAdapter
;
// 消息列表的Adapter
private
TCChatMsgListAdapter
mChatMsgListAdapter2
;
// 消息列表的Adapter
private
Button
mBtnLinkMic
;
// 连麦按钮
private
Button
mBtnSwitchCamera
;
// 切换摄像头按钮
...
...
@@ -160,6 +163,8 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
private
long
mLastLinkMicTime
;
// 上次发起连麦的时间,用于频率控制
TextView
tvLikeCount
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -209,6 +214,8 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
mLiveRoom
.
getRoomInfo
(
null
);
}
...
...
@@ -221,6 +228,9 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
}
});
tvLikeCount
=
findViewById
(
R
.
id
.
tv_like_count
);
tvLikeCount
.
setText
(
mHeartCount
+
""
);
mControlLayer
=
(
RelativeLayout
)
findViewById
(
R
.
id
.
anchor_rl_controllLayer
);
mTCSwipeAnimationController
=
new
TCSwipeAnimationController
(
this
);
//左右滑动隐藏显示控制布局
...
...
@@ -230,6 +240,8 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
mTXCloudVideoView
.
setLogMargin
(
10
,
10
,
45
,
55
);
mListViewMsg
=
(
ListView
)
findViewById
(
R
.
id
.
im_msg_listview
);
mListViewMsg
.
setVisibility
(
View
.
VISIBLE
);
mListViewMsg2
=
(
ListView
)
findViewById
(
R
.
id
.
im_msg_listview2
);
mListViewMsg2
.
setVisibility
(
View
.
VISIBLE
);
mHeartLayout
=
(
TCHeartLayout
)
findViewById
(
R
.
id
.
heart_layout
);
mTvPusherName
=
(
TextView
)
findViewById
(
R
.
id
.
anchor_tv_broadcasting_time
);
mTvPusherName
.
setText
(
TCUtils
.
getLimitString
(
mPusherNickname
,
10
));
...
...
@@ -256,6 +268,8 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
mMemberCount
.
setText
(
String
.
format
(
Locale
.
CHINA
,
"%d"
,
mCurrentAudienceCount
+
baseUserCount
));
mChatMsgListAdapter
=
new
TCChatMsgListAdapter
(
this
,
mListViewMsg
,
mArrayListChatEntity
);
mListViewMsg
.
setAdapter
(
mChatMsgListAdapter
);
mChatMsgListAdapter2
=
new
TCChatMsgListAdapter
(
this
,
mListViewMsg2
,
mArrayListChatEntity2
,
true
);
mListViewMsg2
.
setAdapter
(
mChatMsgListAdapter2
);
mDanmuView
=
(
IDanmakuView
)
findViewById
(
R
.
id
.
anchor_danmaku_view
);
mDanmuView
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -285,6 +299,8 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
}
}
});
}
else
{
mBtnLinkMic
.
setVisibility
(
View
.
GONE
);
}
mBtnSwitchCamera
=
(
Button
)
findViewById
(
R
.
id
.
audience_btn_switch_cam
);
...
...
@@ -815,8 +831,10 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
}
mHeartCount
++;
tvLikeCount
.
setText
(
mHeartCount
+
""
);
entity
.
setType
(
TCConstants
.
MEMBER_ENTER
);
notifyMsg
(
entity
);
notifyMsg
2
(
entity
);
}
/**
...
...
@@ -870,6 +888,28 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
}
});
}
/**
* 更新消息列表控件
*
* @param entity
*/
private
void
notifyMsg2
(
final
TCChatEntity
entity
)
{
mHandler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
mArrayListChatEntity2
.
size
()
>
1000
)
{
while
(
mArrayListChatEntity2
.
size
()
>
900
)
{
mArrayListChatEntity2
.
remove
(
0
);
}
}
mArrayListChatEntity2
.
add
(
entity
);
mChatMsgListAdapter2
.
notifyDataSetChanged
();
}
});
}
/**
* 显示错误以及退出的弹窗
...
...
@@ -925,13 +965,14 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
//点赞发送请求限制
if
(
mLikeFrequeControl
==
null
)
{
mLikeFrequeControl
=
new
TCFrequeControl
();
mLikeFrequeControl
.
init
(
2
,
1
);
mLikeFrequeControl
.
init
(
2
0
,
1
);
}
if
(
mLikeFrequeControl
.
canTrigger
())
{
mHeartCount
++;
mLiveRoom
.
setCustomInfo
(
MLVBCommonDef
.
CustomFieldOp
.
INC
,
"praise"
,
1
,
null
);
//向ChatRoom发送点赞消息
mLiveRoom
.
sendRoomCustomMsg
(
String
.
valueOf
(
TCConstants
.
IMCMD_PRAISE
),
""
,
null
);
tvLikeCount
.
setText
(
mHeartCount
+
""
);
}
}
else
if
(
i
==
R
.
id
.
btn_message_input
)
{
...
...
liveModule/src/main/java/com/dayu/livemodule/xiaozhibo/common/msg/TCChatMsgListAdapter.java
View file @
c4b587ef
...
...
@@ -40,6 +40,7 @@ public class TCChatMsgListAdapter extends BaseAdapter implements AbsListView.OnS
private
Context
mContext
;
private
ListView
mListView
;
private
ArrayList
<
TCChatEntity
>
mArray
=
new
ArrayList
<>();
private
boolean
isRight
=
false
;
class
AnimatorInfo
{
long
createTime
;
...
...
@@ -75,6 +76,17 @@ public class TCChatMsgListAdapter extends BaseAdapter implements AbsListView.OnS
mListView
.
setOnScrollListener
(
this
);
}
public
TCChatMsgListAdapter
(
Context
context
,
ListView
listview
,
List
<
TCChatEntity
>
objects
,
boolean
isRight
)
{
this
.
mContext
=
context
;
mListView
=
listview
;
this
.
mList
=
objects
;
this
.
isRight
=
isRight
;
mAnimatorSetList
=
new
LinkedList
<>();
mAnimatorInfoList
=
new
LinkedList
<>();
mListView
.
setOnScrollListener
(
this
);
}
@Override
...
...
@@ -132,7 +144,7 @@ public class TCChatMsgListAdapter extends BaseAdapter implements AbsListView.OnS
if
(
convertView
==
null
)
{
holder
=
new
ViewHolder
();
LayoutInflater
layoutInflater
=
LayoutInflater
.
from
(
mContext
);
convertView
=
layoutInflater
.
inflate
(
R
.
layout
.
listview_msg_item
,
null
);
convertView
=
layoutInflater
.
inflate
(
isRight
?
R
.
layout
.
listview_msg_item_right
:
R
.
layout
.
listview_msg_item
,
null
);
holder
.
sendContext
=
(
TextView
)
convertView
.
findViewById
(
R
.
id
.
sendcontext
);
convertView
.
setTag
(
R
.
id
.
tag_first
,
holder
);
}
else
{
...
...
liveModule/src/main/res/layout/activity_audience.xml
View file @
c4b587ef
...
...
@@ -5,11 +5,11 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:ignore=
"contentDescription"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
</LinearLayout>
...
...
@@ -30,30 +30,30 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<View
android:layout_width=
"0dp"
android:layout_height=
"1dp"
android:layout_weight=
"1"
/>
android:layout_weight=
"1"
/>
<RelativeLayout
android:layout_width=
"0dp"
android:layout_
weight=
"1
"
android:layout_
height=
"match_parent
"
>
android:layout_
height=
"match_parent
"
android:layout_
weight=
"1
"
>
<!--连麦:第一个播放小窗口-->
<FrameLayout
android:id=
"@+id/frameLayout1"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_alignParentBottom=
"true"
>
android:layout_alignParentBottom=
"true"
>
<com.tencent.rtmp.ui.TXCloudVideoView
android:id=
"@+id/video_player1"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<FrameLayout
android:id=
"@+id/loading_background1"
...
...
@@ -82,9 +82,9 @@
<ScrollView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_alignParentBottom=
"true"
android:layout_marginBottom=
"56dp"
android:layout_alignParentRight=
"true"
>
android:layout_marginBottom=
"56dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
...
...
@@ -94,8 +94,7 @@
<FrameLayout
android:id=
"@+id/frameLayout2"
android:layout_width=
"180dp"
android:layout_height=
"270dp"
>
android:layout_height=
"270dp"
>
<!--android:layout_above="@+id/frameLayout1"-->
<!--android:layout_alignRight="@+id/frameLayout1"-->
...
...
@@ -242,7 +241,7 @@
android:layout_height=
"@dimen/live_btn_size"
android:layout_gravity=
"center"
android:background=
"@drawable/linkmic_on"
android:visibility=
"
invisibl
e"
/>
android:visibility=
"
gon
e"
/>
</FrameLayout>
<FrameLayout
...
...
@@ -287,6 +286,7 @@
android:layout_gravity=
"center"
android:background=
"@drawable/icon_like"
android:onClick=
"onClick"
/>
</FrameLayout>
...
...
@@ -306,6 +306,25 @@
</LinearLayout>
<View
android:id=
"@+id/temp_v"
android:layout_width=
"5dp"
android:layout_height=
"5dp"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"160dp"
android:layout_marginTop=
"29dp"
/>
<TextView
android:id=
"@+id/tv_like_count"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/temp_v"
android:layout_alignLeft=
"@id/temp_v"
android:text=
""
android:textColor=
"#333"
android:textSize=
"13sp"
/>
</RelativeLayout>
<ListView
...
...
@@ -323,6 +342,21 @@
android:transcriptMode=
"normal"
android:visibility=
"gone"
/>
<ListView
android:id=
"@+id/im_msg_listview2"
android:layout_width=
"250dp"
android:layout_height=
"10dp"
android:layout_above=
"@id/tool_bar"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"15dp"
android:cacheColorHint=
"#00000000"
android:divider=
"#3c421b1b"
android:scrollbarStyle=
"outsideOverlay"
android:scrollbars=
"none"
android:stackFromBottom=
"true"
android:transcriptMode=
"normal"
android:visibility=
"gone"
/>
<!--录制-->
<RelativeLayout
android:layout_width=
"match_parent"
...
...
@@ -409,6 +443,7 @@
android:layout_alignParentRight=
"true"
android:layout_alignParentBottom=
"true"
android:focusable=
"true"
/>
</RelativeLayout>
<!--弹幕-->
...
...
liveModule/src/main/res/layout/activity_camera_anchor.xml
View file @
c4b587ef
...
...
@@ -198,7 +198,7 @@
android:id=
"@+id/layout_live_pusher_info"
layout=
"@layout/layout_live_pusher_info"
android:layout_width=
"110dp"
android:layout_height=
"
35dp
"
android:layout_height=
"
wrap_content
"
android:layout_margin=
"5dp"
/>
<android.support.v7.widget.RecyclerView
...
...
@@ -328,6 +328,19 @@
android:scrollbars=
"none"
android:stackFromBottom=
"true"
android:transcriptMode=
"normal"
/>
<ListView
android:id=
"@+id/im_msg_listview2"
android:layout_width=
"250dp"
android:layout_height=
"10dp"
android:layout_above=
"@id/tool_bar"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"15dp"
android:cacheColorHint=
"#00000000"
android:divider=
"#3c421b1b"
android:scrollbarStyle=
"outsideOverlay"
android:scrollbars=
"none"
android:stackFromBottom=
"true"
android:transcriptMode=
"normal"
/>
<ScrollView
android:layout_width=
"match_parent"
...
...
liveModule/src/main/res/layout/activity_screen_anchor.xml
View file @
c4b587ef
...
...
@@ -58,6 +58,19 @@
android:scrollbarStyle=
"outsideOverlay"
android:stackFromBottom=
"true"
android:transcriptMode=
"normal"
/>
<ListView
android:id=
"@+id/im_msg_listview2"
android:layout_width=
"250dp"
android:layout_height=
"10dp"
android:scrollbars=
"none"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"15dp"
android:layout_above=
"@id/tool_bar"
android:cacheColorHint=
"#00000000"
android:divider=
"#3c421b1b"
android:scrollbarStyle=
"outsideOverlay"
android:stackFromBottom=
"true"
android:transcriptMode=
"normal"
/>
<!--点赞动画-->
<RelativeLayout
...
...
liveModule/src/main/res/layout/layout_live_pusher_info.xml
View file @
c4b587ef
...
...
@@ -3,7 +3,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
tools:ignore=
"contentDescription"
android:layout_width=
"110dp"
android:layout_height=
"
35dp
"
android:layout_height=
"
wrap_content
"
android:background=
"@drawable/pusher_info_background"
android:orientation=
"horizontal"
android:paddingBottom=
"1dp"
...
...
@@ -65,5 +65,17 @@
android:layout_below=
"@+id/anchor_tv_broadcasting_time"
android:layout_alignLeft=
"@+id/anchor_tv_broadcasting_time"
/>
<TextView
android:id=
"@+id/anchor_tv_like_count"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:textSize=
"10sp"
android:text=
""
android:visibility=
"gone"
android:textColor=
"@color/colorTextWhite"
android:layout_below=
"@+id/anchor_tv_member_counts"
android:layout_alignLeft=
"@+id/anchor_tv_broadcasting_time"
/>
</RelativeLayout>
\ No newline at end of file
liveModule/src/main/res/layout/listview_msg_item_right.xml
0 → 100644
View file @
c4b587ef
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingTop=
"6dp"
>
<TextView
android:layout_alignParentRight=
"true"
android:id=
"@+id/sendcontext"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:paddingLeft=
"7dp"
android:paddingRight=
"7dp"
android:paddingBottom=
"4dp"
android:paddingTop=
"3dp"
android:background=
"@drawable/message_background"
android:gravity=
"start"
/>
</RelativeLayout>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment