private BottomItemData createCameraItem() {
BottomItemData cameraItemData = new BottomItemData();
cameraItemData.setType(BottomItemData.Type.VIDEO);
if (isOwner()) {
cameraItemData.setEnable(true);
} else if (mRoomStore.roomInfo.enableSeatControl) {
cameraItemData.setEnable(false);
} else {
cameraItemData.setEnable(mRoomStore.roomInfo.enableVideo);
}
cameraItemData.setIconId(R.drawable.tuiroomkit_ic_camera_off);
cameraItemData.setBackground(R.drawable.tuiroomkit_bg_bottom_item_black);
cameraItemData.setDisableIconId(R.drawable.tuiroomkit_ic_camera_off);
cameraItemData.setName(mContext.getString(R.string.tuiroomkit_item_open_camera));
BottomSelectItemData camaraSelectItemData = new BottomSelectItemData();
camaraSelectItemData.setSelectedName(mContext.getString(R.string.tuiroomkit_item_close_camera));
camaraSelectItemData.setUnSelectedName(mContext.getString(R.string.tuiroomkit_item_open_camera));
camaraSelectItemData.setSelected(false);
camaraSelectItemData.setSelectedIconId(R.drawable.tuiroomkit_ic_camera_on);
camaraSelectItemData.setUnSelectedIconId(R.drawable.tuiroomkit_ic_camera_off);
camaraSelectItemData.setOnItemSelectListener(new BottomSelectItemData.OnItemSelectListener() {
@Override
public void onItemSelected(boolean isSelected) {
enableCamera(isSelected);
}
});
cameraItemData.setSelectItemData(camaraSelectItemData);
return cameraItemData;
}
本页内容是否解决了您的问题?