public PLVLSChatroomLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView();
}
private void initView() {
//填充布局到该view中
LayoutInflater.from(getContext()).inflate(R.layout.plvls_chatroom_layout, this);
//findView
plvlsChatroomChatMsgLy = findViewById(R.id.plvls_chatroom_chat_msg_ly);
plvlsChatroomSwipeLoadView = findViewById(R.id.plvls_chatroom_swipe_load_view);
plvlsChatroomChatMsgRv = findViewById(R.id.plvls_chatroom_chat_msg_rv);
plvlsChatroomUnreadMsgTv = findViewById(R.id.plvls_chatroom_unread_msg_tv);
plvlsChatroomControlIv = findViewById(R.id.plvls_chatroom_control_iv);
plvlsChatroomToolbarMicControlIv = findViewById(R.id.plvls_chatroom_toolbar_mic_control_iv);
plvlsChatroomToolbarCameraControlIv = findViewById(R.id.plvls_chatroom_toolbar_camera_control_iv);
plvlsChatroomToolbarFrontCameraControlIv = findViewById(R.id.plvls_chatroom_toolbar_front_camera_control_iv);
plvlsChatroomToolbarOpenInputWindowTv = findViewById(R.id.plvls_chatroom_toolbar_open_input_window_tv);
//初始化按钮点击事件
plvlsChatroomControlIv.setOnClickListener(this);
plvlsChatroomToolbarMicControlIv.setOnClickListener(this);
plvlsChatroomToolbarCameraControlIv.setOnClickListener(this);
plvlsChatroomToolbarFrontCameraControlIv.setOnClickListener(this);
plvlsChatroomToolbarOpenInputWindowTv.setOnClickListener(this);
//初始化控件...
}