mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
migrating from material preferences to native, squashed commit
Signed-off-by: Julius Linus julius.linus@nextcloud.com
This commit is contained in:
parent
34e79d563c
commit
76f5fe91f6
12 changed files with 1024 additions and 336 deletions
|
@ -97,6 +97,7 @@ import io.reactivex.schedulers.Schedulers
|
|||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import org.parceler.Parcels
|
||||
import java.lang.Long
|
||||
import java.util.Calendar
|
||||
import java.util.Collections
|
||||
import java.util.Locale
|
||||
|
@ -106,7 +107,6 @@ import javax.inject.Inject
|
|||
class ConversationInfoActivity :
|
||||
BaseActivity(),
|
||||
FlexibleAdapter.OnItemClickListener {
|
||||
|
||||
private lateinit var binding: ActivityConversationInfoBinding
|
||||
|
||||
@Inject
|
||||
|
@ -166,18 +166,14 @@ class ConversationInfoActivity :
|
|||
if (databaseStorageModule == null) {
|
||||
databaseStorageModule = DatabaseStorageModule(conversationUser, conversationToken)
|
||||
}
|
||||
|
||||
binding.notificationSettingsView.notificationSettings.setStorageModule(databaseStorageModule)
|
||||
binding.webinarInfoView.webinarSettings.setStorageModule(databaseStorageModule)
|
||||
binding.guestAccessView.guestAccessSettings.setStorageModule(databaseStorageModule)
|
||||
|
||||
setUpNotificationSettings(databaseStorageModule!!)
|
||||
binding.deleteConversationAction.setOnClickListener { showDeleteConversationDialog() }
|
||||
binding.leaveConversationAction.setOnClickListener { leaveConversation() }
|
||||
binding.clearConversationHistory.setOnClickListener { showClearHistoryDialog() }
|
||||
binding.addParticipantsAction.setOnClickListener { addParticipants() }
|
||||
|
||||
if (CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "rich-object-list-media")) {
|
||||
binding.showSharedItemsAction.setOnClickListener { showSharedItems() }
|
||||
binding.sharedItemsButton.setOnClickListener { showSharedItems() }
|
||||
} else {
|
||||
binding.categorySharedItems.visibility = GONE
|
||||
}
|
||||
|
@ -248,12 +244,12 @@ class ConversationInfoActivity :
|
|||
private fun themeSwitchPreferences() {
|
||||
binding.run {
|
||||
listOf(
|
||||
binding.webinarInfoView.conversationInfoLobby,
|
||||
binding.notificationSettingsView.callNotifications,
|
||||
binding.notificationSettingsView.conversationInfoPriorityConversation,
|
||||
binding.guestAccessView.guestAccessAllowSwitch,
|
||||
binding.guestAccessView.guestAccessPasswordSwitch
|
||||
).forEach(viewThemeUtils.talk::colorSwitchPreference)
|
||||
binding.webinarInfoView.lobbySwitch,
|
||||
binding.notificationSettingsView.callNotificationsSwitch,
|
||||
binding.notificationSettingsView.importantConversationSwitch,
|
||||
binding.guestAccessView.allowGuestsSwitch,
|
||||
binding.guestAccessView.passwordProtectionSwitch
|
||||
).forEach(viewThemeUtils.talk::colorSwitch)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,15 +258,28 @@ class ConversationInfoActivity :
|
|||
listOf(
|
||||
conversationInfoName,
|
||||
conversationDescription,
|
||||
otherRoomOptions,
|
||||
addToFavoritesButton,
|
||||
participantsListCategory,
|
||||
ownOptions,
|
||||
addParticipantsAction,
|
||||
dangerZoneOptions,
|
||||
categorySharedItems,
|
||||
categoryConversationSettings,
|
||||
binding.guestAccessView.guestAccessCategory,
|
||||
binding.webinarInfoView.conversationInfoWebinar,
|
||||
binding.notificationSettingsView.notificationSettingsCategory
|
||||
).forEach(viewThemeUtils.talk::colorPreferenceCategory)
|
||||
conversationSettings,
|
||||
leaveConversationAction,
|
||||
deleteConversationAction,
|
||||
clearConversationHistory,
|
||||
sharedItemsButton,
|
||||
binding.guestAccessView.guestAccessSettings,
|
||||
binding.guestAccessView.guestAccessSettingsAllowGuest,
|
||||
binding.guestAccessView.guestAccessSettingsPasswordProtection,
|
||||
binding.guestAccessView.shareConversationButton,
|
||||
binding.guestAccessView.resendInvitationsButton,
|
||||
binding.webinarInfoView.webinarSettings,
|
||||
binding.webinarInfoView.webinarSettingsLobby,
|
||||
binding.webinarInfoView.startTimeButton,
|
||||
binding.notificationSettingsView.notificationSettings,
|
||||
binding.notificationSettingsView.notificationSettingsImportantConversation,
|
||||
binding.notificationSettingsView.notificationSettingsCallNotifications
|
||||
).forEach(viewThemeUtils.talk::ConversationInfoCardView)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -294,12 +303,12 @@ class ConversationInfoActivity :
|
|||
|
||||
val isLobbyOpenToModeratorsOnly =
|
||||
conversation!!.lobbyState == Conversation.LobbyState.LOBBY_STATE_MODERATORS_ONLY
|
||||
(binding?.webinarInfoView?.conversationInfoLobby?.findViewById<View>(R.id.mp_checkable) as SwitchCompat)
|
||||
(binding?.webinarInfoView?.lobbySwitch as SwitchCompat)
|
||||
.isChecked = isLobbyOpenToModeratorsOnly
|
||||
|
||||
reconfigureLobbyTimerView()
|
||||
|
||||
binding?.webinarInfoView?.startTimePreferences?.setOnClickListener {
|
||||
binding?.webinarInfoView?.startTimeButton?.setOnClickListener {
|
||||
MaterialDialog(this, BottomSheet(WRAP_CONTENT)).show {
|
||||
val currentTimeCalendar = Calendar.getInstance()
|
||||
if (conversation!!.lobbyTimer != null && conversation!!.lobbyTimer != 0L) {
|
||||
|
@ -319,7 +328,7 @@ class ConversationInfoActivity :
|
|||
}
|
||||
}
|
||||
|
||||
(binding?.webinarInfoView?.conversationInfoLobby?.findViewById<View>(R.id.mp_checkable) as SwitchCompat)
|
||||
(binding?.webinarInfoView?.lobbySwitch as SwitchCompat)
|
||||
.setOnCheckedChangeListener { _, _ ->
|
||||
reconfigureLobbyTimerView()
|
||||
submitLobbyChanges()
|
||||
|
@ -336,7 +345,7 @@ class ConversationInfoActivity :
|
|||
|
||||
private fun reconfigureLobbyTimerView(dateTime: Calendar? = null) {
|
||||
val isChecked =
|
||||
(binding?.webinarInfoView?.conversationInfoLobby?.findViewById<View>(R.id.mp_checkable) as SwitchCompat)
|
||||
(binding?.webinarInfoView?.lobbySwitch as SwitchCompat)
|
||||
.isChecked
|
||||
|
||||
if (dateTime != null && isChecked) {
|
||||
|
@ -355,28 +364,28 @@ class ConversationInfoActivity :
|
|||
|
||||
if (
|
||||
conversation!!.lobbyTimer != null &&
|
||||
conversation!!.lobbyTimer != java.lang.Long.MIN_VALUE &&
|
||||
conversation!!.lobbyTimer != Long.MIN_VALUE &&
|
||||
conversation!!.lobbyTimer != 0L
|
||||
) {
|
||||
binding?.webinarInfoView?.startTimePreferences?.setSummary(
|
||||
binding?.webinarInfoView?.startTimeButtonSummary?.text = (
|
||||
dateUtils.getLocalDateTimeStringFromTimestamp(
|
||||
conversation!!.lobbyTimer!! * DateConstants.SECOND_DIVIDER
|
||||
)
|
||||
)
|
||||
} else {
|
||||
binding?.webinarInfoView?.startTimePreferences?.setSummary(R.string.nc_manual)
|
||||
binding?.webinarInfoView?.startTimeButtonSummary?.setText(R.string.nc_manual)
|
||||
}
|
||||
|
||||
if (isChecked) {
|
||||
binding?.webinarInfoView?.startTimePreferences?.visibility = VISIBLE
|
||||
binding?.webinarInfoView?.startTimeButton?.visibility = VISIBLE
|
||||
} else {
|
||||
binding?.webinarInfoView?.startTimePreferences?.visibility = GONE
|
||||
binding?.webinarInfoView?.startTimeButton?.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
fun submitLobbyChanges() {
|
||||
val state = if (
|
||||
(binding?.webinarInfoView?.conversationInfoLobby?.findViewById<View>(R.id.mp_checkable) as SwitchCompat)
|
||||
(binding?.webinarInfoView?.lobbySwitch as SwitchCompat)
|
||||
.isChecked
|
||||
) {
|
||||
1
|
||||
|
@ -679,7 +688,7 @@ class ConversationInfoActivity :
|
|||
}
|
||||
|
||||
if (!isDestroyed) {
|
||||
binding?.ownOptions?.visibility = VISIBLE
|
||||
binding?.dangerZoneOptions?.visibility = VISIBLE
|
||||
|
||||
setupWebinaryView()
|
||||
|
||||
|
@ -696,14 +705,14 @@ class ConversationInfoActivity :
|
|||
}
|
||||
|
||||
if (Conversation.ConversationType.ROOM_SYSTEM == conversation!!.type) {
|
||||
binding?.notificationSettingsView?.callNotifications?.visibility = GONE
|
||||
binding?.notificationSettingsView?.callNotificationsSwitch?.visibility = GONE
|
||||
}
|
||||
|
||||
if (conversation!!.notificationCalls === null) {
|
||||
binding?.notificationSettingsView?.callNotifications?.visibility = GONE
|
||||
binding?.notificationSettingsView?.callNotificationsSwitch?.visibility = GONE
|
||||
} else {
|
||||
binding?.notificationSettingsView?.callNotifications?.value =
|
||||
conversationCopy.notificationCalls == 1
|
||||
binding?.notificationSettingsView?.callNotificationsSwitch?.isChecked =
|
||||
(conversationCopy.notificationCalls == 1)
|
||||
}
|
||||
|
||||
getListOfParticipants()
|
||||
|
@ -751,11 +760,21 @@ class ConversationInfoActivity :
|
|||
CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "message-expiration")
|
||||
) {
|
||||
databaseStorageModule?.setMessageExpiration(conversation!!.messageExpiration)
|
||||
binding?.conversationInfoExpireMessages?.setStorageModule(databaseStorageModule)
|
||||
binding?.conversationInfoExpireMessages?.visibility = VISIBLE
|
||||
val value = databaseStorageModule!!.getString("conversation_settings_dropdown", "")
|
||||
val pos = resources.getStringArray(R.array.message_expiring_values).indexOf(value)
|
||||
val text = resources.getStringArray(R.array.message_expiring_descriptions)[pos]
|
||||
binding.conversationSettingsDropdown.setText(text)
|
||||
binding.conversationSettingsDropdown
|
||||
.setSimpleItems(resources.getStringArray(R.array.message_expiring_descriptions))
|
||||
binding.conversationSettingsDropdown.setOnItemClickListener { _, _, position, _ ->
|
||||
val value = resources.getStringArray(R.array.message_expiring_values)[position]
|
||||
databaseStorageModule!!.saveString("conversation_settings_dropdown", value)
|
||||
}
|
||||
|
||||
binding?.conversationSettingsDropdown?.visibility = VISIBLE
|
||||
binding?.conversationInfoExpireMessagesExplanation?.visibility = VISIBLE
|
||||
} else {
|
||||
binding?.categoryConversationSettings?.visibility = GONE
|
||||
binding?.conversationSettings?.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -765,40 +784,49 @@ class ConversationInfoActivity :
|
|||
conversationUser != null &&
|
||||
CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "notification-levels")
|
||||
) {
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.isEnabled = true
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.alpha = 1.0f
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.isEnabled = true
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.alpha = 1.0f
|
||||
|
||||
if (conversation!!.notificationLevel != Conversation.NotificationLevel.DEFAULT) {
|
||||
val stringValue: String =
|
||||
when (EnumNotificationLevelConverter().convertToInt(conversation!!.notificationLevel)) {
|
||||
NOTIFICATION_LEVEL_ALWAYS -> "always"
|
||||
NOTIFICATION_LEVEL_MENTION -> "mention"
|
||||
NOTIFICATION_LEVEL_NEVER -> "never"
|
||||
else -> "mention"
|
||||
NOTIFICATION_LEVEL_ALWAYS -> resources.getString(R.string.nc_notify_me_always)
|
||||
NOTIFICATION_LEVEL_MENTION -> resources.getString(R.string.nc_notify_me_mention)
|
||||
NOTIFICATION_LEVEL_NEVER -> resources.getString(R.string.nc_notify_me_never)
|
||||
else -> resources.getString(R.string.nc_notify_me_mention)
|
||||
}
|
||||
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.value = stringValue
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.setText(
|
||||
stringValue
|
||||
)
|
||||
} else {
|
||||
setProperNotificationValue(conversation)
|
||||
}
|
||||
} else {
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.isEnabled = false
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.alpha = LOW_EMPHASIS_OPACITY
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.isEnabled = false
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.alpha = LOW_EMPHASIS_OPACITY
|
||||
setProperNotificationValue(conversation)
|
||||
}
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown
|
||||
?.setSimpleItems(resources.getStringArray(R.array.message_notification_levels))
|
||||
}
|
||||
}
|
||||
|
||||
private fun setProperNotificationValue(conversation: Conversation?) {
|
||||
if (conversation!!.type == Conversation.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL) {
|
||||
// hack to see if we get mentioned always or just on mention
|
||||
if (CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "mention-flag")) {
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.value = "always"
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.setText(
|
||||
resources.getString(R.string.nc_notify_me_always)
|
||||
)
|
||||
} else {
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.value = "mention"
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.setText(
|
||||
resources.getString(R.string.nc_notify_me_mention)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotifications?.value = "mention"
|
||||
binding?.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.setText(
|
||||
resources.getString(R.string.nc_notify_me_mention)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1169,6 +1197,29 @@ class ConversationInfoActivity :
|
|||
return true
|
||||
}
|
||||
|
||||
fun setUpNotificationSettings(module: DatabaseStorageModule) {
|
||||
// set up listeners
|
||||
binding.notificationSettingsView?.importantConversationSwitch?.setOnCheckedChangeListener { _, isChecked ->
|
||||
module.saveBoolean("important_conversation_switch", isChecked)
|
||||
}
|
||||
|
||||
binding.notificationSettingsView?.callNotificationsSwitch?.setOnCheckedChangeListener { _, isChecked ->
|
||||
module.saveBoolean("call_notifications_switch", isChecked)
|
||||
}
|
||||
|
||||
binding.notificationSettingsView?.conversationInfoMessageNotificationsDropdown?.setOnItemClickListener {
|
||||
_, _, position, _ ->
|
||||
val value = resources.getStringArray(R.array.message_notification_levels_entry_values)[position]
|
||||
module.saveString("conversation_info_message_notifications_dropdown", value)
|
||||
}
|
||||
|
||||
binding.notificationSettingsView?.importantConversationSwitch?.isChecked = module
|
||||
.getBoolean("important_conversation_switch", false)
|
||||
|
||||
binding.notificationSettingsView?.callNotificationsSwitch?.isChecked = module
|
||||
.getBoolean("call_notifications_switch", true)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ConversationInfo"
|
||||
private const val NOTIFICATION_LEVEL_ALWAYS: Int = 1
|
||||
|
|
|
@ -35,18 +35,18 @@ class GuestAccessHelper(
|
|||
|
||||
fun setupGuestAccess() {
|
||||
val guestAccessAllowSwitch = (
|
||||
binding.guestAccessView.guestAccessAllowSwitch.findViewById<View>(R.id.mp_checkable)
|
||||
binding.guestAccessView.allowGuestsSwitch
|
||||
as SwitchCompat
|
||||
)
|
||||
val guestAccessPasswordSwitch = (
|
||||
binding.guestAccessView.guestAccessPasswordSwitch.findViewById<View>(R.id.mp_checkable)
|
||||
binding.guestAccessView.passwordProtectionSwitch
|
||||
as SwitchCompat
|
||||
)
|
||||
|
||||
if (conversation.canModerate(conversationUser)) {
|
||||
binding.guestAccessView.guestAccessSettings.visibility = View.VISIBLE
|
||||
} else {
|
||||
return
|
||||
binding.guestAccessView.guestAccessSettings.visibility = View.GONE
|
||||
}
|
||||
|
||||
if (conversation.type == Conversation.ConversationType.ROOM_PUBLIC_CALL) {
|
||||
|
@ -59,7 +59,7 @@ class GuestAccessHelper(
|
|||
guestAccessAllowSwitch.isChecked = false
|
||||
}
|
||||
|
||||
binding.guestAccessView.guestAccessAllowSwitch.setOnClickListener {
|
||||
binding.guestAccessView.allowGuestsSwitch.setOnClickListener {
|
||||
conversationsRepository.allowGuests(
|
||||
conversation.token!!,
|
||||
!guestAccessAllowSwitch.isChecked
|
||||
|
@ -67,7 +67,7 @@ class GuestAccessHelper(
|
|||
.observeOn(AndroidSchedulers.mainThread()).subscribe(AllowGuestsResultObserver())
|
||||
}
|
||||
|
||||
binding.guestAccessView.guestAccessPasswordSwitch.setOnClickListener {
|
||||
binding.guestAccessView.passwordProtectionSwitch.setOnClickListener {
|
||||
if (guestAccessPasswordSwitch.isChecked) {
|
||||
conversationsRepository.password("", conversation.token!!).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread()).subscribe(PasswordResultObserver(false))
|
||||
|
@ -76,11 +76,11 @@ class GuestAccessHelper(
|
|||
}
|
||||
}
|
||||
|
||||
binding.guestAccessView.guestAccessCopyUrl.setOnClickListener {
|
||||
binding.guestAccessView.shareConversationButton.setOnClickListener {
|
||||
shareUrl()
|
||||
}
|
||||
|
||||
binding.guestAccessView.guestAccessResendInvitations.setOnClickListener {
|
||||
binding.guestAccessView.resendInvitationsButton.setOnClickListener {
|
||||
conversationsRepository.resendInvitations(conversation.token!!).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread()).subscribe(ResendInvitationsObserver())
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ class GuestAccessHelper(
|
|||
|
||||
override fun onComplete() {
|
||||
(
|
||||
binding.guestAccessView.guestAccessAllowSwitch.findViewById<View>(R.id.mp_checkable)
|
||||
binding.guestAccessView.allowGuestsSwitch
|
||||
as SwitchCompat
|
||||
).isChecked = allowGuestsResult.allow
|
||||
if (allowGuestsResult.allow) {
|
||||
|
@ -194,17 +194,17 @@ class GuestAccessHelper(
|
|||
}
|
||||
|
||||
private fun showAllOptions() {
|
||||
binding.guestAccessView.guestAccessPasswordSwitch.visibility = View.VISIBLE
|
||||
binding.guestAccessView.guestAccessCopyUrl.visibility = View.VISIBLE
|
||||
binding.guestAccessView.guestAccessSettingsPasswordProtection.visibility = View.VISIBLE
|
||||
binding.guestAccessView.shareConversationButton.visibility = View.VISIBLE
|
||||
if (conversationUser.capabilities?.spreedCapability?.features?.contains("sip-support") == true) {
|
||||
binding.guestAccessView.guestAccessResendInvitations.visibility = View.VISIBLE
|
||||
binding.guestAccessView.resendInvitationsButton.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
private fun hideAllOptions() {
|
||||
binding.guestAccessView.guestAccessPasswordSwitch.visibility = View.GONE
|
||||
binding.guestAccessView.guestAccessCopyUrl.visibility = View.GONE
|
||||
binding.guestAccessView.guestAccessResendInvitations.visibility = View.GONE
|
||||
binding.guestAccessView.guestAccessSettingsPasswordProtection.visibility = View.GONE
|
||||
binding.guestAccessView.shareConversationButton.visibility = View.GONE
|
||||
binding.guestAccessView.resendInvitationsButton.visibility = View.GONE
|
||||
}
|
||||
|
||||
inner class PasswordResultObserver(private val setPassword: Boolean) :
|
||||
|
@ -226,7 +226,7 @@ class GuestAccessHelper(
|
|||
|
||||
override fun onComplete() {
|
||||
val guestAccessPasswordSwitch = (
|
||||
binding.guestAccessView.guestAccessPasswordSwitch.findViewById<View>(R.id.mp_checkable)
|
||||
binding.guestAccessView.passwordProtectionSwitch
|
||||
as SwitchCompat
|
||||
)
|
||||
guestAccessPasswordSwitch.isChecked = passwordResult.passwordSet && setPassword
|
||||
|
|
|
@ -228,8 +228,8 @@ class SettingsActivity : BaseActivity() {
|
|||
startActivity(intent)
|
||||
}
|
||||
|
||||
themeCategories()
|
||||
themeSwitchPreferences()
|
||||
// themeCategories()
|
||||
// themeSwitchPreferences()
|
||||
}
|
||||
|
||||
private fun loadCapabilitiesAndUpdateSettings() {
|
||||
|
@ -488,31 +488,31 @@ class SettingsActivity : BaseActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun themeSwitchPreferences() {
|
||||
binding.run {
|
||||
listOf(
|
||||
settingsScreenLock,
|
||||
settingsScreenSecurity,
|
||||
settingsIncognitoKeyboard,
|
||||
settingsPhoneBookIntegration,
|
||||
settingsReadPrivacy,
|
||||
settingsTypingStatus,
|
||||
settingsProxyUseCredentials
|
||||
).forEach(viewThemeUtils.talk::colorSwitchPreference)
|
||||
}
|
||||
}
|
||||
|
||||
private fun themeCategories() {
|
||||
binding.run {
|
||||
listOf(
|
||||
settingsNotificationsCategory,
|
||||
settingsAboutCategory,
|
||||
settingsAdvancedCategory,
|
||||
settingsAppearanceCategory,
|
||||
settingsPrivacyCategory
|
||||
).forEach(viewThemeUtils.talk::colorPreferenceCategory)
|
||||
}
|
||||
}
|
||||
// private fun themeSwitchPreferences() {
|
||||
// binding.run {
|
||||
// listOf(
|
||||
// settingsScreenLock,
|
||||
// settingsScreenSecurity,
|
||||
// settingsIncognitoKeyboard,
|
||||
// settingsPhoneBookIntegration,
|
||||
// settingsReadPrivacy,
|
||||
// settingsTypingStatus,
|
||||
// settingsProxyUseCredentials
|
||||
// ).forEach(viewThemeUtils.talk::colorSwitchPreference)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private fun themeCategories() {
|
||||
// binding.run {
|
||||
// listOf(
|
||||
// settingsNotificationsCategory,
|
||||
// settingsAboutCategory,
|
||||
// settingsAdvancedCategory,
|
||||
// settingsAppearanceCategory,
|
||||
// settingsPrivacyCategory
|
||||
// ).forEach(viewThemeUtils.talk::colorPreferenceCategory)
|
||||
// }
|
||||
// }
|
||||
|
||||
private fun setupProxyTypeSettings() {
|
||||
if (("No proxy" == appPreferences.proxyType) || appPreferences.proxyType == null) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import androidx.core.content.res.ResourcesCompat
|
|||
import androidx.core.graphics.ColorUtils
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.children
|
||||
import com.google.android.material.card.MaterialCardView
|
||||
import com.google.android.material.materialswitch.MaterialSwitch
|
||||
import com.nextcloud.android.common.ui.theme.MaterialSchemes
|
||||
import com.nextcloud.android.common.ui.theme.ViewThemeUtilsBase
|
||||
import com.nextcloud.android.common.ui.theme.utils.AndroidXViewThemeUtils
|
||||
|
@ -50,7 +50,6 @@ import com.nextcloud.talk.utils.DisplayUtils
|
|||
import com.nextcloud.talk.utils.DrawableUtils
|
||||
import com.vanniktech.emoji.EmojiTextView
|
||||
import com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
import com.yarolegovich.mp.MaterialSwitchPreference
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
@ -146,12 +145,10 @@ class TalkSpecificViewThemeUtils @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
fun colorSwitchPreference(preference: MaterialSwitchPreference) {
|
||||
val children = preference.children
|
||||
val switch = children.find { it is SwitchCompat }
|
||||
fun colorSwitch(preference: MaterialSwitch) {
|
||||
val switch = preference as SwitchCompat
|
||||
if (switch != null) {
|
||||
val switchCompat = (switch as SwitchCompat)
|
||||
appcompat.colorSwitchCompat(switchCompat)
|
||||
appcompat.colorSwitchCompat(switch)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,6 +252,35 @@ class TalkSpecificViewThemeUtils @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
fun ConversationInfoCardView(cardView: MaterialCardView) {
|
||||
withScheme(cardView) { scheme ->
|
||||
val background = cardView.context.getColor(R.color.bg_default)
|
||||
cardView.backgroundTintList =
|
||||
ColorStateList(
|
||||
arrayOf(
|
||||
intArrayOf(android.R.attr.state_checked),
|
||||
intArrayOf(-android.R.attr.state_checked)
|
||||
),
|
||||
intArrayOf(
|
||||
scheme.primary,
|
||||
background
|
||||
)
|
||||
)
|
||||
cardView.setStrokeColor(
|
||||
ColorStateList(
|
||||
arrayOf(
|
||||
intArrayOf(android.R.attr.state_checked),
|
||||
intArrayOf(-android.R.attr.state_checked)
|
||||
),
|
||||
intArrayOf(
|
||||
scheme.primary,
|
||||
background
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val THEMEABLE_PLACEHOLDER_IDS = listOf(
|
||||
R.drawable.ic_mimetype_package_x_generic,
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Nextcloud Talk application
|
||||
*
|
||||
* @author Mario Danic
|
||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.talk.utils.preferences.preferencestorage;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.nextcloud.talk.data.user.model.User;
|
||||
import com.yarolegovich.mp.io.StorageModule;
|
||||
|
||||
public class DatabaseStorageFactory implements StorageModule.Factory {
|
||||
private User conversationUser;
|
||||
private String conversationToken;
|
||||
|
||||
|
||||
public DatabaseStorageFactory(User conversationUser, String conversationToken) {
|
||||
this.conversationUser = conversationUser;
|
||||
this.conversationToken = conversationToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageModule create(Context context) {
|
||||
return new DatabaseStorageModule(conversationUser, conversationToken);
|
||||
}
|
||||
}
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package com.nextcloud.talk.utils.preferences.preferencestorage;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -37,9 +36,6 @@ import com.nextcloud.talk.models.json.generic.GenericOverall;
|
|||
import com.nextcloud.talk.utils.ApiUtils;
|
||||
import com.nextcloud.talk.utils.UserIdUtils;
|
||||
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew;
|
||||
import com.yarolegovich.mp.io.StorageModule;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
@ -51,7 +47,7 @@ import io.reactivex.disposables.Disposable;
|
|||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@AutoInjector(NextcloudTalkApplication.class)
|
||||
public class DatabaseStorageModule implements StorageModule {
|
||||
public class DatabaseStorageModule {
|
||||
private static final String TAG = "DatabaseStorageModule";
|
||||
@Inject
|
||||
ArbitraryStorageManager arbitraryStorageManager;
|
||||
|
@ -76,9 +72,8 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
this.conversationToken = conversationToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveBoolean(String key, boolean value) {
|
||||
if ("call_notifications".equals(key)) {
|
||||
if ("call_notifications_switch".equals(key)) {
|
||||
int apiVersion = ApiUtils.getConversationApiVersion(conversationUser, new int[]{4});
|
||||
ncApi.notificationCalls(ApiUtils.getCredentials(conversationUser.getUsername(),
|
||||
conversationUser.getToken()),
|
||||
|
@ -112,7 +107,7 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
);
|
||||
}
|
||||
|
||||
if (!"conversation_lobby".equals(key)) {
|
||||
if (!"lobby_switch".equals(key)) {
|
||||
arbitraryStorageManager.storeStorageSetting(accountIdentifier,
|
||||
key,
|
||||
Boolean.toString(value),
|
||||
|
@ -122,9 +117,8 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveString(String key, String value) {
|
||||
if ("message_expire_key".equals(key)) {
|
||||
if ("conversation_settings_dropdown".equals(key)) {
|
||||
int apiVersion = ApiUtils.getConversationApiVersion(conversationUser, new int[]{4});
|
||||
|
||||
String trimmedValue = value.replace("expire_", "");
|
||||
|
@ -163,7 +157,7 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
}
|
||||
});
|
||||
|
||||
} else if ("message_notification_level".equals(key)) {
|
||||
} else if ("conversation_info_message_notifications_dropdown".equals(key)) {
|
||||
if (CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "notification-levels")) {
|
||||
if (!TextUtils.isEmpty(messageNotificationLevel) && !messageNotificationLevel.equals(value)) {
|
||||
int intValue;
|
||||
|
@ -198,6 +192,7 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
|
||||
@Override
|
||||
public void onNext(GenericOverall genericOverall) {
|
||||
Log.i(TAG, "onNext called");
|
||||
messageNotificationLevel = value;
|
||||
}
|
||||
|
||||
|
@ -219,20 +214,8 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
arbitraryStorageManager.storeStorageSetting(accountIdentifier, key, value, conversationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(String key, int value) {
|
||||
arbitraryStorageManager.storeStorageSetting(accountIdentifier, key, Integer.toString(value), conversationToken);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveStringSet(String key, Set<String> value) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(String key, boolean defaultVal) {
|
||||
if ("conversation_lobby".equals(key)) {
|
||||
if ("lobby_switch".equals(key)) {
|
||||
return lobbyValue;
|
||||
} else {
|
||||
return arbitraryStorageManager
|
||||
|
@ -242,9 +225,8 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(String key, String defaultVal) {
|
||||
if ("message_expire_key".equals(key)) {
|
||||
if ("conversation_settings_dropdown".equals(key)) {
|
||||
switch (messageExpiration) {
|
||||
case 2419200:
|
||||
return "expire_2419200";
|
||||
|
@ -259,7 +241,7 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
default:
|
||||
return "expire_0";
|
||||
}
|
||||
} else if ("message_notification_level".equals(key)) {
|
||||
} else if ("conversation_info_message_notifications_dropdown".equals(key)) {
|
||||
return messageNotificationLevel;
|
||||
} else {
|
||||
return arbitraryStorageManager
|
||||
|
@ -269,35 +251,6 @@ public class DatabaseStorageModule implements StorageModule {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String key, int defaultVal) {
|
||||
return arbitraryStorageManager
|
||||
.getStorageSetting(accountIdentifier, key, conversationToken)
|
||||
.map(arbitraryStorage -> {
|
||||
if (arbitraryStorage.getValue() != null) {
|
||||
return Integer.parseInt(arbitraryStorage.getValue());
|
||||
} else {
|
||||
return defaultVal;
|
||||
}
|
||||
})
|
||||
.blockingGet(defaultVal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getStringSet(String key, Set<String> defaultVal) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestoreInstanceState(Bundle savedState) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
public void setMessageExpiration(int messageExpiration) {
|
||||
this.messageExpiration = messageExpiration;
|
||||
}
|
||||
|
|
|
@ -31,12 +31,14 @@
|
|||
android:id="@+id/parent_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/conversation_info_appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/conversation_info_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -73,27 +75,27 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/conversation_info_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:animateLayoutChanges="true"
|
||||
android:visibility="gone"
|
||||
apc:cardBackgroundColor="@color/bg_default"
|
||||
apc:cardElevation="0dp"
|
||||
tools:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar_image"
|
||||
android:layout_width="@dimen/avatar_size_big"
|
||||
android:layout_height="@dimen/avatar_size_big"
|
||||
android:layout_marginTop="@dimen/standard_margin"
|
||||
android:layout_centerHorizontal="true"
|
||||
tools:src="@drawable/account_circle_48dp"
|
||||
android:contentDescription="@string/avatar" />
|
||||
android:contentDescription="@string/avatar"
|
||||
tools:src="@drawable/account_circle_48dp" />
|
||||
|
||||
<androidx.emoji2.widget.EmojiTextView
|
||||
android:id="@+id/display_name_text"
|
||||
|
@ -106,16 +108,15 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/conversation_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:animateLayoutChanges="true"
|
||||
android:visibility="gone"
|
||||
apc:cardBackgroundColor="@color/bg_default"
|
||||
apc:cardElevation="0dp"
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.emoji2.widget.EmojiTextView
|
||||
|
@ -123,32 +124,53 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="@dimen/standard_margin"
|
||||
android:layout_marginTop="@dimen/margin_between_elements"
|
||||
android:layout_margin="@dimen/standard_half_margin"
|
||||
android:autoLink="web"
|
||||
android:padding="@dimen/standard_half_padding"
|
||||
tools:text="Hello world!" />
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
android:id="@+id/otherRoomOptions"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/add_to_favorites_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding"
|
||||
android:visibility="gone"
|
||||
apc:cardBackgroundColor="@color/bg_default"
|
||||
apc:cardElevation="0dp"
|
||||
tools:visibility="visible">
|
||||
tools:visibility="gone">
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
android:id="@+id/favoriteConversationAction"
|
||||
android:layout_width="match_parent"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
apc:mp_icon="@drawable/ic_star_black_24dp"
|
||||
apc:mp_icon_tint="@color/grey_600"
|
||||
apc:mp_title="@string/nc_add_to_favorites">
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
</com.yarolegovich.mp.MaterialStandardPreference>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_star_black_24dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/grey_600" />
|
||||
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_add_to_favorites"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/settings"
|
||||
|
@ -158,144 +180,358 @@
|
|||
|
||||
<include
|
||||
android:id="@+id/notification_settings_view"
|
||||
layout="@layout/notification_settings_item"
|
||||
layout="@layout/item_notification_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin" />
|
||||
|
||||
<include
|
||||
android:id="@+id/webinar_info_view"
|
||||
layout="@layout/webinar_info_item"
|
||||
layout="@layout/item_webinar_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin" />
|
||||
|
||||
<include
|
||||
android:id="@+id/guest_access_view"
|
||||
layout="@layout/guest_access_settings_item"
|
||||
layout="@layout/item_guest_access_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/category_shared_items"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
apc:cardBackgroundColor="@color/bg_default"
|
||||
apc:cardElevation="0dp"
|
||||
apc:mpc_title="@string/nc_shared_items">
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:elevation="0dp">
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
android:id="@+id/show_shared_items_action"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
apc:mp_icon="@drawable/ic_folder_multiple_image"
|
||||
apc:mp_icon_tint="@color/grey_600"
|
||||
apc:mp_title="@string/nc_shared_items_description" />
|
||||
android:text="@string/nc_shared_items"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="@dimen/md_title_textsize"
|
||||
android:textStyle="bold"
|
||||
android:padding="@dimen/standard_padding"/>
|
||||
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
android:id="@+id/category_conversation_settings"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/shared_items_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
apc:cardBackgroundColor="@color/bg_default"
|
||||
apc:cardElevation="0dp"
|
||||
apc:mpc_title="@string/nc_conversation_settings">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.yarolegovich.mp.MaterialChoicePreference
|
||||
android:id="@+id/conversation_info_expire_messages"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
apc:mp_entry_descriptions="@array/message_expiring_descriptions"
|
||||
apc:mp_entry_values="@array/message_expiring_values"
|
||||
apc:mp_key="message_expire_key"
|
||||
apc:mp_show_value="onBottom"
|
||||
apc:mp_title="@string/nc_expire_messages">
|
||||
</com.yarolegovich.mp.MaterialChoicePreference>
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/conversation_info_expire_messages_explanation"
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:layout_marginEnd="@dimen/standard_margin"
|
||||
android:textColor="@color/disabled_text"
|
||||
android:text="@string/nc_expire_messages_explanation">
|
||||
</TextView>
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_folder_multiple_image"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/grey_600" />
|
||||
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_shared_items_description"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/conversation_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:elevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_conversation_settings"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="@dimen/md_title_textsize"
|
||||
android:textStyle="bold"
|
||||
android:padding="@dimen/standard_padding"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/conversation_info_chat_settings_input_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:layout_marginHorizontal="@dimen/standard_half_margin"
|
||||
android:hint="@string/nc_expire_messages"
|
||||
app:boxStrokeWidth="@dimen/zero">
|
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/conversation_settings_dropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:lines="1"
|
||||
android:popupTheme="@style/ThemeOverlay.AppTheme.PopupMenu"
|
||||
android:text="" />
|
||||
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/conversation_info_expire_messages_explanation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/standard_margin"
|
||||
android:text="@string/nc_expire_messages_explanation"
|
||||
android:textColor="@color/disabled_text" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/participants_list_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:visibility="gone"
|
||||
apc:cardBackgroundColor="@color/bg_default"
|
||||
apc:cardElevation="0dp"
|
||||
apc:mpc_title="@string/nc_participants"
|
||||
tools:ignore="UnknownIdInLayout"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/standard_padding"
|
||||
android:text="@string/nc_participants"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="@dimen/md_title_textsize"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/addParticipantsAction"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
apc:mp_icon="@drawable/ic_account_plus"
|
||||
apc:mp_icon_tint="@color/grey_600"
|
||||
apc:mp_title="@string/nc_participants_add" />
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_account_plus"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/grey_600" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_participants_add"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/standard_half_padding"
|
||||
tools:listitem="@layout/rv_item_conversation_info_participant" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.yarolegovich.mp.MaterialPreferenceCategory
|
||||
android:id="@+id/ownOptions"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/danger_zone_options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
apc:cardBackgroundColor="@color/bg_default"
|
||||
apc:cardElevation="0dp"
|
||||
tools:visibility="visible">
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:elevation="0dp">
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/danger_zone"
|
||||
android:textColor="@color/design_default_color_error"
|
||||
android:textSize="@dimen/md_title_textsize"
|
||||
android:textStyle="bold"
|
||||
android:padding="@dimen/standard_padding"/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/leaveConversationAction"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
apc:mp_icon="@drawable/ic_exit_to_app_black_24dp"
|
||||
apc:mp_icon_tint="@color/grey_600"
|
||||
apc:mp_title="@string/nc_leave" />
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin">
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_exit_to_app_black_24dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/design_default_color_error" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_leave"
|
||||
android:textColor="@color/design_default_color_error"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/clearConversationHistory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
apc:mp_icon="@drawable/ic_delete_black_24dp"
|
||||
apc:mp_icon_tint="@color/grey_600"
|
||||
apc:mp_title="@string/nc_clear_history" />
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin">
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_delete_black_24dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/design_default_color_error" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_clear_history"
|
||||
android:textColor="@color/design_default_color_error"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/deleteConversationAction"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
apc:mp_icon="@drawable/ic_delete_black_24dp"
|
||||
apc:mp_icon_tint="@color/grey_600"
|
||||
apc:mp_title="@string/nc_delete_call" />
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin">
|
||||
|
||||
</com.yarolegovich.mp.MaterialPreferenceCategory>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_delete_black_24dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/design_default_color_error" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_delete_call"
|
||||
android:textColor="@color/design_default_color_error"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
211
app/src/main/res/layout/item_guest_access_settings.xml
Normal file
211
app/src/main/res/layout/item_guest_access_settings.xml
Normal file
|
@ -0,0 +1,211 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/guest_access_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_guest_access"
|
||||
android:textSize="@dimen/md_title_textsize"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
android:padding="@dimen/standard_padding"/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/guest_access_settings_allow_guest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:layout_marginLeft="@dimen/standard_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginRight="@dimen/standard_half_margin"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_guest_access_allow_title"
|
||||
|
||||
android:textSize="@dimen/two_line_primary_text_size"/>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/nc_guest_access_allow_summary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/allow_guests_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/guest_access_settings_password_protection"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:layout_marginLeft="@dimen/standard_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_guest_access_password_title"
|
||||
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/standard_half_margin"
|
||||
android:hint="@string/nc_guest_access_password_summary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/password_protection_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/share_conversation_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_share_variant"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/grey_600" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_guest_access_share_link"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/resend_invitations_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:icon="@drawable/ic_email"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:iconTint="@color/grey_600" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/nc_guest_access_resend_invitations"
|
||||
android:textSize="@dimen/two_line_primary_text_size" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
134
app/src/main/res/layout/item_notification_settings.xml
Normal file
134
app/src/main/res/layout/item_notification_settings.xml
Normal file
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/notification_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_notification_settings"
|
||||
android:textSize="@dimen/md_title_textsize"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
android:padding="@dimen/standard_padding"/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/notification_settings_important_conversation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:layout_marginLeft="@dimen/standard_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_important_conversation"
|
||||
android:textSize="@dimen/two_line_primary_text_size"/>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/standard_half_margin"
|
||||
android:hint="@string/nc_important_conversation_desc" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/important_conversation_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/notification_settings_messages_input_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/standard_half_margin"
|
||||
android:hint="@string/nc_plain_old_messages"
|
||||
app:boxStrokeWidth="@dimen/zero"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/conversation_info_message_notifications_dropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:lines="1"
|
||||
android:popupTheme="@style/ThemeOverlay.AppTheme.PopupMenu"
|
||||
android:text=""/>
|
||||
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/notification_settings_call_notifications"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
android:layout_marginLeft="@dimen/standard_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_call_notifications"
|
||||
android:textSize="@dimen/two_line_primary_text_size"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/call_notifications_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
134
app/src/main/res/layout/item_webinar_info.xml
Normal file
134
app/src/main/res/layout/item_webinar_info.xml
Normal file
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/webinar_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_webinar"
|
||||
android:textSize="@dimen/md_title_textsize"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
android:padding="@dimen/standard_padding"/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/webinar_settings_lobby"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:iconTint="@color/grey_600"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:icon="@drawable/ic_room_service_black_24dp"
|
||||
app:iconGravity="textStart"/>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/nc_lobby"
|
||||
android:textSize="@dimen/two_line_primary_text_size"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/lobby_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:checked="true"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/start_time_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_half_padding">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:iconTint="@color/grey_600"
|
||||
app:iconSize="@dimen/sm_icon_height"
|
||||
app:icon="@drawable/ic_timer_black_24dp"
|
||||
app:iconGravity="textStart"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nc_start_time"
|
||||
android:textSize="@dimen/two_line_primary_text_size"
|
||||
android:layout_gravity="start"/>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/start_time_button_summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/nc_manual"
|
||||
android:textSize="@dimen/two_line_primary_text_size"
|
||||
android:layout_gravity="start"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
|
@ -88,5 +88,6 @@
|
|||
<dimen name="poll_buttons_min_width">150dp</dimen>
|
||||
|
||||
<dimen name="fab_small">40dp</dimen>
|
||||
<dimen name="sm_icon_height">30dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -153,7 +153,6 @@ How to translate with transifex:
|
|||
<string name="nc_settings_read_privacy_title">Read status</string>
|
||||
<string name="nc_settings_typing_status_desc">Share my typing-status and show the typing-status of others</string>
|
||||
<string name="nc_settings_typing_status_title">Typing status</string>
|
||||
<string name="nc_settings_typing_status_hpb_description">Typing status is only available when using a high performance backend (HPB)</string>
|
||||
|
||||
<string name="nc_screen_lock_timeout_30">30 seconds</string>
|
||||
<string name="nc_screen_lock_timeout_60">1 minute</string>
|
||||
|
@ -197,7 +196,6 @@ How to translate with transifex:
|
|||
|
||||
<string name="nc_new_conversation">New conversation</string>
|
||||
<string name="nc_join_via_link">Join with a link</string>
|
||||
<string name="nc_list_open_conversations">List open conversations</string>
|
||||
<string name="nc_join_via_web">Join via web</string>
|
||||
<string name="nc_mark_as_read">Mark as read</string>
|
||||
<string name="nc_mark_as_unread">Mark as unread</string>
|
||||
|
@ -206,10 +204,6 @@ How to translate with transifex:
|
|||
|
||||
<string name="nc_forward_to_three_dots">Forward to …</string>
|
||||
|
||||
<!-- Open conversations -->
|
||||
<string name="nc_no_open_conversations_headline">No open conversations</string>
|
||||
<string name="nc_no_open_conversations_text">No open conversations that you can join.\nEither there are no open conversations or you already joined all of them.</string>
|
||||
|
||||
<!-- Contacts -->
|
||||
<string name="nc_select_participants">Select participants</string>
|
||||
<string name="nc_add_participants">Add participants</string>
|
||||
|
@ -565,14 +559,6 @@ How to translate with transifex:
|
|||
<string name="nc_dialog_invalid_password">Invalid password</string>
|
||||
<string name="nc_dialog_reauth_or_delete">Do you want to reauthorize or delete this account?</string>
|
||||
|
||||
<string name="nc_dialog_outdated_client">App is outdated</string>
|
||||
<string name="nc_dialog_outdated_client_description">The app is too old and no longer supported by this server. Please update.</string>
|
||||
<string name="nc_dialog_outdated_client_option_update">Update</string>
|
||||
<string name="nc_switch_account">Switch account</string>
|
||||
<string name="nc_dialog_maintenance_mode">Maintenance mode</string>
|
||||
<string name="nc_dialog_maintenance_mode_description">Server is currently in maintenance mode.</string>
|
||||
<string name="nc_close_app">Close app</string>
|
||||
|
||||
<!-- Take photo -->
|
||||
<string name="take_photo">Take a photo</string>
|
||||
<string name="take_photo_switch_camera">Switch camera</string>
|
||||
|
@ -685,8 +671,6 @@ How to translate with transifex:
|
|||
<string name="translation_error_title">Translation failed</string>
|
||||
<string name="translation_error_message">Could not detect language</string>
|
||||
<string name="translation_copy_translated_text">Copy translated text</string>
|
||||
<string name="nc_filter">Filter Conversations</string>
|
||||
<string name="mentioned">Mentioned</string>
|
||||
<string name="unread">Unread</string>
|
||||
<string name="danger_zone">Danger Zone</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue