mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-29 01:48:53 +03:00
Merge pull request #3041 from nextcloud/chore/noid/migrateThemingCalls
Migrate theme API calls
This commit is contained in:
commit
0f9c109b5a
31 changed files with 87 additions and 64 deletions
|
@ -104,7 +104,7 @@ class FullScreenTextViewerActivity : AppCompatActivity() {
|
||||||
supportActionBar?.title = fileName
|
supportActionBar?.title = fileName
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
viewThemeUtils.platform.themeStatusBar(this, binding.textviewToolbar)
|
viewThemeUtils.platform.themeStatusBar(this)
|
||||||
viewThemeUtils.material.themeToolbar(binding.textviewToolbar)
|
viewThemeUtils.material.themeToolbar(binding.textviewToolbar)
|
||||||
viewThemeUtils.material.colorToolbarOverflowIcon(binding.textviewToolbar)
|
viewThemeUtils.material.colorToolbarOverflowIcon(binding.textviewToolbar)
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ class ConversationItem(
|
||||||
model.status,
|
model.status,
|
||||||
model.statusIcon,
|
model.statusIcon,
|
||||||
size,
|
size,
|
||||||
context.resources.getColor(R.color.bg_default),
|
context.resources.getColor(R.color.bg_default, null),
|
||||||
appContext
|
appContext
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -180,7 +180,7 @@ class IncomingLinkPreviewMessageViewHolder(incomingView: View, payload: Any) : M
|
||||||
.setTextColor(ContextCompat.getColor(context, R.color.textColorMaxContrast))
|
.setTextColor(ContextCompat.getColor(context, R.color.textColorMaxContrast))
|
||||||
|
|
||||||
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
||||||
viewThemeUtils.platform.colorPrimaryView(binding.messageQuote.quoteColoredView)
|
viewThemeUtils.platform.colorViewBackground(binding.messageQuote.quoteColoredView)
|
||||||
} else {
|
} else {
|
||||||
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,10 +178,10 @@ class IncomingLocationMessageViewHolder(incomingView: View, payload: Any) : Mess
|
||||||
binding.messageQuote.quotedMessage.text = parentChatMessage.text
|
binding.messageQuote.quotedMessage.text = parentChatMessage.text
|
||||||
|
|
||||||
binding.messageQuote.quotedMessageAuthor
|
binding.messageQuote.quotedMessageAuthor
|
||||||
.setTextColor(context!!.resources.getColor(R.color.textColorMaxContrast))
|
.setTextColor(context!!.resources.getColor(R.color.textColorMaxContrast, null))
|
||||||
|
|
||||||
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
||||||
viewThemeUtils.platform.colorPrimaryView(binding.messageQuote.quoteColoredView)
|
viewThemeUtils.platform.colorViewBackground(binding.messageQuote.quoteColoredView)
|
||||||
} else {
|
} else {
|
||||||
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,7 +205,7 @@ class IncomingPollMessageViewHolder(incomingView: View, payload: Any) : MessageH
|
||||||
.setTextColor(ContextCompat.getColor(context, R.color.textColorMaxContrast))
|
.setTextColor(ContextCompat.getColor(context, R.color.textColorMaxContrast))
|
||||||
|
|
||||||
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
||||||
viewThemeUtils.platform.colorPrimaryView(binding.messageQuote.quoteColoredView)
|
viewThemeUtils.platform.colorViewBackground(binding.messageQuote.quoteColoredView)
|
||||||
} else {
|
} else {
|
||||||
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) : MessageHolde
|
||||||
binding.messageQuote.quotedMessage.text = parentChatMessage.text
|
binding.messageQuote.quotedMessage.text = parentChatMessage.text
|
||||||
|
|
||||||
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
||||||
viewThemeUtils.platform.colorPrimaryView(binding.messageQuote.quoteColoredView)
|
viewThemeUtils.platform.colorViewBackground(binding.messageQuote.quoteColoredView)
|
||||||
} else {
|
} else {
|
||||||
binding.messageQuote.quoteColoredView.setBackgroundColor(
|
binding.messageQuote.quoteColoredView.setBackgroundColor(
|
||||||
ContextCompat.getColor(binding.messageQuote.quoteColoredView.context, R.color.high_emphasis_text)
|
ContextCompat.getColor(binding.messageQuote.quoteColoredView.context, R.color.high_emphasis_text)
|
||||||
|
|
|
@ -39,6 +39,7 @@ import androidx.work.WorkManager
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import coil.load
|
import coil.load
|
||||||
import com.amulyakhare.textdrawable.TextDrawable
|
import com.amulyakhare.textdrawable.TextDrawable
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
||||||
|
@ -99,7 +100,7 @@ class IncomingVoiceMessageViewHolder(incomingView: View, payload: Any) : Message
|
||||||
updateDownloadState(message)
|
updateDownloadState(message)
|
||||||
binding.seekbar.max = message.voiceMessageDuration
|
binding.seekbar.max = message.voiceMessageDuration
|
||||||
viewThemeUtils.platform.themeHorizontalSeekBar(binding.seekbar)
|
viewThemeUtils.platform.themeHorizontalSeekBar(binding.seekbar)
|
||||||
viewThemeUtils.platform.colorCircularProgressBarOnSurfaceVariant(binding.progressBar)
|
viewThemeUtils.platform.colorCircularProgressBar(binding.progressBar, ColorRole.ON_SURFACE_VARIANT)
|
||||||
|
|
||||||
if (message.isPlayingVoiceMessage) {
|
if (message.isPlayingVoiceMessage) {
|
||||||
showPlayButton()
|
showPlayButton()
|
||||||
|
@ -291,7 +292,7 @@ class IncomingVoiceMessageViewHolder(incomingView: View, payload: Any) : Message
|
||||||
.setTextColor(ContextCompat.getColor(context!!, R.color.textColorMaxContrast))
|
.setTextColor(ContextCompat.getColor(context!!, R.color.textColorMaxContrast))
|
||||||
|
|
||||||
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
|
||||||
viewThemeUtils.platform.colorPrimaryView(binding.messageQuote.quoteColoredView)
|
viewThemeUtils.platform.colorViewBackground(binding.messageQuote.quoteColoredView)
|
||||||
} else {
|
} else {
|
||||||
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
binding.messageQuote.quoteColoredView.setBackgroundResource(R.color.textColorMaxContrast)
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ import androidx.work.WorkInfo
|
||||||
import androidx.work.WorkManager
|
import androidx.work.WorkManager
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import coil.load
|
import coil.load
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
||||||
|
@ -96,7 +97,7 @@ class OutcomingVoiceMessageViewHolder(outcomingView: View) : MessageHolders
|
||||||
updateDownloadState(message)
|
updateDownloadState(message)
|
||||||
binding.seekbar.max = message.voiceMessageDuration
|
binding.seekbar.max = message.voiceMessageDuration
|
||||||
viewThemeUtils.platform.themeHorizontalSeekBar(binding.seekbar)
|
viewThemeUtils.platform.themeHorizontalSeekBar(binding.seekbar)
|
||||||
viewThemeUtils.platform.colorCircularProgressBarOnSurfaceVariant(binding.progressBar)
|
viewThemeUtils.platform.colorCircularProgressBar(binding.progressBar, ColorRole.ON_SURFACE_VARIANT)
|
||||||
|
|
||||||
handleIsPlayingVoiceMessageState(message)
|
handleIsPlayingVoiceMessageState(message)
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ import androidx.core.content.ContextCompat
|
||||||
import androidx.emoji2.widget.EmojiTextView
|
import androidx.emoji2.widget.EmojiTextView
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import com.google.android.material.card.MaterialCardView
|
import com.google.android.material.card.MaterialCardView
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
||||||
|
@ -109,7 +110,7 @@ abstract class PreviewMessageViewHolder(itemView: View?, payload: Any?) :
|
||||||
|
|
||||||
time.text = dateUtils.getLocalTimeStringFromTimestamp(message.timestamp)
|
time.text = dateUtils.getLocalTimeStringFromTimestamp(message.timestamp)
|
||||||
|
|
||||||
viewThemeUtils!!.platform.colorCircularProgressBar(progressBar!!)
|
viewThemeUtils!!.platform.colorCircularProgressBar(progressBar!!, ColorRole.PRIMARY)
|
||||||
clickView = image
|
clickView = image
|
||||||
messageText.visibility = View.VISIBLE
|
messageText.visibility = View.VISIBLE
|
||||||
if (message.getCalculateMessageType() === ChatMessage.MessageType.SINGLE_NC_ATTACHMENT_MESSAGE) {
|
if (message.getCalculateMessageType() === ChatMessage.MessageType.SINGLE_NC_ATTACHMENT_MESSAGE) {
|
||||||
|
@ -211,7 +212,10 @@ abstract class PreviewMessageViewHolder(itemView: View?, payload: Any?) :
|
||||||
clickView = previewContactContainer
|
clickView = previewContactContainer
|
||||||
viewThemeUtils!!.talk.colorContactChatItemBackground(previewContactContainer)
|
viewThemeUtils!!.talk.colorContactChatItemBackground(previewContactContainer)
|
||||||
viewThemeUtils!!.talk.colorContactChatItemName(previewContactName)
|
viewThemeUtils!!.talk.colorContactChatItemName(previewContactName)
|
||||||
viewThemeUtils!!.platform.colorCircularProgressBarOnPrimaryContainer(previewContactProgressBar!!)
|
viewThemeUtils!!.platform.colorCircularProgressBar(
|
||||||
|
previewContactProgressBar!!,
|
||||||
|
ColorRole.ON_PRIMARY_CONTAINER
|
||||||
|
)
|
||||||
|
|
||||||
if (message.selectedIndividualHashMap!!.containsKey(KEY_CONTACT_PHOTO)) {
|
if (message.selectedIndividualHashMap!!.containsKey(KEY_CONTACT_PHOTO)) {
|
||||||
image = previewContactPhoto
|
image = previewContactPhoto
|
||||||
|
|
|
@ -145,7 +145,7 @@ class ReactionAnimator(
|
||||||
nameView.layoutParams = nameViewParams
|
nameView.layoutParams = nameViewParams
|
||||||
|
|
||||||
nameView.text = " " + callReaction.userName + " "
|
nameView.text = " " + callReaction.userName + " "
|
||||||
nameView.setTextColor(context.resources.getColor(R.color.white))
|
nameView.setTextColor(context.resources.getColor(R.color.white, null))
|
||||||
|
|
||||||
val backgroundColor = ContextCompat.getColor(
|
val backgroundColor = ContextCompat.getColor(
|
||||||
context,
|
context,
|
||||||
|
|
|
@ -98,6 +98,7 @@ import coil.target.Target
|
||||||
import coil.transform.CircleCropTransformation
|
import coil.transform.CircleCropTransformation
|
||||||
import com.google.android.flexbox.FlexboxLayout
|
import com.google.android.flexbox.FlexboxLayout
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.BuildConfig
|
import com.nextcloud.talk.BuildConfig
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.activities.BaseActivity
|
import com.nextcloud.talk.activities.BaseActivity
|
||||||
|
@ -598,7 +599,7 @@ class ChatActivity :
|
||||||
binding?.messageInputView?.button?.contentDescription =
|
binding?.messageInputView?.button?.contentDescription =
|
||||||
resources?.getString(R.string.nc_description_send_message_button)
|
resources?.getString(R.string.nc_description_send_message_button)
|
||||||
|
|
||||||
binding?.messageInputView?.button?.let { viewThemeUtils.platform.colorImageView(it) }
|
binding?.messageInputView?.button?.let { viewThemeUtils.platform.colorImageView(it, ColorRole.PRIMARY) }
|
||||||
|
|
||||||
if (currentConversation != null && currentConversation?.roomId != null) {
|
if (currentConversation != null && currentConversation?.roomId != null) {
|
||||||
loadAvatarForStatusBar()
|
loadAvatarForStatusBar()
|
||||||
|
@ -615,7 +616,7 @@ class ChatActivity :
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent, null)))
|
||||||
setActionBarTitle()
|
setActionBarTitle()
|
||||||
viewThemeUtils.material.themeToolbar(binding.chatToolbar)
|
viewThemeUtils.material.themeToolbar(binding.chatToolbar)
|
||||||
}
|
}
|
||||||
|
@ -2087,7 +2088,7 @@ class ChatActivity :
|
||||||
private fun setupMentionAutocomplete() {
|
private fun setupMentionAutocomplete() {
|
||||||
val elevation = MENTION_AUTO_COMPLETE_ELEVATION
|
val elevation = MENTION_AUTO_COMPLETE_ELEVATION
|
||||||
resources?.let {
|
resources?.let {
|
||||||
val backgroundDrawable = ColorDrawable(it.getColor(R.color.bg_default))
|
val backgroundDrawable = ColorDrawable(it.getColor(R.color.bg_default, null))
|
||||||
val presenter = MentionAutocompletePresenter(this, roomToken)
|
val presenter = MentionAutocompletePresenter(this, roomToken)
|
||||||
val callback = MentionAutocompleteCallback(
|
val callback = MentionAutocompleteCallback(
|
||||||
this,
|
this,
|
||||||
|
|
|
@ -192,7 +192,7 @@ class ContactsActivity :
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent, null)))
|
||||||
supportActionBar?.title = when {
|
supportActionBar?.title = when {
|
||||||
isAddingParticipantsView -> {
|
isAddingParticipantsView -> {
|
||||||
resources!!.getString(R.string.nc_add_participants)
|
resources!!.getString(R.string.nc_add_participants)
|
||||||
|
@ -669,7 +669,9 @@ class ContactsActivity :
|
||||||
PorterDuff.Mode.SRC_IN
|
PorterDuff.Mode.SRC_IN
|
||||||
)
|
)
|
||||||
|
|
||||||
binding?.conversationPrivacyToggle?.let { viewThemeUtils.platform.colorImageViewButton(it.publicCallLink) }
|
binding?.conversationPrivacyToggle?.let {
|
||||||
|
viewThemeUtils.platform.colorImageViewBackgroundAndIcon(it.publicCallLink)
|
||||||
|
}
|
||||||
disengageProgressBar()
|
disengageProgressBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ import autodagger.AutoInjector
|
||||||
import com.bluelinelabs.conductor.RouterTransaction
|
import com.bluelinelabs.conductor.RouterTransaction
|
||||||
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
||||||
|
@ -125,7 +126,7 @@ class EntryMenuController(args: Bundle) :
|
||||||
rootView = view,
|
rootView = view,
|
||||||
editText = it.textEdit,
|
editText = it.textEdit,
|
||||||
onEmojiPopupShownListener = {
|
onEmojiPopupShownListener = {
|
||||||
viewThemeUtils.platform.colorImageView(it.smileyButton)
|
viewThemeUtils.platform.colorImageView(it.smileyButton, ColorRole.PRIMARY)
|
||||||
},
|
},
|
||||||
onEmojiPopupDismissListener = {
|
onEmojiPopupDismissListener = {
|
||||||
it.smileyButton.imageTintList = ColorStateList.valueOf(
|
it.smileyButton.imageTintList = ColorStateList.valueOf(
|
||||||
|
|
|
@ -30,6 +30,7 @@ import android.view.View
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import com.bluelinelabs.conductor.RouterTransaction
|
import com.bluelinelabs.conductor.RouterTransaction
|
||||||
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.api.NcApi
|
import com.nextcloud.talk.api.NcApi
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
|
@ -117,7 +118,7 @@ class OperationsMenuController(args: Bundle) : BaseController(
|
||||||
sharedApplication!!.componentApplication.inject(this)
|
sharedApplication!!.componentApplication.inject(this)
|
||||||
currentUser = userManager.currentUser.blockingGet()
|
currentUser = userManager.currentUser.blockingGet()
|
||||||
|
|
||||||
binding?.progressBar?.let { viewThemeUtils.platform.colorCircularProgressBar(it) }
|
binding?.progressBar?.let { viewThemeUtils.platform.colorCircularProgressBar(it, ColorRole.PRIMARY) }
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(callUrl) && callUrl.contains("/call")) {
|
if (!TextUtils.isEmpty(callUrl) && callUrl.contains("/call")) {
|
||||||
conversationToken = callUrl.substring(callUrl.lastIndexOf("/") + 1)
|
conversationToken = callUrl.substring(callUrl.lastIndexOf("/") + 1)
|
||||||
|
@ -517,7 +518,7 @@ class OperationsMenuController(args: Bundle) : BaseController(
|
||||||
if (everythingOK) {
|
if (everythingOK) {
|
||||||
binding?.resultTextView?.setText(R.string.nc_all_ok_operation)
|
binding?.resultTextView?.setText(R.string.nc_all_ok_operation)
|
||||||
} else {
|
} else {
|
||||||
binding?.resultTextView?.setTextColor(resources!!.getColor(R.color.nc_darkRed))
|
binding?.resultTextView?.setTextColor(resources!!.getColor(R.color.nc_darkRed, null))
|
||||||
if (!isGuestSupportError) {
|
if (!isGuestSupportError) {
|
||||||
binding?.resultTextView?.setText(R.string.nc_failed_to_perform_operation)
|
binding?.resultTextView?.setText(R.string.nc_failed_to_perform_operation)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -50,6 +50,7 @@ import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||||
import com.afollestad.materialdialogs.datetime.dateTimePicker
|
import com.afollestad.materialdialogs.datetime.dateTimePicker
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.activities.BaseActivity
|
import com.nextcloud.talk.activities.BaseActivity
|
||||||
import com.nextcloud.talk.activities.MainActivity
|
import com.nextcloud.talk.activities.MainActivity
|
||||||
|
@ -186,7 +187,7 @@ class ConversationInfoActivity :
|
||||||
|
|
||||||
binding.addParticipantsAction.visibility = GONE
|
binding.addParticipantsAction.visibility = GONE
|
||||||
|
|
||||||
binding.progressBar.let { viewThemeUtils.platform.colorCircularProgressBar(it) }
|
binding.progressBar.let { viewThemeUtils.platform.colorCircularProgressBar(it, ColorRole.PRIMARY) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupActionBar() {
|
private fun setupActionBar() {
|
||||||
|
@ -196,7 +197,7 @@ class ConversationInfoActivity :
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent, null)))
|
||||||
supportActionBar?.title = if (hasAvatarSpacing) {
|
supportActionBar?.title = if (hasAvatarSpacing) {
|
||||||
" " + resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
" " + resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -153,7 +153,7 @@ class ConversationInfoEditActivity :
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent, null)))
|
||||||
supportActionBar?.title = resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
supportActionBar?.title = resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
||||||
|
|
||||||
viewThemeUtils.material.themeToolbar(binding.conversationInfoEditToolbar)
|
viewThemeUtils.material.themeToolbar(binding.conversationInfoEditToolbar)
|
||||||
|
|
|
@ -248,7 +248,7 @@ class ConversationsListActivity :
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent, null)))
|
||||||
supportActionBar?.title = resources!!.getString(R.string.nc_app_product_name)
|
supportActionBar?.title = resources!!.getString(R.string.nc_app_product_name)
|
||||||
viewThemeUtils.material.themeToolbar(binding.conversationListToolbar)
|
viewThemeUtils.material.themeToolbar(binding.conversationListToolbar)
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ class ConversationsListActivity :
|
||||||
}
|
}
|
||||||
binding.searchText.setOnClickListener {
|
binding.searchText.setOnClickListener {
|
||||||
showSearchView(searchView, searchItem)
|
showSearchView(searchView, searchItem)
|
||||||
viewThemeUtils.platform.themeStatusBar(this, searchView!!)
|
viewThemeUtils.platform.themeStatusBar(this)
|
||||||
}
|
}
|
||||||
searchView!!.setOnCloseListener {
|
searchView!!.setOnCloseListener {
|
||||||
if (TextUtils.isEmpty(searchView!!.query.toString())) {
|
if (TextUtils.isEmpty(searchView!!.query.toString())) {
|
||||||
|
|
|
@ -441,7 +441,7 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
|
||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
.setContentIntent(pendingIntent)
|
.setContentIntent(pendingIntent)
|
||||||
.setAutoCancel(autoCancelOnClick)
|
.setAutoCancel(autoCancelOnClick)
|
||||||
.setColor(context!!.resources.getColor(R.color.colorPrimary))
|
.setColor(context!!.resources.getColor(R.color.colorPrimary, null))
|
||||||
|
|
||||||
val notificationInfoBundle = Bundle()
|
val notificationInfoBundle = Bundle()
|
||||||
notificationInfoBundle.putLong(KEY_INTERNAL_USER_ID, signatureVerification.user!!.id!!)
|
notificationInfoBundle.putLong(KEY_INTERNAL_USER_ID, signatureVerification.user!!.id!!)
|
||||||
|
|
|
@ -127,7 +127,7 @@ class GeocodingActivity :
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent, null)))
|
||||||
supportActionBar?.title = ""
|
supportActionBar?.title = ""
|
||||||
viewThemeUtils.material.themeToolbar(binding.geocodingToolbar)
|
viewThemeUtils.material.themeToolbar(binding.geocodingToolbar)
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ class LocationPickerActivity :
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent, null)))
|
||||||
supportActionBar?.title = context.getString(R.string.nc_share_location)
|
supportActionBar?.title = context.getString(R.string.nc_share_location)
|
||||||
viewThemeUtils.material.themeToolbar(binding.locationPickerToolbar)
|
viewThemeUtils.material.themeToolbar(binding.locationPickerToolbar)
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,9 +101,9 @@ class PollCreateDialogFragment : DialogFragment(), PollCreateOptionsItemListener
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun themeDialog() {
|
private fun themeDialog() {
|
||||||
viewThemeUtils.platform.colorPrimaryTextViewElement(binding.pollQuestion)
|
viewThemeUtils.platform.colorTextView(binding.pollQuestion)
|
||||||
viewThemeUtils.platform.colorPrimaryTextViewElement(binding.pollOptions)
|
viewThemeUtils.platform.colorTextView(binding.pollOptions)
|
||||||
viewThemeUtils.platform.colorPrimaryTextViewElement(binding.pollSettings)
|
viewThemeUtils.platform.colorTextView(binding.pollSettings)
|
||||||
|
|
||||||
viewThemeUtils.material.colorTextInputLayout(binding.pollCreateQuestionTextInputLayout)
|
viewThemeUtils.material.colorTextInputLayout(binding.pollCreateQuestionTextInputLayout)
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.view.ViewGroup
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
import com.nextcloud.talk.databinding.DialogPollLoadingBinding
|
import com.nextcloud.talk.databinding.DialogPollLoadingBinding
|
||||||
import com.nextcloud.talk.ui.theme.ViewThemeUtils
|
import com.nextcloud.talk.ui.theme.ViewThemeUtils
|
||||||
|
@ -55,7 +56,7 @@ class PollLoadingFragment : Fragment() {
|
||||||
): View {
|
): View {
|
||||||
binding = DialogPollLoadingBinding.inflate(inflater, container, false)
|
binding = DialogPollLoadingBinding.inflate(inflater, container, false)
|
||||||
binding.root.layoutParams.height = fragmentHeight
|
binding.root.layoutParams.height = fragmentHeight
|
||||||
viewThemeUtils.platform.colorCircularProgressBar(binding.pollLoadingProgressbar)
|
viewThemeUtils.platform.colorCircularProgressBar(binding.pollLoadingProgressbar, ColorRole.PRIMARY)
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import com.github.dhaval2404.imagepicker.ImagePicker
|
import com.github.dhaval2404.imagepicker.ImagePicker
|
||||||
import com.github.dhaval2404.imagepicker.ImagePicker.Companion.getError
|
import com.github.dhaval2404.imagepicker.ImagePicker.Companion.getError
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.activities.BaseActivity
|
import com.nextcloud.talk.activities.BaseActivity
|
||||||
import com.nextcloud.talk.api.NcApi
|
import com.nextcloud.talk.api.NcApi
|
||||||
|
@ -188,7 +189,7 @@ class ProfileActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent, null)))
|
||||||
supportActionBar?.title = context.getString(R.string.nc_profile_personal_info_title)
|
supportActionBar?.title = context.getString(R.string.nc_profile_personal_info_title)
|
||||||
viewThemeUtils.material.themeToolbar(binding.profileToolbar)
|
viewThemeUtils.material.themeToolbar(binding.profileToolbar)
|
||||||
}
|
}
|
||||||
|
@ -651,7 +652,7 @@ class ProfileActivity : BaseActivity() {
|
||||||
initUserInfoEditText(holder, item)
|
initUserInfoEditText(holder, item)
|
||||||
|
|
||||||
holder.binding.icon.contentDescription = item.hint
|
holder.binding.icon.contentDescription = item.hint
|
||||||
viewThemeUtils.platform.colorImageView(holder.binding.icon)
|
viewThemeUtils.platform.colorImageView(holder.binding.icon, ColorRole.PRIMARY)
|
||||||
if (!TextUtils.isEmpty(item.text) || controller.edit) {
|
if (!TextUtils.isEmpty(item.text) || controller.edit) {
|
||||||
holder.binding.userInfoDetailContainer.visibility = View.VISIBLE
|
holder.binding.userInfoDetailContainer.visibility = View.VISIBLE
|
||||||
controller.viewThemeUtils.material.colorTextInputLayout(holder.binding.userInfoInputLayout)
|
controller.viewThemeUtils.material.colorTextInputLayout(holder.binding.userInfoInputLayout)
|
||||||
|
|
|
@ -88,7 +88,7 @@ class RemoteFileBrowserActivity : AppCompatActivity(), SelectionInterface, Swipe
|
||||||
binding.pathNavigationBackButton.iconTint = ColorStateList.valueOf(scheme.onSurface)
|
binding.pathNavigationBackButton.iconTint = ColorStateList.valueOf(scheme.onSurface)
|
||||||
binding.pathNavigationBackButton.setTextColor(scheme.onSurface)
|
binding.pathNavigationBackButton.setTextColor(scheme.onSurface)
|
||||||
viewThemeUtils.material.colorMaterialTextButton(binding.pathNavigationBackButton)
|
viewThemeUtils.material.colorMaterialTextButton(binding.pathNavigationBackButton)
|
||||||
viewThemeUtils.platform.themeStatusBar(this, binding.remoteFileBrowserItemsToolbar)
|
viewThemeUtils.platform.themeStatusBar(this)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
DisplayUtils.applyColorToNavigationBar(
|
DisplayUtils.applyColorToNavigationBar(
|
||||||
|
|
|
@ -61,6 +61,7 @@ import androidx.work.WorkManager
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.BuildConfig
|
import com.nextcloud.talk.BuildConfig
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.activities.BaseActivity
|
import com.nextcloud.talk.activities.BaseActivity
|
||||||
|
@ -249,7 +250,7 @@ class SettingsActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent, null)))
|
||||||
supportActionBar?.title = context.getString(R.string.nc_settings)
|
supportActionBar?.title = context.getString(R.string.nc_settings)
|
||||||
viewThemeUtils.material.themeToolbar(binding.settingsToolbar)
|
viewThemeUtils.material.themeToolbar(binding.settingsToolbar)
|
||||||
}
|
}
|
||||||
|
@ -532,9 +533,7 @@ class SettingsActivity : BaseActivity() {
|
||||||
when (ApplicationWideMessageHolder.getInstance().messageType) {
|
when (ApplicationWideMessageHolder.getInstance().messageType) {
|
||||||
ApplicationWideMessageHolder.MessageType.ACCOUNT_UPDATED_NOT_ADDED -> {
|
ApplicationWideMessageHolder.MessageType.ACCOUNT_UPDATED_NOT_ADDED -> {
|
||||||
binding.messageText.let {
|
binding.messageText.let {
|
||||||
it.setTextColor(
|
viewThemeUtils.platform.colorTextView(it, ColorRole.PRIMARY)
|
||||||
viewThemeUtils.getScheme(it.context).primary
|
|
||||||
)
|
|
||||||
it.text = resources!!.getString(R.string.nc_settings_account_updated)
|
it.text = resources!!.getString(R.string.nc_settings_account_updated)
|
||||||
binding.messageView.visibility = View.VISIBLE
|
binding.messageView.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
@ -542,12 +541,10 @@ class SettingsActivity : BaseActivity() {
|
||||||
|
|
||||||
ApplicationWideMessageHolder.MessageType.SERVER_WITHOUT_TALK -> {
|
ApplicationWideMessageHolder.MessageType.SERVER_WITHOUT_TALK -> {
|
||||||
binding.messageText.let {
|
binding.messageText.let {
|
||||||
it.setTextColor(resources!!.getColor(R.color.nc_darkRed))
|
it.setTextColor(resources!!.getColor(R.color.nc_darkRed, null))
|
||||||
it.text = resources!!.getString(R.string.nc_settings_wrong_account)
|
it.text = resources!!.getString(R.string.nc_settings_wrong_account)
|
||||||
binding.messageView.visibility = View.VISIBLE
|
binding.messageView.visibility = View.VISIBLE
|
||||||
it.setTextColor(
|
viewThemeUtils.platform.colorTextView(it, ColorRole.PRIMARY)
|
||||||
viewThemeUtils.getScheme(it.context).primary
|
|
||||||
)
|
|
||||||
it.text = resources!!.getString(R.string.nc_Server_account_imported)
|
it.text = resources!!.getString(R.string.nc_Server_account_imported)
|
||||||
binding.messageView.visibility = View.VISIBLE
|
binding.messageView.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
@ -555,9 +552,7 @@ class SettingsActivity : BaseActivity() {
|
||||||
|
|
||||||
ApplicationWideMessageHolder.MessageType.ACCOUNT_WAS_IMPORTED -> {
|
ApplicationWideMessageHolder.MessageType.ACCOUNT_WAS_IMPORTED -> {
|
||||||
binding.messageText.let {
|
binding.messageText.let {
|
||||||
it.setTextColor(
|
viewThemeUtils.platform.colorTextView(it, ColorRole.PRIMARY)
|
||||||
viewThemeUtils.getScheme(it.context).primary
|
|
||||||
)
|
|
||||||
it.text = resources!!.getString(R.string.nc_Server_account_imported)
|
it.text = resources!!.getString(R.string.nc_Server_account_imported)
|
||||||
binding.messageView.visibility = View.VISIBLE
|
binding.messageView.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
@ -565,7 +560,7 @@ class SettingsActivity : BaseActivity() {
|
||||||
|
|
||||||
ApplicationWideMessageHolder.MessageType.FAILED_TO_IMPORT_ACCOUNT -> {
|
ApplicationWideMessageHolder.MessageType.FAILED_TO_IMPORT_ACCOUNT -> {
|
||||||
binding.messageText.let {
|
binding.messageText.let {
|
||||||
it.setTextColor(resources!!.getColor(R.color.nc_darkRed))
|
it.setTextColor(resources!!.getColor(R.color.nc_darkRed, null))
|
||||||
it.text = resources!!.getString(R.string.nc_server_failed_to_import_account)
|
it.text = resources!!.getString(R.string.nc_server_failed_to_import_account)
|
||||||
binding.messageView.visibility = View.VISIBLE
|
binding.messageView.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
@ -915,7 +910,9 @@ class SettingsActivity : BaseActivity() {
|
||||||
phoneNumberLayoutWrapper.setPadding(PHONE_NUMBER_SIDE_PADDING, 0, PHONE_NUMBER_SIDE_PADDING, 0)
|
phoneNumberLayoutWrapper.setPadding(PHONE_NUMBER_SIDE_PADDING, 0, PHONE_NUMBER_SIDE_PADDING, 0)
|
||||||
val phoneNumberInputLayout = TextInputLayout(context)
|
val phoneNumberInputLayout = TextInputLayout(context)
|
||||||
val phoneNumberField = EditText(context)
|
val phoneNumberField = EditText(context)
|
||||||
phoneNumberInputLayout.setHelperTextColor(ColorStateList.valueOf(resources!!.getColor(R.color.nc_darkRed)))
|
phoneNumberInputLayout.setHelperTextColor(
|
||||||
|
ColorStateList.valueOf(resources!!.getColor(R.color.nc_darkRed, null))
|
||||||
|
)
|
||||||
phoneNumberField.inputType = InputType.TYPE_CLASS_PHONE
|
phoneNumberField.inputType = InputType.TYPE_CLASS_PHONE
|
||||||
phoneNumberField.setText("+")
|
phoneNumberField.setText("+")
|
||||||
phoneNumberField.addTextChangedListener(object : TextWatcher {
|
phoneNumberField.addTextChangedListener(object : TextWatcher {
|
||||||
|
|
|
@ -75,7 +75,7 @@ class SharedItemsActivity : AppCompatActivity() {
|
||||||
setSupportActionBar(binding.sharedItemsToolbar)
|
setSupportActionBar(binding.sharedItemsToolbar)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
viewThemeUtils.platform.themeStatusBar(this, binding.sharedItemsToolbar)
|
viewThemeUtils.platform.themeStatusBar(this)
|
||||||
viewThemeUtils.material.themeToolbar(binding.sharedItemsToolbar)
|
viewThemeUtils.material.themeToolbar(binding.sharedItemsToolbar)
|
||||||
viewThemeUtils.material.themeTabLayoutOnSurface(binding.sharedItemsTabs)
|
viewThemeUtils.material.themeTabLayoutOnSurface(binding.sharedItemsTabs)
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ class TranslateActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent)))
|
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(R.color.transparent, null)))
|
||||||
supportActionBar?.title = resources!!.getString(R.string.translation)
|
supportActionBar?.title = resources!!.getString(R.string.translation)
|
||||||
viewThemeUtils.material.themeToolbar(binding.translationToolbar)
|
viewThemeUtils.material.themeToolbar(binding.translationToolbar)
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.view.ViewGroup
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.activities.CallActivity
|
import com.nextcloud.talk.activities.CallActivity
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
|
@ -92,26 +93,35 @@ class AudioOutputDialog(val callActivity: CallActivity) : BottomSheetDialog(call
|
||||||
private fun highlightActiveOutputChannel() {
|
private fun highlightActiveOutputChannel() {
|
||||||
when (callActivity.audioManager?.currentAudioDevice) {
|
when (callActivity.audioManager?.currentAudioDevice) {
|
||||||
WebRtcAudioManager.AudioDevice.BLUETOOTH -> {
|
WebRtcAudioManager.AudioDevice.BLUETOOTH -> {
|
||||||
viewThemeUtils.platform.colorImageView(dialogAudioOutputBinding.audioOutputBluetoothIcon)
|
viewThemeUtils.platform.colorImageView(
|
||||||
|
dialogAudioOutputBinding.audioOutputBluetoothIcon,
|
||||||
|
ColorRole.PRIMARY
|
||||||
|
)
|
||||||
viewThemeUtils.platform
|
viewThemeUtils.platform
|
||||||
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputBluetoothText)
|
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputBluetoothText)
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtcAudioManager.AudioDevice.SPEAKER_PHONE -> {
|
WebRtcAudioManager.AudioDevice.SPEAKER_PHONE -> {
|
||||||
viewThemeUtils.platform.colorImageView(dialogAudioOutputBinding.audioOutputSpeakerIcon)
|
viewThemeUtils.platform.colorImageView(
|
||||||
|
dialogAudioOutputBinding.audioOutputSpeakerIcon,
|
||||||
|
ColorRole.PRIMARY
|
||||||
|
)
|
||||||
viewThemeUtils.platform
|
viewThemeUtils.platform
|
||||||
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputSpeakerText)
|
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputSpeakerText)
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtcAudioManager.AudioDevice.EARPIECE -> {
|
WebRtcAudioManager.AudioDevice.EARPIECE -> {
|
||||||
viewThemeUtils.platform.colorImageView(dialogAudioOutputBinding.audioOutputEarspeakerIcon)
|
viewThemeUtils.platform.colorImageView(
|
||||||
|
dialogAudioOutputBinding.audioOutputEarspeakerIcon,
|
||||||
|
ColorRole.PRIMARY
|
||||||
|
)
|
||||||
viewThemeUtils.platform
|
viewThemeUtils.platform
|
||||||
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputEarspeakerText)
|
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputEarspeakerText)
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtcAudioManager.AudioDevice.WIRED_HEADSET -> {
|
WebRtcAudioManager.AudioDevice.WIRED_HEADSET -> {
|
||||||
viewThemeUtils.platform
|
viewThemeUtils.platform
|
||||||
.colorImageView(dialogAudioOutputBinding.audioOutputWiredHeadsetIcon)
|
.colorImageView(dialogAudioOutputBinding.audioOutputWiredHeadsetIcon, ColorRole.PRIMARY)
|
||||||
viewThemeUtils.platform
|
viewThemeUtils.platform
|
||||||
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputWiredHeadsetText)
|
.colorPrimaryTextViewElementDarkMode(dialogAudioOutputBinding.audioOutputWiredHeadsetText)
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ import androidx.fragment.app.DialogFragment
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import autodagger.AutoInjector
|
import autodagger.AutoInjector
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.adapters.items.AdvancedUserItem
|
import com.nextcloud.talk.adapters.items.AdvancedUserItem
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedApplication
|
||||||
|
@ -90,7 +91,7 @@ class ChooseAccountShareToDialogFragment : DialogFragment() {
|
||||||
binding!!.currentAccount.userName.text = user.displayName
|
binding!!.currentAccount.userName.text = user.displayName
|
||||||
binding!!.currentAccount.ticker.visibility = View.GONE
|
binding!!.currentAccount.ticker.visibility = View.GONE
|
||||||
binding!!.currentAccount.account.text = Uri.parse(user.baseUrl).host
|
binding!!.currentAccount.account.text = Uri.parse(user.baseUrl).host
|
||||||
viewThemeUtils!!.platform.colorImageView(binding!!.currentAccount.accountMenu)
|
viewThemeUtils!!.platform.colorImageView(binding!!.currentAccount.accountMenu, ColorRole.PRIMARY)
|
||||||
if (user.baseUrl != null &&
|
if (user.baseUrl != null &&
|
||||||
(user.baseUrl!!.startsWith("http://") || user.baseUrl!!.startsWith("https://"))
|
(user.baseUrl!!.startsWith("http://") || user.baseUrl!!.startsWith("https://"))
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -43,6 +43,7 @@ import autodagger.AutoInjector
|
||||||
import com.bluelinelabs.logansquare.LoganSquare
|
import com.bluelinelabs.logansquare.LoganSquare
|
||||||
import com.google.android.material.card.MaterialCardView
|
import com.google.android.material.card.MaterialCardView
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.nextcloud.android.common.ui.theme.utils.ColorRole
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.adapters.PredefinedStatusClickListener
|
import com.nextcloud.talk.adapters.PredefinedStatusClickListener
|
||||||
import com.nextcloud.talk.adapters.PredefinedStatusListAdapter
|
import com.nextcloud.talk.adapters.PredefinedStatusListAdapter
|
||||||
|
@ -424,15 +425,15 @@ class SetStatusDialogFragment :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
views.first.isChecked = true
|
views.first.isChecked = true
|
||||||
viewThemeUtils.platform.colorOnSecondaryContainerTextViewElement(views.second)
|
viewThemeUtils.platform.colorTextView(views.second, ColorRole.ON_SECONDARY_CONTAINER)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun clearTopStatus() {
|
private fun clearTopStatus() {
|
||||||
context?.let {
|
context?.let {
|
||||||
binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
|
binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text, null))
|
||||||
binding.awayHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
|
binding.awayHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text, null))
|
||||||
binding.dndHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
|
binding.dndHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text, null))
|
||||||
binding.invisibleHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
|
binding.invisibleHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text, null))
|
||||||
|
|
||||||
binding.onlineIcon.imageTintList = null
|
binding.onlineIcon.imageTintList = null
|
||||||
binding.awayIcon.imageTintList = null
|
binding.awayIcon.imageTintList = null
|
||||||
|
|
|
@ -74,13 +74,13 @@ class TalkSpecificViewThemeUtils @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
val bgBubbleColor = if (deleted) {
|
val bgBubbleColor = if (deleted) {
|
||||||
resources.getColor(R.color.bg_message_list_incoming_bubble_deleted)
|
resources.getColor(R.color.bg_message_list_incoming_bubble_deleted, null)
|
||||||
} else {
|
} else {
|
||||||
resources.getColor(R.color.bg_message_list_incoming_bubble)
|
resources.getColor(R.color.bg_message_list_incoming_bubble, null)
|
||||||
}
|
}
|
||||||
val bubbleDrawable = DisplayUtils.getMessageSelector(
|
val bubbleDrawable = DisplayUtils.getMessageSelector(
|
||||||
bgBubbleColor,
|
bgBubbleColor,
|
||||||
resources.getColor(R.color.transparent),
|
resources.getColor(R.color.transparent, null),
|
||||||
bgBubbleColor,
|
bgBubbleColor,
|
||||||
bubbleResource
|
bubbleResource
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue