[Chat][Feature] chat send message bindings with redux layer (#505)
This commit is contained in:
Родитель
70fb127935
Коммит
084d423a43
|
@ -25,6 +25,7 @@ buildscript {
|
|||
androidx_navigation_fragment_ktx_version = '2.4.2'
|
||||
androidx_test_rules_version = '1.4.1-alpha07'
|
||||
androidx_activity_compose_version = "1.5.1"
|
||||
androidx_navigation_compose = "2.5.2"
|
||||
|
||||
if (project.rootProject.file('private_drop.properties').canRead()) {
|
||||
Properties privateDropProps = new Properties()
|
||||
|
|
|
@ -76,6 +76,8 @@ dependencies {
|
|||
implementation "androidx.activity:activity-compose:$androidx_activity_compose_version"
|
||||
implementation "androidx.compose.foundation:foundation:$compose_version"
|
||||
implementation "androidx.compose.material:material:$compose_version"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidx_lifecycle_viewmodel_ktx_version"
|
||||
implementation("androidx.navigation:navigation-compose:$androidx_navigation_compose")
|
||||
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-tooling-data:$compose_version"
|
||||
|
|
|
@ -11,7 +11,8 @@ internal class ErrorCode : ExpandableStringEnum<ErrorCode?>() {
|
|||
val CHAT_SEND_MESSAGE_FAILED = fromString("chatSendMessageFailed")
|
||||
val CHAT_START_EVENT_NOTIFICATIONS_FAILED = fromString("chatStartEventNotificationsFailed")
|
||||
val CHAT_FETCH_MESSAGES_FAILED = fromString("chatFetchMessagesFailed")
|
||||
val CHAT_REQUEST_PARTICIPANTS_FETCH_FAILED = fromString("chatRequestParticipantsFetchFailed")
|
||||
val CHAT_REQUEST_PARTICIPANTS_FETCH_FAILED =
|
||||
fromString("chatRequestParticipantsFetchFailed")
|
||||
|
||||
private fun fromString(name: String): ErrorCode {
|
||||
return fromString(name, ErrorCode::class.java)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package com.azure.android.communication.ui.chat.presentation.ui.chat
|
||||
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
internal class ChatScreenStateViewModel : ViewModel() {
|
||||
var messageInputTextState = mutableStateOf("")
|
||||
}
|
|
@ -7,22 +7,47 @@ import androidx.compose.foundation.layout.Arrangement
|
|||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.MutableState
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.azure.android.communication.ui.chat.models.MessageInfoModel
|
||||
import com.azure.android.communication.ui.chat.redux.action.Action
|
||||
import com.azure.android.communication.ui.chat.redux.action.ChatAction
|
||||
import com.azure.android.communication.ui.chat.redux.state.ChatStatus
|
||||
import com.azure.android.communication.ui.chat.service.sdk.wrapper.ChatMessageType
|
||||
|
||||
@Composable
|
||||
internal fun BottomBarView(postMessage: (String) -> Unit) {
|
||||
internal fun BottomBarView(
|
||||
messageInputTextState: MutableState<String>,
|
||||
chatStatus: ChatStatus,
|
||||
postAction: (Action) -> Unit
|
||||
) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceEvenly,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
|
||||
MessageInputView(contentDescription = "Message Input Field")
|
||||
MessageInputView(
|
||||
contentDescription = "Message Input Field",
|
||||
messageInputTextState = messageInputTextState
|
||||
)
|
||||
|
||||
SendMessageButtonView("Send Message Button") {
|
||||
postMessage("Test Message @ ${System.currentTimeMillis()}")
|
||||
SendMessageButtonView("Send Message Button", chatStatus = chatStatus) {
|
||||
postAction(
|
||||
ChatAction.SendMessage(
|
||||
MessageInfoModel(
|
||||
id = null,
|
||||
messageType = ChatMessageType.TEXT,
|
||||
internalId = null,
|
||||
content = messageInputTextState.value
|
||||
)
|
||||
)
|
||||
)
|
||||
messageInputTextState.value = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,5 +55,5 @@ internal fun BottomBarView(postMessage: (String) -> Unit) {
|
|||
@Preview
|
||||
@Composable
|
||||
internal fun PreviewBottomBarView() {
|
||||
BottomBarView {}
|
||||
BottomBarView(remember { mutableStateOf("") }, ChatStatus.INITIALIZED) {}
|
||||
}
|
||||
|
|
|
@ -12,11 +12,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||
import androidx.compose.foundation.text.BasicText
|
||||
import androidx.compose.foundation.text.BasicTextField
|
||||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.focus.onFocusChanged
|
||||
|
@ -27,24 +23,27 @@ import androidx.compose.ui.semantics.semantics
|
|||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.azure.android.communication.ui.chat.R
|
||||
import com.azure.android.communication.ui.chat.presentation.style.ChatCompositeTheme
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.MutableState
|
||||
import androidx.compose.runtime.remember
|
||||
|
||||
@Composable
|
||||
fun MessageInputView(contentDescription: String) {
|
||||
var textState by rememberSaveable(stateSaver = TextFieldValue.Saver) {
|
||||
mutableStateOf(
|
||||
TextFieldValue()
|
||||
)
|
||||
}
|
||||
internal fun MessageInputView(
|
||||
contentDescription: String,
|
||||
messageInputTextState: MutableState<String>
|
||||
) {
|
||||
var focusState by rememberSaveable { mutableStateOf(false) }
|
||||
|
||||
MessageInput(
|
||||
onTextChanged = { textState = it },
|
||||
textState = textState,
|
||||
onTextChanged = { messageInputTextState.value = it },
|
||||
textContent = messageInputTextState.value,
|
||||
onTextFieldFocused = { focusState = it },
|
||||
focusState = focusState,
|
||||
contentDescription = contentDescription
|
||||
|
@ -54,8 +53,8 @@ fun MessageInputView(contentDescription: String) {
|
|||
@Composable
|
||||
internal fun MessageInput(
|
||||
keyboardType: KeyboardType = KeyboardType.Text,
|
||||
onTextChanged: (TextFieldValue) -> Unit,
|
||||
textState: TextFieldValue,
|
||||
onTextChanged: (String) -> Unit,
|
||||
textContent: String,
|
||||
onTextFieldFocused: (Boolean) -> Unit,
|
||||
focusState: Boolean,
|
||||
contentDescription: String
|
||||
|
@ -80,7 +79,7 @@ internal fun MessageInput(
|
|||
.onFocusChanged { onTextFieldFocused(it.isFocused) }
|
||||
.then(semantics),
|
||||
|
||||
value = textState,
|
||||
value = textContent,
|
||||
onValueChange = { onTextChanged(it) },
|
||||
textStyle = TextStyle(
|
||||
color = textColor
|
||||
|
@ -97,7 +96,7 @@ internal fun MessageInput(
|
|||
contentAlignment = Alignment.CenterStart,
|
||||
) {
|
||||
|
||||
if (textState.text.isEmpty() && !focusState) {
|
||||
if (textContent.isEmpty() && !focusState) {
|
||||
BasicText(
|
||||
text = stringResource(R.string.azure_communication_ui_chat_enter_a_message),
|
||||
style = TextStyle(
|
||||
|
@ -115,5 +114,5 @@ internal fun MessageInput(
|
|||
@Preview
|
||||
@Composable
|
||||
internal fun PreviewMessageInputView() {
|
||||
MessageInputView("Message Input Field")
|
||||
MessageInputView("Message Input Field", remember { mutableStateOf("") })
|
||||
}
|
||||
|
|
|
@ -20,8 +20,19 @@ internal fun MessageView(viewModel: MessageViewModel, isGrouped: Boolean = false
|
|||
val offsetPadding = (LocalConfiguration.current.screenWidthDp * 0.1).dp
|
||||
|
||||
val messagePadding: Dp = 6.dp
|
||||
fun Modifier.participantMessageView(): Modifier = this.padding(end = offsetPadding, start = messagePadding, top = messagePadding, bottom = messagePadding)
|
||||
fun Modifier.selfMessageView(): Modifier = this.padding(end = messagePadding, start = offsetPadding, top = messagePadding, bottom = messagePadding)
|
||||
fun Modifier.participantMessageView(): Modifier = this.padding(
|
||||
end = offsetPadding,
|
||||
start = messagePadding,
|
||||
top = messagePadding,
|
||||
bottom = messagePadding
|
||||
)
|
||||
|
||||
fun Modifier.selfMessageView(): Modifier = this.padding(
|
||||
end = messagePadding,
|
||||
start = offsetPadding,
|
||||
top = messagePadding,
|
||||
bottom = messagePadding
|
||||
)
|
||||
|
||||
Row(modifier = if (viewModel.message.isCurrentUser) Modifier.selfMessageView() else Modifier.participantMessageView()) {
|
||||
TextMessageView(message = viewModel.message, isGrouped)
|
||||
|
|
|
@ -18,22 +18,28 @@ import androidx.compose.ui.semantics.semantics
|
|||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.azure.android.communication.ui.chat.R
|
||||
import com.azure.android.communication.ui.chat.redux.state.ChatStatus
|
||||
|
||||
@Composable
|
||||
internal fun SendMessageButtonView(
|
||||
contentDescription: String,
|
||||
modifier: Modifier = Modifier,
|
||||
chatStatus: ChatStatus,
|
||||
onClick: () -> Unit = {},
|
||||
) {
|
||||
val semantics = Modifier.semantics {
|
||||
this.contentDescription = contentDescription
|
||||
this.role = Role.Image
|
||||
}
|
||||
val painter =
|
||||
painterResource(id = R.drawable.azure_communication_ui_chat_ic_fluent_send_message_button_20_filled)
|
||||
val painter = if (chatStatus == ChatStatus.INITIALIZED)
|
||||
painterResource(id = R.drawable.azure_communication_ui_chat_ic_fluent_send_message_button_20_filled_enabled)
|
||||
else
|
||||
painterResource(id = R.drawable.azure_communication_ui_chat_ic_fluent_send_message_button_20_filled_disabled)
|
||||
Box(
|
||||
modifier = Modifier.clickable {
|
||||
onClick()
|
||||
if (chatStatus == ChatStatus.INITIALIZED) {
|
||||
onClick()
|
||||
}
|
||||
}
|
||||
) {
|
||||
Image(
|
||||
|
@ -50,5 +56,8 @@ internal fun SendMessageButtonView(
|
|||
@Composable
|
||||
@Preview(showBackground = true)
|
||||
internal fun PreviewSendMessageButtonView() {
|
||||
SendMessageButtonView(contentDescription = "Send Message Button")
|
||||
SendMessageButtonView(
|
||||
contentDescription = "Send Message Button",
|
||||
chatStatus = ChatStatus.INITIALIZED
|
||||
)
|
||||
}
|
||||
|
|
|
@ -73,5 +73,12 @@ internal fun TextMessageView(message: MessageInfoModel, isGrouped: Boolean) {
|
|||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
internal fun PreviewTextMessageView() {
|
||||
TextMessageView(MessageInfoModel(id = "1", content = "Test Message", messageType = ChatMessageType.TEXT), isGrouped = false)
|
||||
TextMessageView(
|
||||
MessageInfoModel(
|
||||
id = "1",
|
||||
content = "Test Message",
|
||||
messageType = ChatMessageType.TEXT
|
||||
),
|
||||
isGrouped = false
|
||||
)
|
||||
}
|
||||
|
|
|
@ -68,10 +68,14 @@ internal fun PreviewTypingIndicatorView() {
|
|||
TypingIndicatorView(
|
||||
participants = listOf(
|
||||
RemoteParticipantInfoModel(
|
||||
CommunicationIdentifier.CommunicationUserIdentifier(""), displayName = "User A", isTyping = true
|
||||
CommunicationIdentifier.CommunicationUserIdentifier(""),
|
||||
displayName = "User A",
|
||||
isTyping = true
|
||||
),
|
||||
RemoteParticipantInfoModel(
|
||||
CommunicationIdentifier.CommunicationUserIdentifier(""), displayName = "User B", isTyping = true
|
||||
CommunicationIdentifier.CommunicationUserIdentifier(""),
|
||||
displayName = "User B",
|
||||
isTyping = true
|
||||
),
|
||||
)
|
||||
)
|
||||
|
|
|
@ -14,10 +14,12 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.azure.android.communication.ui.chat.R
|
||||
import com.azure.android.communication.ui.chat.models.MessageInfoModel
|
||||
import com.azure.android.communication.ui.chat.models.RemoteParticipantInfoModel
|
||||
import com.azure.android.communication.ui.chat.presentation.style.ChatCompositeTheme
|
||||
import com.azure.android.communication.ui.chat.presentation.ui.chat.ChatScreenStateViewModel
|
||||
import com.azure.android.communication.ui.chat.presentation.ui.chat.components.ActionBarView
|
||||
import com.azure.android.communication.ui.chat.presentation.ui.chat.components.BottomBarView
|
||||
import com.azure.android.communication.ui.chat.presentation.ui.chat.components.MessageListView
|
||||
|
@ -29,7 +31,10 @@ import com.azure.android.communication.ui.chat.service.sdk.wrapper.ChatMessageTy
|
|||
import com.azure.android.communication.ui.chat.service.sdk.wrapper.CommunicationIdentifier
|
||||
|
||||
@Composable
|
||||
internal fun ChatScreen(viewModel: ChatScreenViewModel) {
|
||||
internal fun ChatScreen(
|
||||
viewModel: ChatScreenViewModel,
|
||||
stateViewModel: ChatScreenStateViewModel = viewModel()
|
||||
) {
|
||||
|
||||
Scaffold(
|
||||
topBar = {
|
||||
|
@ -43,7 +48,7 @@ internal fun ChatScreen(viewModel: ChatScreenViewModel) {
|
|||
},
|
||||
content = {
|
||||
if (viewModel.showError) {
|
||||
Column() {
|
||||
Column {
|
||||
BasicText("ERROR")
|
||||
BasicText(viewModel.errorMessage)
|
||||
}
|
||||
|
@ -61,7 +66,13 @@ internal fun ChatScreen(viewModel: ChatScreenViewModel) {
|
|||
TypingIndicatorView(participants = remoteParticipants.values)
|
||||
}
|
||||
},
|
||||
bottomBar = { BottomBarView(viewModel.postMessage) }
|
||||
bottomBar = {
|
||||
BottomBarView(
|
||||
messageInputTextState = stateViewModel.messageInputTextState,
|
||||
chatStatus = viewModel.chatStatus,
|
||||
postAction = viewModel.postAction
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -97,15 +108,30 @@ internal fun ChatScreenPreview() {
|
|||
),
|
||||
|
||||
).toViewModelList(),
|
||||
state = ChatStatus.INITIALIZED.name,
|
||||
chatStatus = ChatStatus.INITIALIZED,
|
||||
buildCount = 2,
|
||||
postMessage = {},
|
||||
postAction = {},
|
||||
participants = listOf(
|
||||
RemoteParticipantInfoModel(CommunicationIdentifier.UnknownIdentifier("7A13DD2C-B49F-4521-9364-975F12F6E333"), "John Smith"),
|
||||
RemoteParticipantInfoModel(CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"), "William Brown"),
|
||||
RemoteParticipantInfoModel(CommunicationIdentifier.UnknownIdentifier("152D5D76-3DDC-44BE-873F-A4575F8C91DF"), "James Miller"),
|
||||
RemoteParticipantInfoModel(CommunicationIdentifier.UnknownIdentifier("85FF2697-2ABB-480E-ACCA-09EBE3D6F5EC"), "George Johnson"),
|
||||
RemoteParticipantInfoModel(CommunicationIdentifier.UnknownIdentifier("DB75F1F0-65E4-46B0-A213-DA4F574659A5"), "Henry Jones"),
|
||||
RemoteParticipantInfoModel(
|
||||
CommunicationIdentifier.UnknownIdentifier("7A13DD2C-B49F-4521-9364-975F12F6E333"),
|
||||
"John Smith"
|
||||
),
|
||||
RemoteParticipantInfoModel(
|
||||
CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"),
|
||||
"William Brown"
|
||||
),
|
||||
RemoteParticipantInfoModel(
|
||||
CommunicationIdentifier.UnknownIdentifier("152D5D76-3DDC-44BE-873F-A4575F8C91DF"),
|
||||
"James Miller"
|
||||
),
|
||||
RemoteParticipantInfoModel(
|
||||
CommunicationIdentifier.UnknownIdentifier("85FF2697-2ABB-480E-ACCA-09EBE3D6F5EC"),
|
||||
"George Johnson"
|
||||
),
|
||||
RemoteParticipantInfoModel(
|
||||
CommunicationIdentifier.UnknownIdentifier("DB75F1F0-65E4-46B0-A213-DA4F574659A5"),
|
||||
"Henry Jones"
|
||||
),
|
||||
).associateBy({ it.userIdentifier.id })
|
||||
|
||||
// error = ChatStateError(
|
||||
|
|
|
@ -4,28 +4,26 @@
|
|||
package com.azure.android.communication.ui.chat.presentation.ui.viewmodel
|
||||
|
||||
import com.azure.android.communication.ui.chat.error.ChatStateError
|
||||
import com.azure.android.communication.ui.chat.models.MessageInfoModel
|
||||
import com.azure.android.communication.ui.chat.models.RemoteParticipantInfoModel
|
||||
import com.azure.android.communication.ui.chat.redux.AppStore
|
||||
import com.azure.android.communication.ui.chat.redux.action.ChatAction
|
||||
import com.azure.android.communication.ui.chat.redux.action.Action
|
||||
import com.azure.android.communication.ui.chat.redux.state.ChatStatus
|
||||
|
||||
import com.azure.android.communication.ui.chat.redux.state.ReduxState
|
||||
import com.azure.android.communication.ui.chat.repository.MessageRepository
|
||||
import com.azure.android.communication.ui.chat.service.sdk.wrapper.ChatMessageType
|
||||
|
||||
// View Model for the Chat Screen
|
||||
internal data class ChatScreenViewModel(
|
||||
val messages: List<MessageViewModel>,
|
||||
val state: String,
|
||||
val chatStatus: ChatStatus,
|
||||
var buildCount: Int,
|
||||
val postMessage: (String) -> Unit,
|
||||
val postAction: (Action) -> Unit,
|
||||
private val error: ChatStateError? = null,
|
||||
val participants: Map<String, RemoteParticipantInfoModel>
|
||||
) {
|
||||
val showError get() = error != null
|
||||
val errorMessage get() = error?.errorCode?.toString() ?: ""
|
||||
val isLoading get() = state != ChatStatus.INITIALIZED.name && !showError
|
||||
val isLoading get() = chatStatus != ChatStatus.INITIALIZED && !showError
|
||||
}
|
||||
|
||||
// Internal counter for early debugging
|
||||
|
@ -35,23 +33,25 @@ private var buildCount = 0
|
|||
internal fun buildChatScreenViewModel(
|
||||
store: AppStore<ReduxState>,
|
||||
repository: MessageRepository
|
||||
) =
|
||||
ChatScreenViewModel(
|
||||
): ChatScreenViewModel {
|
||||
|
||||
if (dispatchers == null) {
|
||||
dispatchers = Dispatchers(store)
|
||||
}
|
||||
return ChatScreenViewModel(
|
||||
messages = repository.toViewModelList(),
|
||||
state = store.getCurrentState().chatState.chatStatus.name,
|
||||
chatStatus = store.getCurrentState().chatState.chatStatus,
|
||||
buildCount = buildCount++,
|
||||
error = store.getCurrentState().errorState.chatStateError,
|
||||
postMessage = {
|
||||
store.dispatch(
|
||||
ChatAction.SendMessage(
|
||||
MessageInfoModel(
|
||||
id = null,
|
||||
messageType = ChatMessageType.TEXT,
|
||||
internalId = null,
|
||||
content = it
|
||||
)
|
||||
)
|
||||
)
|
||||
},
|
||||
participants = store.getCurrentState().participantState.participants
|
||||
postAction = dispatchers!!::postAction,
|
||||
participants = store.getCurrentState().participantState.participants,
|
||||
)
|
||||
}
|
||||
|
||||
internal var dispatchers: Dispatchers? = null
|
||||
|
||||
internal class Dispatchers(val store: AppStore<ReduxState>) {
|
||||
fun postAction(action: Action) {
|
||||
store.dispatch(action)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@ package com.azure.android.communication.ui.chat.redux.action
|
|||
import com.azure.android.communication.ui.chat.models.RemoteParticipantInfoModel
|
||||
|
||||
internal sealed class ParticipantAction : Action {
|
||||
class ParticipantsAdded(val participants: List<RemoteParticipantInfoModel>) : ParticipantAction()
|
||||
class ParticipantsRemoved(val participants: List<RemoteParticipantInfoModel>) : ParticipantAction()
|
||||
class ParticipantsAdded(val participants: List<RemoteParticipantInfoModel>) :
|
||||
ParticipantAction()
|
||||
|
||||
class ParticipantsRemoved(val participants: List<RemoteParticipantInfoModel>) :
|
||||
ParticipantAction()
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ internal class ChatServiceListener(
|
|||
ChatEventType.CHAT_MESSAGE_DELETED -> {
|
||||
dispatch(ChatAction.MessageDeleted(message = it.infoModel))
|
||||
}
|
||||
else -> { }
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
is ParticipantTimestampInfoModel -> {
|
||||
|
|
|
@ -2,7 +2,8 @@ package com.azure.android.communication.ui.chat.utilities
|
|||
|
||||
import androidx.compose.foundation.lazy.LazyListState
|
||||
|
||||
fun LazyListState.isScrolledToEnd() = layoutInfo.visibleItemsInfo.lastOrNull()?.index == layoutInfo.totalItemsCount - 1
|
||||
fun LazyListState.isScrolledToEnd() =
|
||||
layoutInfo.visibleItemsInfo.lastOrNull()?.index == layoutInfo.totalItemsCount - 1
|
||||
|
||||
fun LazyListState.outOfViewItemCount(): Int {
|
||||
val lastIdx = layoutInfo.visibleItemsInfo.lastOrNull()?.index
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the MIT License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:fillColor="#6E6E6E"
|
||||
android:pathData="M10.815,10.197L3.283,11.453C3.107,11.482 2.96,11.603 2.897,11.771L0.299,18.728C0.051,19.368 0.72,19.978 1.334,19.671L19.334,10.671C19.886,10.395 19.886,9.606 19.334,9.329L1.334,0.329C0.72,0.023 0.051,0.633 0.299,1.272L2.897,8.229C2.96,8.397 3.107,8.518 3.283,8.548L10.815,9.803C10.924,9.821 10.997,9.924 10.979,10.033C10.965,10.117 10.899,10.183 10.815,10.197Z" />
|
||||
</vector>
|
|
@ -5,5 +5,5 @@
|
|||
<resources>
|
||||
<string name="azure_communication_ui_chat_chat_action_bar_title">Chat</string>
|
||||
<string name="azure_communication_ui_chat_title_activity_compose_chat">ComposeChatActivity</string>
|
||||
<string name="azure_communication_ui_chat_enter_a_message">Enter a message</string>
|
||||
<string name="azure_communication_ui_chat_enter_a_message">Hey, whats up?</string>
|
||||
</resources>
|
|
@ -14,10 +14,22 @@ import org.mockito.junit.MockitoJUnitRunner
|
|||
|
||||
@RunWith(MockitoJUnitRunner::class)
|
||||
class ParticipantsReducerUnitTest {
|
||||
private val userOne = RemoteParticipantInfoModel(userIdentifier = CommunicationIdentifier.UnknownIdentifier("7A13DD2C-B49F-4521-9364-975F12F6E333"), "One")
|
||||
private val userTwo = RemoteParticipantInfoModel(userIdentifier = CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"), "Two")
|
||||
private val userThree = RemoteParticipantInfoModel(userIdentifier = CommunicationIdentifier.UnknownIdentifier("152D5D76-3DDC-44BE-873F-A4575F8C91DF"), "Three")
|
||||
private val userFour = RemoteParticipantInfoModel(userIdentifier = CommunicationIdentifier.UnknownIdentifier("85FF2697-2ABB-480E-ACCA-09EBE3D6F5EC"), "Four")
|
||||
private val userOne = RemoteParticipantInfoModel(
|
||||
userIdentifier = CommunicationIdentifier.UnknownIdentifier("7A13DD2C-B49F-4521-9364-975F12F6E333"),
|
||||
"One"
|
||||
)
|
||||
private val userTwo = RemoteParticipantInfoModel(
|
||||
userIdentifier = CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"),
|
||||
"Two"
|
||||
)
|
||||
private val userThree = RemoteParticipantInfoModel(
|
||||
userIdentifier = CommunicationIdentifier.UnknownIdentifier("152D5D76-3DDC-44BE-873F-A4575F8C91DF"),
|
||||
"Three"
|
||||
)
|
||||
private val userFour = RemoteParticipantInfoModel(
|
||||
userIdentifier = CommunicationIdentifier.UnknownIdentifier("85FF2697-2ABB-480E-ACCA-09EBE3D6F5EC"),
|
||||
"Four"
|
||||
)
|
||||
|
||||
@Test
|
||||
fun participantsReducer_reduce_when_actionAddParticipants_then_changeParticipantStateParticipants() {
|
||||
|
@ -32,7 +44,10 @@ class ParticipantsReducerUnitTest {
|
|||
val newState = reducer.reduce(previousState, action)
|
||||
|
||||
// assert
|
||||
Assert.assertEquals(newState.participants, listOf(userOne, userTwo, userThree, userFour).associateBy({ it.userIdentifier.id }))
|
||||
Assert.assertEquals(
|
||||
newState.participants,
|
||||
listOf(userOne, userTwo, userThree, userFour).associateBy({ it.userIdentifier.id })
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -42,14 +57,26 @@ class ParticipantsReducerUnitTest {
|
|||
val previousState = ParticipantsState(
|
||||
participants = listOf(userOne, userTwo).associateBy({ it.userIdentifier.id })
|
||||
)
|
||||
val userTwo_duplicate = RemoteParticipantInfoModel(userIdentifier = CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"), "Two")
|
||||
val action = ParticipantAction.ParticipantsAdded(participants = listOf(userTwo_duplicate, userThree, userFour))
|
||||
val userTwo_duplicate = RemoteParticipantInfoModel(
|
||||
userIdentifier = CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"),
|
||||
"Two"
|
||||
)
|
||||
val action = ParticipantAction.ParticipantsAdded(
|
||||
participants = listOf(
|
||||
userTwo_duplicate,
|
||||
userThree,
|
||||
userFour
|
||||
)
|
||||
)
|
||||
|
||||
// act
|
||||
val newState = reducer.reduce(previousState, action)
|
||||
|
||||
// assert
|
||||
Assert.assertEquals(newState.participants, listOf(userOne, userTwo, userThree, userFour).associateBy({ it.userIdentifier.id }))
|
||||
Assert.assertEquals(
|
||||
newState.participants,
|
||||
listOf(userOne, userTwo, userThree, userFour).associateBy({ it.userIdentifier.id })
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -59,9 +86,20 @@ class ParticipantsReducerUnitTest {
|
|||
val previousState = ParticipantsState(
|
||||
participants = listOf(userOne, userTwo).associateBy({ it.userIdentifier.id })
|
||||
)
|
||||
val userOne_duplicate = RemoteParticipantInfoModel(userIdentifier = CommunicationIdentifier.UnknownIdentifier("7A13DD2C-B49F-4521-9364-975F12F6E333"), "One")
|
||||
val userTwo_duplicate = RemoteParticipantInfoModel(userIdentifier = CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"), "Two")
|
||||
val action = ParticipantAction.ParticipantsAdded(participants = listOf(userOne_duplicate, userTwo_duplicate))
|
||||
val userOne_duplicate = RemoteParticipantInfoModel(
|
||||
userIdentifier = CommunicationIdentifier.UnknownIdentifier("7A13DD2C-B49F-4521-9364-975F12F6E333"),
|
||||
"One"
|
||||
)
|
||||
val userTwo_duplicate = RemoteParticipantInfoModel(
|
||||
userIdentifier = CommunicationIdentifier.UnknownIdentifier("931804B1-D72E-4E70-BFEA-7813C7761BD2"),
|
||||
"Two"
|
||||
)
|
||||
val action = ParticipantAction.ParticipantsAdded(
|
||||
participants = listOf(
|
||||
userOne_duplicate,
|
||||
userTwo_duplicate
|
||||
)
|
||||
)
|
||||
|
||||
// act
|
||||
val newState = reducer.reduce(previousState, action)
|
||||
|
@ -74,13 +112,24 @@ class ParticipantsReducerUnitTest {
|
|||
fun participantsReducer_reduce_when_actionRemoveParticipants_then_changeParticipantStateParticipants() {
|
||||
// arrange
|
||||
val reducer = ParticipantsReducerImpl()
|
||||
val previousState = ParticipantsState(participants = listOf(userOne, userTwo, userThree, userFour).associateBy({ it.userIdentifier.id }))
|
||||
val action = ParticipantAction.ParticipantsRemoved(participants = listOf(userThree, userFour))
|
||||
val previousState = ParticipantsState(
|
||||
participants = listOf(
|
||||
userOne,
|
||||
userTwo,
|
||||
userThree,
|
||||
userFour
|
||||
).associateBy({ it.userIdentifier.id })
|
||||
)
|
||||
val action =
|
||||
ParticipantAction.ParticipantsRemoved(participants = listOf(userThree, userFour))
|
||||
|
||||
// act
|
||||
val newState = reducer.reduce(previousState, action)
|
||||
|
||||
// assert
|
||||
Assert.assertEquals(newState.participants, listOf(userOne, userTwo).associateBy({ it.userIdentifier.id }))
|
||||
Assert.assertEquals(
|
||||
newState.participants,
|
||||
listOf(userOne, userTwo).associateBy({ it.userIdentifier.id })
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,5 +34,6 @@ library. Showcases use of both Java and Kotlin to run library.
|
|||
- `IDENTITY`="..." # the identity for chat
|
||||
- `THREAD_ID`="..." # chat thread id
|
||||
4. For build variants:
|
||||
You can add variants selection for build to indicate which demo app you want to run or debug (calling, chat, call-with-chat)
|
||||
You can add variants selection for build to indicate which demo app you want to run or debug (
|
||||
calling, chat, call-with-chat)
|
||||
5. Build and Run
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp"
|
||||
>
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp">
|
||||
|
||||
<uses-sdk tools:overrideLibrary="com.microsoft.office.outlook.magnifierlib" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
@ -17,13 +16,11 @@
|
|||
<activity
|
||||
android:name="com.azure.android.communication.ui.callwithchatdemoapp.SettingsActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/Launcher.Theme"
|
||||
/>
|
||||
android:theme="@style/Launcher.Theme" />
|
||||
<activity
|
||||
android:name="com.azure.android.communication.ui.callwithchatdemoapp.CallWithChatLauncherActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Launcher.Theme"
|
||||
>
|
||||
android:theme="@style/Launcher.Theme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
@ -36,8 +33,7 @@
|
|||
|
||||
<data
|
||||
android:host="calling"
|
||||
android:scheme="acsui"
|
||||
/>
|
||||
android:scheme="acsui" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
@ -48,13 +44,11 @@
|
|||
<data
|
||||
android:host="https://test"
|
||||
android:pathPrefix="/calling"
|
||||
android:scheme="https"
|
||||
/>
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="https://test"
|
||||
android:pathPrefix="/calling"
|
||||
android:scheme="http"
|
||||
/>
|
||||
android:scheme="http" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
|
|
@ -52,7 +52,8 @@ class RemoteParticipantJoinedHandler(
|
|||
val bitMap = BitmapFactory.decodeStream(url.openConnection().getInputStream())
|
||||
|
||||
val result = composite.setRemoteParticipantViewData(
|
||||
communicationIdentifier, CallWithChatCompositeParticipantViewData().setAvatarBitmap(bitMap)
|
||||
communicationIdentifier,
|
||||
CallWithChatCompositeParticipantViewData().setAvatarBitmap(bitMap)
|
||||
)
|
||||
|
||||
if (result == CallWithChatCompositeSetParticipantViewDataResult.PARTICIPANT_NOT_IN_CALL) {
|
||||
|
|
|
@ -65,12 +65,18 @@ internal class CallWithChatCompositeKotlinLauncher :
|
|||
CommunicationTokenCredential(communicationTokenRefreshOptions)
|
||||
|
||||
val locator: CallWithChatCompositeJoinLocator =
|
||||
if (groupId != null) CallWithChatCompositeCallAndChatLocator(acsEndpoint, groupId, chatThreadId)
|
||||
if (groupId != null) CallWithChatCompositeCallAndChatLocator(
|
||||
acsEndpoint,
|
||||
groupId,
|
||||
chatThreadId
|
||||
)
|
||||
else CallWithChatCompositeTeamsMeetingLinkLocator(acsEndpoint, meetingLink)
|
||||
|
||||
val remoteOptions = CallWithChatCompositeRemoteOptions(
|
||||
locator,
|
||||
authService.currentUserCommunicationIdentifier, communicationTokenCredential, displayName
|
||||
authService.currentUserCommunicationIdentifier,
|
||||
communicationTokenCredential,
|
||||
displayName
|
||||
)
|
||||
|
||||
val localOptions = CallWithChatCompositeLocalOptions()
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
@ -14,8 +13,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
tools:context=".CallLauncherActivity"
|
||||
>
|
||||
tools:context=".CallLauncherActivity">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/acsEndpointText"
|
||||
|
@ -24,8 +22,7 @@
|
|||
android:ems="10"
|
||||
android:hint="@string/acs_endpoint_hint"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/tokenFunctionRadioButton"
|
||||
|
@ -34,8 +31,7 @@
|
|||
android:checked="false"
|
||||
android:text="@string/token_function_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/acsEndpointText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/acsEndpointText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tokenFunctionUrlText"
|
||||
|
@ -45,8 +41,7 @@
|
|||
android:hint="@string/token_url_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionRadioButton"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionRadioButton" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/acsTokenRadioButton"
|
||||
|
@ -55,8 +50,7 @@
|
|||
android:checked="true"
|
||||
android:text="@string/acs_token_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="@id/tokenFunctionUrlText"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionUrlText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionUrlText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/acsTokenText"
|
||||
|
@ -66,8 +60,7 @@
|
|||
android:hint="@string/acs_token_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenRadioButton"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenRadioButton" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/acsCommunicationUserIdText"
|
||||
|
@ -76,8 +69,7 @@
|
|||
android:ems="10"
|
||||
android:hint="@string/acs_user_id_hint"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/userNameText"
|
||||
|
@ -88,8 +80,7 @@
|
|||
android:hint="@string/name_hint"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsCommunicationUserIdText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/acsCommunicationUserIdText" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/groupCallRadioButton"
|
||||
|
@ -99,8 +90,7 @@
|
|||
android:checked="true"
|
||||
android:text="@string/group_call_label"
|
||||
app:layout_constraintStart_toStartOf="@id/userNameText"
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/teamsMeetingRadioButton"
|
||||
|
@ -110,8 +100,7 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:text="@string/teams_meeting_label"
|
||||
app:layout_constraintStart_toEndOf="@id/groupCallRadioButton"
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/groupIdOrTeamsMeetingLinkText"
|
||||
|
@ -121,8 +110,7 @@
|
|||
android:hint="@string/group_call_id_or_teams_meeting_hint"
|
||||
android:inputType="textNoSuggestions"
|
||||
app:layout_constraintStart_toStartOf="@id/groupCallRadioButton"
|
||||
app:layout_constraintTop_toBottomOf="@id/teamsMeetingRadioButton"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/teamsMeetingRadioButton" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/chatThreadIdText"
|
||||
|
@ -133,8 +121,7 @@
|
|||
android:hint="@string/chat_thread_id_hint"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/groupIdOrTeamsMeetingLinkText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/groupIdOrTeamsMeetingLinkText" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/javaOrKotlinContainer"
|
||||
|
@ -143,15 +130,13 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="@id/groupIdOrTeamsMeetingLinkText"
|
||||
app:layout_constraintTop_toBottomOf="@id/chatThreadIdText"
|
||||
>
|
||||
app:layout_constraintTop_toBottomOf="@id/chatThreadIdText">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_type_text"
|
||||
android:textSize="17sp"
|
||||
/>
|
||||
android:textSize="17sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/kotlinButton"
|
||||
|
@ -161,8 +146,7 @@
|
|||
android:checked="true"
|
||||
android:padding="5dp"
|
||||
android:text="@string/kotlin"
|
||||
android:textSize="17sp"
|
||||
/>
|
||||
android:textSize="17sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/javaButton"
|
||||
|
@ -170,8 +154,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:text="@string/java"
|
||||
android:textSize="17sp"
|
||||
/>
|
||||
android:textSize="17sp" />
|
||||
</RadioGroup>
|
||||
|
||||
<Button
|
||||
|
@ -181,8 +164,7 @@
|
|||
android:text="@string/launch_button_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/javaOrKotlinContainer"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/javaOrKotlinContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -190,24 +172,21 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/launchButton"
|
||||
>
|
||||
app:layout_constraintTop_toBottomOf="@+id/launchButton">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/version"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/versionText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/debug"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
|
@ -4,8 +4,7 @@
|
|||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -15,8 +14,7 @@
|
|||
android:layout_marginStart="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:layout_marginEnd="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:orientation="vertical"
|
||||
tools:context=".SettingsActivity"
|
||||
>
|
||||
tools:context=".SettingsActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/language_setting_text_view"
|
||||
|
@ -25,24 +23,21 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/language_setting_label"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/language_setting_label_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/language_adapter_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/auto_complete_text_view"
|
||||
|
@ -54,8 +49,7 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:paddingBottom="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/language_default_selection"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<CheckBox
|
||||
|
@ -64,8 +58,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:onClick="onCheckBoxTap"
|
||||
android:text="@string/is_rtl_check_box_label"
|
||||
tools:ignore="UsingOnClickInXml"
|
||||
/>
|
||||
tools:ignore="UsingOnClickInXml" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/call_setting_text_view"
|
||||
|
@ -74,21 +67,18 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/call_setting_label"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<com.azure.android.communication.ui.callwithchatdemoapp.launcher.FeatureFlagView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:layout_marginTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/callSellingAvatarInjection"
|
||||
|
@ -97,26 +87,22 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/local_avatar_injection"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.azure.android.communication.ui.callwithchatdemoapp.views.AvatarImageSelectionLinearlayout
|
||||
android:id="@+id/avatarImageSelectionLinearlayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarCatImageButton"
|
||||
|
@ -126,8 +112,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_cat"
|
||||
/>
|
||||
android:src="@drawable/image_cat" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarFoxImageButton"
|
||||
|
@ -137,8 +122,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_fox"
|
||||
/>
|
||||
android:src="@drawable/image_fox" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarKoalaImageButton"
|
||||
|
@ -148,8 +132,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_koala"
|
||||
/>
|
||||
android:src="@drawable/image_koala" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarMonkeyImageButton"
|
||||
|
@ -159,8 +142,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_monkey"
|
||||
/>
|
||||
android:src="@drawable/image_monkey" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarMouseImageButton"
|
||||
|
@ -170,8 +152,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_mouse"
|
||||
/>
|
||||
android:src="@drawable/image_mouse" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarOctopusImageButton"
|
||||
|
@ -181,8 +162,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_octopus"
|
||||
/>
|
||||
android:src="@drawable/image_octopus" />
|
||||
|
||||
</com.azure.android.communication.ui.callwithchatdemoapp.views.AvatarImageSelectionLinearlayout>
|
||||
</HorizontalScrollView>
|
||||
|
@ -192,24 +172,21 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:hint="@string/rendered_display_name"
|
||||
/>
|
||||
android:hint="@string/rendered_display_name" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/call_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:hint="@string/call_title"
|
||||
/>
|
||||
android:hint="@string/call_title" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/call_subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:hint="@string/call_subtitle"
|
||||
/>
|
||||
android:hint="@string/call_subtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/callSellingRemoteAvatarInjection"
|
||||
|
@ -218,15 +195,13 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/remote_avatar_injection"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/remote_avatar_injection_check_box"
|
||||
|
@ -234,8 +209,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:onClick="onCheckBoxTap"
|
||||
android:text="@string/remote_participant_inject_avatar"
|
||||
tools:ignore="UsingOnClickInXml"
|
||||
/>
|
||||
tools:ignore="UsingOnClickInXml" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
|
@ -6,8 +6,7 @@
|
|||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp"
|
||||
>
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp">
|
||||
|
||||
<uses-sdk tools:overrideLibrary="com.microsoft.office.outlook.magnifierlib" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
@ -17,13 +16,11 @@
|
|||
<activity
|
||||
android:name="com.azure.android.communication.ui.callingcompositedemoapp.SettingsActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/Launcher.Theme"
|
||||
/>
|
||||
android:theme="@style/Launcher.Theme" />
|
||||
<activity
|
||||
android:name="com.azure.android.communication.ui.callingcompositedemoapp.CallLauncherActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Launcher.Theme"
|
||||
>
|
||||
android:theme="@style/Launcher.Theme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
@ -36,8 +33,7 @@
|
|||
|
||||
<data
|
||||
android:host="calling"
|
||||
android:scheme="acsui"
|
||||
/>
|
||||
android:scheme="acsui" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
@ -48,13 +44,11 @@
|
|||
<data
|
||||
android:host="https://test"
|
||||
android:pathPrefix="/calling"
|
||||
android:scheme="https"
|
||||
/>
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="https://test"
|
||||
android:pathPrefix="/calling"
|
||||
android:scheme="http"
|
||||
/>
|
||||
android:scheme="http" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
@ -14,8 +13,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
tools:context=".CallLauncherActivity"
|
||||
>
|
||||
tools:context=".CallLauncherActivity">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/tokenFunctionRadioButton"
|
||||
|
@ -24,8 +22,7 @@
|
|||
android:checked="false"
|
||||
android:text="@string/token_function_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tokenFunctionUrlText"
|
||||
|
@ -35,8 +32,7 @@
|
|||
android:hint="@string/token_url_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionRadioButton"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionRadioButton" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/acsTokenRadioButton"
|
||||
|
@ -45,8 +41,7 @@
|
|||
android:checked="true"
|
||||
android:text="@string/acs_token_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="@id/tokenFunctionUrlText"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionUrlText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionUrlText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/acsTokenText"
|
||||
|
@ -56,8 +51,7 @@
|
|||
android:hint="@string/acs_token_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenRadioButton"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenRadioButton" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/userNameText"
|
||||
|
@ -68,8 +62,7 @@
|
|||
android:hint="@string/name_hint"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@id/acsTokenText"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenText" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/groupCallRadioButton"
|
||||
|
@ -79,8 +72,7 @@
|
|||
android:checked="true"
|
||||
android:text="@string/group_call_label"
|
||||
app:layout_constraintStart_toStartOf="@id/userNameText"
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/teamsMeetingRadioButton"
|
||||
|
@ -90,8 +82,7 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:text="@string/teams_meeting_label"
|
||||
app:layout_constraintStart_toEndOf="@id/groupCallRadioButton"
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/groupIdOrTeamsMeetingLinkText"
|
||||
|
@ -101,8 +92,7 @@
|
|||
android:hint="@string/group_call_id_or_teams_meeting_hint"
|
||||
android:inputType="textNoSuggestions"
|
||||
app:layout_constraintStart_toStartOf="@id/groupCallRadioButton"
|
||||
app:layout_constraintTop_toBottomOf="@id/teamsMeetingRadioButton"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/teamsMeetingRadioButton" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/javaOrKotlinContainer"
|
||||
|
@ -111,15 +101,13 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="@id/groupIdOrTeamsMeetingLinkText"
|
||||
app:layout_constraintTop_toBottomOf="@id/groupIdOrTeamsMeetingLinkText"
|
||||
>
|
||||
app:layout_constraintTop_toBottomOf="@id/groupIdOrTeamsMeetingLinkText">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_type_text"
|
||||
android:textSize="17sp"
|
||||
/>
|
||||
android:textSize="17sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/kotlinButton"
|
||||
|
@ -129,8 +117,7 @@
|
|||
android:checked="true"
|
||||
android:padding="5dp"
|
||||
android:text="@string/kotlin"
|
||||
android:textSize="17sp"
|
||||
/>
|
||||
android:textSize="17sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/javaButton"
|
||||
|
@ -138,8 +125,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:text="@string/java"
|
||||
android:textSize="17sp"
|
||||
/>
|
||||
android:textSize="17sp" />
|
||||
</RadioGroup>
|
||||
|
||||
<Button
|
||||
|
@ -149,8 +135,7 @@
|
|||
android:text="@string/launch_button_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/javaOrKotlinContainer"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/javaOrKotlinContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -158,24 +143,21 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/launchButton"
|
||||
>
|
||||
app:layout_constraintTop_toBottomOf="@+id/launchButton">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/version"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/versionText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/debug"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
|
@ -4,8 +4,7 @@
|
|||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -15,8 +14,7 @@
|
|||
android:layout_marginStart="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:layout_marginEnd="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:orientation="vertical"
|
||||
tools:context=".SettingsActivity"
|
||||
>
|
||||
tools:context=".SettingsActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/language_setting_text_view"
|
||||
|
@ -25,24 +23,21 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/language_setting_label"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/language_setting_label_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/language_adapter_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/auto_complete_text_view"
|
||||
|
@ -54,8 +49,7 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:paddingBottom="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/language_default_selection"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<CheckBox
|
||||
|
@ -64,8 +58,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:onClick="onCheckBoxTap"
|
||||
android:text="@string/is_rtl_check_box_label"
|
||||
tools:ignore="UsingOnClickInXml"
|
||||
/>
|
||||
tools:ignore="UsingOnClickInXml" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/call_setting_text_view"
|
||||
|
@ -74,21 +67,18 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/call_setting_label"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<com.azure.android.communication.ui.callingcompositedemoapp.launcher.FeatureFlagView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:layout_marginTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/callSellingAvatarInjection"
|
||||
|
@ -97,26 +87,22 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/local_avatar_injection"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.azure.android.communication.ui.callingcompositedemoapp.views.AvatarImageSelectionLinearlayout
|
||||
android:id="@+id/avatarImageSelectionLinearlayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarCatImageButton"
|
||||
|
@ -126,8 +112,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_cat"
|
||||
/>
|
||||
android:src="@drawable/image_cat" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarFoxImageButton"
|
||||
|
@ -137,8 +122,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_fox"
|
||||
/>
|
||||
android:src="@drawable/image_fox" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarKoalaImageButton"
|
||||
|
@ -148,8 +132,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_koala"
|
||||
/>
|
||||
android:src="@drawable/image_koala" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarMonkeyImageButton"
|
||||
|
@ -159,8 +142,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_monkey"
|
||||
/>
|
||||
android:src="@drawable/image_monkey" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarMouseImageButton"
|
||||
|
@ -170,8 +152,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_mouse"
|
||||
/>
|
||||
android:src="@drawable/image_mouse" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/avatarOctopusImageButton"
|
||||
|
@ -181,8 +162,7 @@
|
|||
android:background="@drawable/avatar_image_button_background"
|
||||
android:padding="2dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/image_octopus"
|
||||
/>
|
||||
android:src="@drawable/image_octopus" />
|
||||
|
||||
</com.azure.android.communication.ui.callingcompositedemoapp.views.AvatarImageSelectionLinearlayout>
|
||||
</HorizontalScrollView>
|
||||
|
@ -192,24 +172,21 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:hint="@string/rendered_display_name"
|
||||
/>
|
||||
android:hint="@string/rendered_display_name" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/call_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:hint="@string/call_title"
|
||||
/>
|
||||
android:hint="@string/call_title" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/call_subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:hint="@string/call_subtitle"
|
||||
/>
|
||||
android:hint="@string/call_subtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/callSellingRemoteAvatarInjection"
|
||||
|
@ -218,15 +195,13 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_fab_margin"
|
||||
android:text="@string/remote_avatar_injection"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/azure_communication_ui_calling_color_on_surface"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/remote_avatar_injection_check_box"
|
||||
|
@ -234,8 +209,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:onClick="onCheckBoxTap"
|
||||
android:text="@string/remote_participant_inject_avatar"
|
||||
tools:ignore="UsingOnClickInXml"
|
||||
/>
|
||||
tools:ignore="UsingOnClickInXml" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
|
@ -20,8 +20,10 @@ class CallingCompositeParticipantListTest : BaseUiTest() {
|
|||
@Test
|
||||
fun testLocalUserName() {
|
||||
val userName = UiTestUtils.getTextFromEdittextView(R.id.userNameText)
|
||||
Assert.assertTrue("Invalid user: ${BuildConfig.USER_NAME}",
|
||||
BuildConfig.USER_NAME == "Test User")
|
||||
Assert.assertTrue(
|
||||
"Invalid user: ${BuildConfig.USER_NAME}",
|
||||
BuildConfig.USER_NAME == "Test User"
|
||||
)
|
||||
Assert.assertTrue("Invalid user: $userName", BuildConfig.USER_NAME == userName)
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class BottomCellViewHolderMatcher(
|
|||
Thread.sleep(1000)
|
||||
|
||||
return audioDeviceTextView.text.toString().contains(name) &&
|
||||
verifyCheckMarkMatches(checkMark.visibility == View.VISIBLE)
|
||||
verifyCheckMarkMatches(checkMark.visibility == View.VISIBLE)
|
||||
}
|
||||
|
||||
private fun verifyCheckMarkMatches(isCheckMarkVisible: Boolean): Boolean {
|
||||
|
|
|
@ -40,14 +40,14 @@ class RunWhenScreenOffOrLockedRule : TestRule {
|
|||
setTurnScreenOn(true)
|
||||
window.addFlags(
|
||||
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
|
||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
|
||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
|
||||
)
|
||||
} else {
|
||||
window.addFlags(
|
||||
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
|
||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or
|
||||
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
|
||||
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
|
||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or
|
||||
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
|
||||
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp"
|
||||
>
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp">
|
||||
|
||||
<uses-sdk tools:overrideLibrary="com.microsoft.office.outlook.magnifierlib" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
@ -17,13 +16,11 @@
|
|||
<activity
|
||||
android:name="com.azure.android.communication.ui.chatdemoapp.SettingsActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/Launcher.Theme"
|
||||
/>
|
||||
android:theme="@style/Launcher.Theme" />
|
||||
<activity
|
||||
android:name="com.azure.android.communication.ui.chatdemoapp.ChatLauncherActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Launcher.Theme"
|
||||
>
|
||||
android:theme="@style/Launcher.Theme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
@ -36,8 +33,7 @@
|
|||
|
||||
<data
|
||||
android:host="chat"
|
||||
android:scheme="acsui"
|
||||
/>
|
||||
android:scheme="acsui" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
@ -48,13 +44,11 @@
|
|||
<data
|
||||
android:host="https://test"
|
||||
android:pathPrefix="/chat"
|
||||
android:scheme="https"
|
||||
/>
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="https://test"
|
||||
android:pathPrefix="/chat"
|
||||
android:scheme="http"
|
||||
/>
|
||||
android:scheme="http" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
|
|
@ -3,164 +3,164 @@
|
|||
Licensed under the MIT License.
|
||||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
tools:context=".ChatLauncherActivity">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/tokenFunctionRadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/token_function_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tokenFunctionUrlText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
tools:context=".ChatLauncherActivity">
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/token_url_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionRadioButton" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/tokenFunctionRadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:text="@string/token_function_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:id="@+id/acsTokenRadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/acs_token_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="@id/tokenFunctionUrlText"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionUrlText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tokenFunctionUrlText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/token_url_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionRadioButton" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/acsTokenRadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/acs_token_radio_button_text"
|
||||
app:layout_constraintStart_toStartOf="@id/tokenFunctionUrlText"
|
||||
app:layout_constraintTop_toBottomOf="@id/tokenFunctionUrlText" />
|
||||
android:id="@+id/acsTokenText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/acs_token_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenRadioButton" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/acsTokenText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/acs_token_hint"
|
||||
android:inputType="textUri"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenRadioButton" />
|
||||
android:id="@+id/identity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ems="10"
|
||||
android:hint="@string/identity_hint"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@id/acsTokenText"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/identity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ems="10"
|
||||
android:hint="@string/identity_hint"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@id/acsTokenText"
|
||||
app:layout_constraintTop_toBottomOf="@id/acsTokenText" />
|
||||
android:id="@+id/userNameText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ems="10"
|
||||
android:hint="@string/name_hint"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@id/identity"
|
||||
app:layout_constraintTop_toBottomOf="@id/identity" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/userNameText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ems="10"
|
||||
android:hint="@string/name_hint"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@id/identity"
|
||||
app:layout_constraintTop_toBottomOf="@id/identity" />
|
||||
android:id="@+id/chatThreadID"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ems="10"
|
||||
android:hint="@string/chat_thread_id_hint"
|
||||
android:inputType="textNoSuggestions"
|
||||
app:layout_constraintStart_toStartOf="@id/userNameText"
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/chatThreadID"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/chat_thread_id_hint"
|
||||
android:inputType="textNoSuggestions"
|
||||
app:layout_constraintStart_toStartOf="@id/userNameText"
|
||||
app:layout_constraintTop_toBottomOf="@id/userNameText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/endPointURL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/end_point_url_hint"
|
||||
android:inputType="textNoSuggestions"
|
||||
app:layout_constraintStart_toStartOf="@id/chatThreadID"
|
||||
app:layout_constraintTop_toBottomOf="@id/chatThreadID" />
|
||||
android:id="@+id/endPointURL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ems="10"
|
||||
android:hint="@string/end_point_url_hint"
|
||||
android:inputType="textNoSuggestions"
|
||||
app:layout_constraintStart_toStartOf="@id/chatThreadID"
|
||||
app:layout_constraintTop_toBottomOf="@id/chatThreadID" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/javaOrKotlinContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="@id/endPointURL"
|
||||
app:layout_constraintTop_toBottomOf="@id/endPointURL">
|
||||
android:id="@+id/javaOrKotlinContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="@id/endPointURL"
|
||||
app:layout_constraintTop_toBottomOf="@id/endPointURL">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_type_text"
|
||||
android:textSize="17sp" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_type_text"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/kotlinButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:checked="true"
|
||||
android:padding="5dp"
|
||||
android:text="@string/kotlin"
|
||||
android:textSize="17sp" />
|
||||
android:id="@+id/kotlinButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:checked="true"
|
||||
android:padding="5dp"
|
||||
android:text="@string/kotlin"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/javaButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:text="@string/java"
|
||||
android:textSize="17sp" />
|
||||
android:id="@+id/javaButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:text="@string/java"
|
||||
android:textSize="17sp" />
|
||||
</RadioGroup>
|
||||
|
||||
<Button
|
||||
android:id="@+id/launchButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_button_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/javaOrKotlinContainer" />
|
||||
android:id="@+id/launchButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/launch_button_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/javaOrKotlinContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/launchButton">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/launchButton">
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/version"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/version"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/versionText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/debug"
|
||||
android:textSize="14sp" />
|
||||
android:id="@+id/versionText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/debug"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
|
@ -2,22 +2,18 @@
|
|||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the MIT License.
|
||||
-->
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/settings_page"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:layout_marginEnd="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:orientation="vertical"
|
||||
tools:context=".SettingsActivity"
|
||||
>
|
||||
tools:context=".SettingsActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/language_setting_text_view"
|
||||
|
@ -26,24 +22,21 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:text="@string/language_setting_label"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/language_setting_label_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/black"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
/>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/language_adapter_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding"
|
||||
>
|
||||
android:paddingTop="@dimen/azure_communication_ui_calling_inner_space_padding">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/auto_complete_text_view"
|
||||
|
@ -55,8 +48,7 @@
|
|||
android:paddingTop="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:paddingBottom="@dimen/azure_communication_ui_calling_side_margin"
|
||||
android:text="@string/language_default_selection"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<CheckBox
|
||||
|
@ -65,8 +57,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:onClick="onCheckBoxTap"
|
||||
android:text="@string/is_rtl_check_box_label"
|
||||
tools:ignore="UsingOnClickInXml"
|
||||
/>
|
||||
tools:ignore="UsingOnClickInXml" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
|
@ -6,8 +6,7 @@
|
|||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp"
|
||||
>
|
||||
package="com.azure.android.communication.ui.callingcompositedemoapp">
|
||||
|
||||
<uses-sdk tools:overrideLibrary="com.microsoft.office.outlook.magnifierlib" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
@ -17,17 +16,14 @@
|
|||
android:hardwareAccelerated="true"
|
||||
android:icon="${appIcon}"
|
||||
android:roundIcon="${appIconRound}"
|
||||
android:supportsRtl="true"
|
||||
>
|
||||
android:supportsRtl="true">
|
||||
|
||||
<activity
|
||||
android:name="com.microsoft.appcenter.distribute.DeepLinkActivity"
|
||||
android:exported="true"
|
||||
></activity>
|
||||
android:exported="true"></activity>
|
||||
<receiver
|
||||
android:name="com.microsoft.appcenter.distribute.DownloadManagerReceiver"
|
||||
android:exported="true"
|
||||
></receiver>
|
||||
android:exported="true"></receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -57,7 +57,8 @@ internal class AuthServiceRemote(private val authUrl: String) : AuthService {
|
|||
throw IOException("Unable to fetch token: ", cause)
|
||||
|
||||
token = JSONObject(response).getString("token")
|
||||
val acsId = JSONObject(response).getJSONObject("user").getString("communicationUserId")
|
||||
val acsId =
|
||||
JSONObject(response).getJSONObject("user").getString("communicationUserId")
|
||||
|
||||
communicationIdentifier = CommunicationUserIdentifier(acsId)
|
||||
}
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
Licensed under the MIT License.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval"
|
||||
>
|
||||
android:shape="oval">
|
||||
|
||||
<solid android:color="@color/app_primary_color" />
|
||||
|
||||
<size
|
||||
android:width="42dp"
|
||||
android:height="42dp"
|
||||
/>
|
||||
android:height="42dp" />
|
||||
</shape>
|
|
@ -4,12 +4,12 @@
|
|||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/language_menu_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="TextView"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
android:id="@+id/language_menu_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="TextView"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/azure_composite_show_settings"
|
||||
android:title="@string/launch_settings_button_text"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
|
@ -5,24 +5,19 @@
|
|||
<full-backup-content xmlns:tools="http://schemas.android.com/tools">
|
||||
<exclude
|
||||
domain="sharedpref"
|
||||
path="AppCenter.xml"
|
||||
/>
|
||||
path="AppCenter.xml" />
|
||||
<exclude
|
||||
domain="database"
|
||||
path="com.microsoft.appcenter.persistence"
|
||||
/>
|
||||
path="com.microsoft.appcenter.persistence" />
|
||||
<exclude
|
||||
domain="database"
|
||||
path="com.microsoft.appcenter.persistence-journal"
|
||||
/>
|
||||
path="com.microsoft.appcenter.persistence-journal" />
|
||||
<exclude
|
||||
domain="file"
|
||||
path="error"
|
||||
tools:ignore="FullBackupContent"
|
||||
/>
|
||||
tools:ignore="FullBackupContent" />
|
||||
<exclude
|
||||
domain="file"
|
||||
path="appcenter"
|
||||
tools:ignore="FullBackupContent"
|
||||
/>
|
||||
tools:ignore="FullBackupContent" />
|
||||
</full-backup-content>
|
Загрузка…
Ссылка в новой задаче