Proto: loading main color from linphonerc

This commit is contained in:
Sylvain Berfini 2025-08-19 14:03:58 +02:00
parent fc90a95e94
commit b63869814d
22 changed files with 74 additions and 367 deletions

View file

@ -23,7 +23,6 @@ import android.annotation.SuppressLint
import android.content.ActivityNotFoundException
import android.content.Intent
import android.content.res.Configuration
import android.content.res.Resources
import android.net.Uri
import android.os.Bundle
import android.provider.Settings
@ -38,7 +37,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.linphone.LinphoneApplication.Companion.corePreferences
import org.linphone.R
import org.linphone.compatibility.Compatibility
import org.linphone.core.tools.Log
import org.linphone.utils.ToastUtils
@ -53,23 +51,6 @@ open class GenericActivity : AppCompatActivity() {
private lateinit var toastsArea: ViewGroup
private var mainColor: String = "orange"
override fun getTheme(): Resources.Theme {
mainColor = corePreferences.themeMainColor
val theme = super.theme
when (mainColor) {
"yellow" -> theme.applyStyle(R.style.Theme_LinphoneYellow, true)
"green" -> theme.applyStyle(R.style.Theme_LinphoneGreen, true)
"blue" -> theme.applyStyle(R.style.Theme_LinphoneBlue, true)
"red" -> theme.applyStyle(R.style.Theme_LinphoneRed, true)
"pink" -> theme.applyStyle(R.style.Theme_LinphonePink, true)
"purple" -> theme.applyStyle(R.style.Theme_LinphonePurple, true)
else -> theme.applyStyle(R.style.Theme_Linphone, true)
}
return theme
}
@SuppressLint("SourceLockedOrientationActivity")
override fun onCreate(savedInstanceState: Bundle?) {
enableWindowSecureMode(corePreferences.enableSecureMode)
@ -95,13 +76,6 @@ open class GenericActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
}
protected fun checkMainColorTheme() {
if (mainColor != corePreferences.themeMainColor) {
Log.i("$TAG Main color setting has changed, re-creating activity")
recreate()
}
}
fun setUpToastsArea(viewGroup: ViewGroup) {
toastsArea = viewGroup
}

View file

@ -21,11 +21,14 @@ package org.linphone.ui
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import androidx.core.graphics.toColorInt
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import org.linphone.utils.Event
open class GenericViewModel : ViewModel() {
val mainColor = MutableLiveData<Int>()
// Message res id, icon
val showGreenToastEvent: MutableLiveData<Event<Pair<Int, Int>>> by lazy {
MutableLiveData<Event<Pair<Int, Int>>>()
@ -59,4 +62,12 @@ open class GenericViewModel : ViewModel() {
fun showFormattedRedToast(message: String, @DrawableRes icon: Int) {
showFormattedRedToastEvent.postValue(Event(Pair(message, icon)))
}
init {
mainColor.value = "#840350".toColorInt()
}
fun checkMainColorTheme() {
// TODO
}
}

View file

@ -22,7 +22,6 @@ package org.linphone.ui.call
import android.Manifest
import android.content.Intent
import android.content.pm.PackageManager
import android.content.res.Resources
import android.graphics.Color
import android.os.Bundle
import android.os.PowerManager
@ -48,7 +47,6 @@ import kotlin.math.max
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.LinphoneApplication.Companion.corePreferences
import org.linphone.R
import org.linphone.compatibility.Api28Compatibility
import org.linphone.compatibility.Compatibility
@ -108,21 +106,6 @@ class CallActivity : GenericActivity() {
}
}
override fun getTheme(): Resources.Theme {
val mainColor = corePreferences.themeMainColor
val theme = super.getTheme()
when (mainColor) {
"yellow" -> theme.applyStyle(R.style.Theme_LinphoneInCallYellow, true)
"green" -> theme.applyStyle(R.style.Theme_LinphoneInCallGreen, true)
"blue" -> theme.applyStyle(R.style.Theme_LinphoneInCallBlue, true)
"red" -> theme.applyStyle(R.style.Theme_LinphoneInCallRed, true)
"pink" -> theme.applyStyle(R.style.Theme_LinphoneInCallPink, true)
"purple" -> theme.applyStyle(R.style.Theme_LinphoneInCallPurple, true)
else -> theme.applyStyle(R.style.Theme_LinphoneInCall, true)
}
return theme
}
override fun onCreate(savedInstanceState: Bundle?) {
val style = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT) {
true // Force dark mode

View file

@ -351,7 +351,7 @@ class MainActivity : GenericActivity() {
coreContext.provisioningAppliedEvent.observe(this) {
it.consume {
Log.i("$TAG Remote provisioning was applied, checking if theme has changed")
checkMainColorTheme()
viewModel.checkMainColorTheme()
}
}

View file

@ -100,22 +100,6 @@ class SettingsFragment : GenericMainFragment() {
}
}
private val colorListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
val label = viewModel.availableColorsNames[position]
val value = viewModel.availableColorsValues[position]
Log.i("$TAG Selected color is now [$label] ($value)")
// Be careful not to create an infinite loop
if (value != viewModel.color.value.orEmpty()) {
viewModel.setColor(value)
requireActivity().recreate()
}
}
override fun onNothingSelected(parent: AdapterView<*>?) {
}
}
private val tunnelModeListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
viewModel.tunnelModeIndex.value = position
@ -302,22 +286,6 @@ class SettingsFragment : GenericMainFragment() {
binding.userInterfaceSettings.themeSpinner.onItemSelectedListener = themeListener
}
// Choose main color
val colorAdapter = ArrayAdapter(
requireContext(),
R.layout.drop_down_item,
viewModel.availableColorsNames
)
colorAdapter.setDropDownViewResource(R.layout.generic_dropdown_cell)
binding.userInterfaceSettings.colorSpinner.adapter = colorAdapter
viewModel.color.observe(viewLifecycleOwner) { color ->
binding.userInterfaceSettings.colorSpinner.setSelection(
viewModel.availableColorsValues.indexOf(color)
)
binding.userInterfaceSettings.colorSpinner.onItemSelectedListener = colorListener
}
// Tunnel mode
val tunnelModeAdapter = ArrayAdapter(
requireContext(),

View file

@ -162,27 +162,6 @@ class SettingsViewModel
)
val availableThemesValues = arrayListOf(-1, 0, 1)
val showColorSelector = MutableLiveData<Boolean>()
val color = MutableLiveData<String>()
val availableColorsNames = arrayListOf(
AppUtils.getString(R.string.orange),
AppUtils.getString(R.string.yellow),
AppUtils.getString(R.string.green),
AppUtils.getString(R.string.blue),
AppUtils.getString(R.string.red),
AppUtils.getString(R.string.pink),
AppUtils.getString(R.string.purple)
)
val availableColorsValues = arrayListOf(
"orange",
"yellow",
"green",
"blue",
"red",
"pink",
"purple"
)
// Tunnel settings
val tunnelMainHost = MutableLiveData<String>()
val tunnelMainPort = MutableLiveData<String>()
@ -273,7 +252,6 @@ class SettingsViewModel
showMeetingsSettings.postValue(!corePreferences.disableMeetings)
ldapAvailable.postValue(core.ldapAvailable())
showThemeSelector.postValue(corePreferences.darkModeAllowed)
showColorSelector.postValue(corePreferences.changeMainColorAllowed)
showAdvancedSettings.postValue(!corePreferences.hideAdvancedSettings)
showDeveloperSettings.postValue(corePreferences.showDeveloperSettings)
}
@ -346,7 +324,6 @@ class SettingsViewModel
autoShowDialpad.postValue(corePreferences.automaticallyShowDialpad)
theme.postValue(corePreferences.darkMode)
color.postValue(corePreferences.themeMainColor)
if (core.tunnelAvailable()) {
setupTunnel()
@ -703,15 +680,6 @@ class SettingsViewModel
theme.value = themeValue
}
@UiThread
fun setColor(colorName: String) {
coreContext.postOnCoreThread {
corePreferences.themeMainColor = colorName
Log.i("$TAG Color [$colorName] saved")
}
color.value = colorName
}
@UiThread
fun toggleTunnelExpand() {
expandTunnel.value = expandTunnel.value == false

View file

@ -24,7 +24,6 @@ import androidx.annotation.RequiresApi
import androidx.annotation.UiThread
import androidx.annotation.WorkerThread
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.launch
import org.linphone.LinphoneApplication.Companion.coreContext
@ -43,6 +42,7 @@ import org.linphone.core.RegistrationState
import org.linphone.core.VFS
import org.linphone.core.tools.AndroidPlatformHelper
import org.linphone.core.tools.Log
import org.linphone.ui.GenericViewModel
import org.linphone.utils.AppUtils
import org.linphone.utils.Event
import org.linphone.utils.FileUtils
@ -50,7 +50,7 @@ import org.linphone.utils.LinphoneUtils
class MainViewModel
@UiThread
constructor() : ViewModel() {
constructor() : GenericViewModel() {
companion object {
private const val TAG = "[Main ViewModel]"

View file

@ -21,6 +21,7 @@ package org.linphone.utils
import android.annotation.SuppressLint
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.PorterDuff
import android.graphics.drawable.AnimatedVectorDrawable
import android.text.Editable
@ -61,6 +62,7 @@ import coil3.transform.CircleCropTransformation
import coil3.transform.RoundedCornersTransformation
import coil3.video.videoFrameMillis
import com.google.android.flexbox.FlexboxLayout
import com.google.android.material.progressindicator.CircularProgressIndicator
import org.linphone.BR
import org.linphone.R
import org.linphone.contacts.AbstractAvatarModel
@ -652,3 +654,39 @@ fun EmojiPickerView.setEmojiPickedListener(listener: EmojiPickedListener) {
interface EmojiPickedListener {
fun onEmojiPicked(item: EmojiViewItem)
}
@UiThread
@BindingAdapter("app:tint")
fun AppCompatTextView.setTintFromConfig(@ColorInt color: Int) {
setTextColor(color)
}
@UiThread
@BindingAdapter("app:tint")
fun ImageView.setTintFromConfig(@ColorInt color: Int) {
setColorFilter(color, PorterDuff.Mode.SRC_IN)
}
@UiThread
@BindingAdapter("android:background")
fun View.setBackgroundColorFromConfig(@ColorInt color: Int) {
setBackgroundColor(color)
}
@UiThread
@BindingAdapter("android:backgroundTint")
fun View.setBackgroundTintFromConfig(@ColorInt color: Int) {
backgroundTintList = ColorStateList.valueOf(color)
}
@UiThread
@BindingAdapter("app:backgroundTint")
fun View.setAppBackgroundTintFromConfig(@ColorInt color: Int) {
setBackgroundTintFromConfig(color)
}
@UiThread
@BindingAdapter("app:indicatorColor")
fun CircularProgressIndicator.setBackgroundTintFromConfig(@ColorInt color: Int) {
setIndicatorColor(color)
}

View file

@ -25,7 +25,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/top_bar_height"
android:background="@drawable/shape_squircle_main1_500_r10_bottom">
android:background="@drawable/shape_squircle_main1_500_r10_bottom"
android:backgroundTint="@{viewModel.mainColor}">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"

View file

@ -28,7 +28,7 @@
android:layout_marginBottom="12dp"
android:drawableTop="@drawable/address_book"
android:drawablePadding="4dp"
android:drawableTint="@{viewModel.contactsSelected ? @color/main1_500 : @color/main2_600, default=@color/main2_600}"
android:drawableTint="@{viewModel.contactsSelected ? viewModel.mainColor : @color/main2_600, default=@color/main2_600}"
android:text="@string/bottom_navigation_contacts_label"
textFont="@{viewModel.contactsSelected ? NotoSansFont.NotoSansBold : NotoSansFont.NotoSansRegular}"
app:layout_constraintBottom_toBottomOf="parent"
@ -46,7 +46,7 @@
android:layout_marginBottom="12dp"
android:drawableTop="@drawable/phone"
android:drawablePadding="4dp"
android:drawableTint="@{viewModel.callsSelected ? @color/main1_500 : @color/main2_600, default=@color/main2_600}"
android:drawableTint="@{viewModel.callsSelected ? viewModel.mainColor : @color/main2_600, default=@color/main2_600}"
android:text="@string/bottom_navigation_calls_label"
textFont="@{viewModel.callsSelected ? NotoSansFont.NotoSansBold : NotoSansFont.NotoSansRegular}"
app:layout_constraintBottom_toBottomOf="parent"
@ -77,7 +77,7 @@
android:layout_marginBottom="12dp"
android:drawableTop="@drawable/chat_teardrop_text"
android:drawablePadding="4dp"
android:drawableTint="@{viewModel.conversationsSelected ? @color/main1_500 : @color/main2_600, default=@color/main2_600}"
android:drawableTint="@{viewModel.conversationsSelected ? viewModel.mainColor : @color/main2_600, default=@color/main2_600}"
android:text="@string/bottom_navigation_conversations_label"
android:visibility="@{viewModel.hideConversations ? View.GONE : View.VISIBLE}"
textFont="@{viewModel.conversationsSelected ? NotoSansFont.NotoSansBold : NotoSansFont.NotoSansRegular}"
@ -109,7 +109,7 @@
android:layout_marginBottom="12dp"
android:drawableTop="@drawable/video_conference"
android:drawablePadding="4dp"
android:drawableTint="@{viewModel.meetingsSelected ? @color/main1_500 : @color/main2_600, default=@color/main2_600}"
android:drawableTint="@{viewModel.meetingsSelected ? viewModel.mainColor : @color/main2_600, default=@color/main2_600}"
android:text="@string/bottom_navigation_meetings_label"
android:visibility="@{viewModel.hideMeetings ? View.GONE : View.VISIBLE}"
textFont="@{viewModel.meetingsSelected ? NotoSansFont.NotoSansBold : NotoSansFont.NotoSansRegular}"

View file

@ -28,7 +28,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_main1_500">
android:background="@{viewModel.mainColor}">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
@ -117,7 +117,7 @@
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="@{viewModel.fetchInProgress ? View.VISIBLE : View.GONE}"
app:indicatorColor="?attr/color_main1_500"
app:indicatorColor="@{viewModel.mainColor}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -141,7 +141,7 @@
android:src="@drawable/chat_teardrop_plus"
android:contentDescription="@string/content_description_chat_create"
app:tint="?attr/color_on_main"
app:backgroundTint="?attr/color_main1_500"
app:backgroundTint="@{viewModel.mainColor}"
app:shapeAppearanceOverlay="@style/rounded"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_nav_bar" />

View file

@ -28,7 +28,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_main1_500">
android:background="@{viewModel.mainColor}">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
@ -169,6 +169,8 @@
android:gravity="center"
android:background="@drawable/secondary_button_background"
android:visibility="@{viewModel.contactsList.empty &amp;&amp; !viewModel.areAllContactsDisplayed ? View.VISIBLE : View.GONE}"
app:tint="@{viewModel.mainColor}"
app:backgroundTint="@{viewModel.mainColor}"
app:layout_constraintTop_toBottomOf="@id/no_contacts_label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
@ -179,7 +181,7 @@
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="@{viewModel.fetchInProgress || viewModel.searchInProgress ? View.VISIBLE : View.GONE}"
app:indicatorColor="?attr/color_main1_500"
app:indicatorColor="@{viewModel.mainColor}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -203,7 +205,7 @@
android:src="@drawable/user_plus"
android:contentDescription="@string/content_description_contact_create"
app:tint="?attr/color_on_main"
app:backgroundTint="?attr/color_main1_500"
app:backgroundTint="@{viewModel.mainColor}"
app:shapeAppearanceOverlay="@style/rounded"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_nav_bar" />

View file

@ -39,7 +39,7 @@
android:contentDescription="@string/app_name"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:tint="?attr/color_main1_500" />
app:tint="@{viewModel.mainColor}" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/section_header_style"

View file

@ -34,7 +34,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_main1_500">
android:background="@{viewModel.mainColor}">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
@ -127,7 +127,7 @@
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="@{viewModel.fetchInProgress ? View.VISIBLE : View.GONE}"
app:indicatorColor="?attr/color_main1_500"
app:indicatorColor="@{viewModel.mainColor}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -151,7 +151,7 @@
android:src="@drawable/phone_plus"
android:contentDescription="@string/content_description_call_start"
app:tint="?attr/color_on_main"
app:backgroundTint="?attr/color_main1_500"
app:backgroundTint="@{viewModel.mainColor}"
app:shapeAppearanceOverlay="@style/rounded"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_nav_bar" />

View file

@ -25,7 +25,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/top_bar_height"
android:background="?attr/color_main1_500">
android:background="@{viewModel.mainColor}">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"

View file

@ -31,7 +31,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_main1_500">
android:background="@{viewModel.mainColor}">
<include
android:id="@+id/top_bar"
@ -70,7 +70,7 @@
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="@{viewModel.fetchInProgress ? View.VISIBLE : View.GONE}"
app:indicatorColor="?attr/color_main1_500"
app:indicatorColor="@{viewModel.mainColor}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -94,7 +94,7 @@
android:src="@drawable/video_conference_plus"
android:contentDescription="@string/content_description_schedule_meeting"
app:tint="?attr/color_on_main"
app:backgroundTint="?attr/color_main1_500"
app:backgroundTint="@{viewModel.mainColor}"
app:shapeAppearanceOverlay="@style/rounded"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_nav_bar" />

View file

@ -22,12 +22,6 @@
android:visibility="@{viewModel.showThemeSelector ? View.VISIBLE : View.GONE}"
app:constraint_referenced_ids="theme_spinner, theme_spinner_caret, theme_title" />
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="@{viewModel.showColorSelector ? View.VISIBLE : View.GONE}"
app:constraint_referenced_ids="color_spinner, color_spinner_caret, color_title" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/settings_title_style"
android:id="@+id/auto_show_dialpad_title"
@ -103,52 +97,6 @@
app:layout_constraintBottom_toBottomOf="@id/theme_spinner"
app:layout_constraintEnd_toEndOf="@id/theme_spinner"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/settings_title_padding_style"
android:id="@+id/color_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="10dp"
android:text="@string/settings_user_interface_color_title"
android:maxLines="2"
android:ellipsize="end"
android:labelFor="@id/color_spinner"
app:layout_constraintTop_toBottomOf="@id/theme_spinner"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.appcompat.widget.AppCompatSpinner
style="@style/material_switch_style"
android:id="@+id/color_spinner"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginEnd="10dp"
android:background="@drawable/edit_text_background"
android:paddingStart="@dimen/spinner_start_padding"
android:paddingEnd="@dimen/spinner_end_padding"
android:overlapAnchor="false"
android:spinnerMode="dropdown"
android:popupBackground="@drawable/shape_squircle_white_background"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintWidth_max="@dimen/text_input_max_width"
app:layout_constraintTop_toBottomOf="@id/color_title"
app:layout_constraintStart_toStartOf="@id/color_title"
app:layout_constraintEnd_toEndOf="@id/color_title" />
<ImageView
android:id="@+id/color_spinner_caret"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spinner_caret_end_margin"
android:src="@drawable/caret_down"
android:contentDescription="@string/content_description_spinner_caret"
app:tint="?attr/color_main2_600"
app:layout_constraintTop_toTopOf="@id/color_spinner"
app:layout_constraintBottom_toBottomOf="@id/color_spinner"
app:layout_constraintEnd_toEndOf="@id/color_spinner"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View file

@ -819,15 +819,6 @@
<string name="menu_export_selected_item">Télécharger</string>
<string name="menu_share_selected_item">Partager</string>
<!-- Colors -->
<string name="orange">Orange</string>
<string name="yellow">Jaune</string>
<string name="green">Vert</string>
<string name="blue">Bleu</string>
<string name="red">Rouge</string>
<string name="pink">Rose</string>
<string name="purple">Violet</string>
<!-- Misc -->
<string name="list_filter_no_result_found">Aucun résultat…</string>
<string name="multiple_participants_selection_placeholder">Les participants selectionnés apparaîtront ici</string>

View file

@ -82,58 +82,4 @@
<item name="color_bottom_sheet_handle">@color/gray_main2_400</item>
<item name="color_bottom_sheet_background">@color/background_color_alt_dark_mode</item>
</style>
<style name="Theme.LinphoneYellow" parent="Theme.Linphone">
<item name="color_main1_100">@color/yellow_main_100</item>
<item name="color_main1_100_alpha_50">@color/yellow_main_100_alpha_50</item>
<item name="color_main1_300">@color/yellow_main_300</item>
<item name="color_main1_500">@color/yellow_main_500</item>
<item name="color_main1_700">@color/yellow_main_700</item>
<item name="color_chat_bubble_outgoing">@color/gray_main2_700</item>
</style>
<style name="Theme.LinphoneGreen" parent="Theme.Linphone">
<item name="color_main1_100">@color/green_main_100</item>
<item name="color_main1_100_alpha_50">@color/green_main_100_alpha_50</item>
<item name="color_main1_300">@color/green_main_300</item>
<item name="color_main1_500">@color/green_main_500</item>
<item name="color_main1_700">@color/green_main_700</item>
<item name="color_chat_bubble_outgoing">@color/gray_main2_700</item>
</style>
<style name="Theme.LinphoneBlue" parent="Theme.Linphone">
<item name="color_main1_100">@color/blue_main_100</item>
<item name="color_main1_100_alpha_50">@color/blue_main_100_alpha_50</item>
<item name="color_main1_300">@color/blue_main_300</item>
<item name="color_main1_500">@color/blue_main_500</item>
<item name="color_main1_700">@color/blue_main_700</item>
<item name="color_chat_bubble_outgoing">@color/gray_main2_700</item>
</style>
<style name="Theme.LinphoneRed" parent="Theme.Linphone">
<item name="color_main1_100">@color/red_main_100</item>
<item name="color_main1_100_alpha_50">@color/red_main_100_alpha_50</item>
<item name="color_main1_300">@color/red_main_300</item>
<item name="color_main1_500">@color/red_main_500</item>
<item name="color_main1_700">@color/red_main_700</item>
<item name="color_chat_bubble_outgoing">@color/gray_main2_700</item>
</style>
<style name="Theme.LinphonePink" parent="Theme.Linphone">
<item name="color_main1_100">@color/pink_main_100</item>
<item name="color_main1_100_alpha_50">@color/pink_main_100_alpha_50</item>
<item name="color_main1_300">@color/pink_main_300</item>
<item name="color_main1_500">@color/pink_main_500</item>
<item name="color_main1_700">@color/pink_main_700</item>
<item name="color_chat_bubble_outgoing">@color/gray_main2_700</item>
</style>
<style name="Theme.LinphonePurple" parent="Theme.Linphone">
<item name="color_main1_100">@color/purple_main_100</item>
<item name="color_main1_100_alpha_50">@color/purple_main_100_alpha_50</item>
<item name="color_main1_300">@color/purple_main_300</item>
<item name="color_main1_500">@color/purple_main_500</item>
<item name="color_main1_700">@color/purple_main_700</item>
<item name="color_chat_bubble_outgoing">@color/gray_main2_700</item>
</style>
</resources>

View file

@ -58,40 +58,4 @@
<color name="orange_warning_600_night">#E1C133</color>
<color name="gradient_progress">#80FFFFFF</color>
<color name="yellow_main_100">#FFF5D6</color>
<color name="yellow_main_100_alpha_50">#80FFF5D6</color>
<color name="yellow_main_300">#FFE799</color>
<color name="yellow_main_500">#F5BC00</color>
<color name="yellow_main_700">#A37D00</color>
<color name="green_main_100">#DCF9E7</color>
<color name="green_main_100_alpha_50">#80DCF9E7</color>
<color name="green_main_300">#A8F0C2</color>
<color name="green_main_500">#25D366</color>
<color name="green_main_700">#1C9C4B</color>
<color name="blue_main_100">#D6F4FF</color>
<color name="blue_main_100_alpha_50">#80D6F4FF</color>
<color name="blue_main_300">#99E4FF</color>
<color name="blue_main_500">#00aff0</color>
<color name="blue_main_700">#0078A3</color>
<color name="red_main_100">#FBE1DA</color>
<color name="red_main_100_alpha_50">#80FBE1DA</color>
<color name="red_main_300">#F5B53A</color>
<color name="red_main_500">#E14318</color>
<color name="red_main_700">#A63211</color>
<color name="pink_main_100">#FFD6F1</color>
<color name="pink_main_100_alpha_50">#80FFD6F1</color>
<color name="pink_main_300">#FF99DD</color>
<color name="pink_main_500">#FF00A9</color>
<color name="pink_main_700">#B8007A</color>
<color name="purple_main_100">#FFD6FF</color>
<color name="purple_main_100_alpha_50">#80FFD6FF</color>
<color name="purple_main_300">#FF99FF</color>
<color name="purple_main_500">#800080</color>
<color name="purple_main_700">#520052</color>
</resources>

View file

@ -862,15 +862,6 @@
<string name="menu_export_selected_item">Download</string>
<string name="menu_share_selected_item">Share</string>
<!-- Colors -->
<string name="orange">Orange</string>
<string name="yellow">Yellow</string>
<string name="green">Green</string>
<string name="blue">Blue</string>
<string name="red">Red</string>
<string name="pink">Pink</string>
<string name="purple">Purple</string>
<!-- Misc -->
<string name="list_filter_no_result_found">No result found…</string>
<string name="multiple_participants_selection_placeholder">Selected participants will appear here</string>

View file

@ -84,89 +84,11 @@
<item name="color_bottom_sheet_background">@color/gray_100</item>
</style>
<style name="Theme.LinphoneYellow" parent="Theme.Linphone">
<item name="color_main1_100">@color/yellow_main_100</item>
<item name="color_main1_100_alpha_50">@color/yellow_main_100_alpha_50</item>
<item name="color_main1_300">@color/yellow_main_300</item>
<item name="color_main1_500">@color/yellow_main_500</item>
<item name="color_main1_700">@color/yellow_main_700</item>
<item name="color_chat_bubble_outgoing">@color/yellow_main_100</item>
</style>
<style name="Theme.LinphoneGreen" parent="Theme.Linphone">
<item name="color_main1_100">@color/green_main_100</item>
<item name="color_main1_100_alpha_50">@color/green_main_100_alpha_50</item>
<item name="color_main1_300">@color/green_main_300</item>
<item name="color_main1_500">@color/green_main_500</item>
<item name="color_main1_700">@color/green_main_700</item>
<item name="color_chat_bubble_outgoing">@color/green_main_100</item>
</style>
<style name="Theme.LinphoneBlue" parent="Theme.Linphone">
<item name="color_main1_100">@color/blue_main_100</item>
<item name="color_main1_100_alpha_50">@color/blue_main_100_alpha_50</item>
<item name="color_main1_300">@color/blue_main_300</item>
<item name="color_main1_500">@color/blue_main_500</item>
<item name="color_main1_700">@color/blue_main_700</item>
<item name="color_chat_bubble_outgoing">@color/blue_main_100</item>
</style>
<style name="Theme.LinphoneRed" parent="Theme.Linphone">
<item name="color_main1_100">@color/red_main_100</item>
<item name="color_main1_100_alpha_50">@color/red_main_100_alpha_50</item>
<item name="color_main1_300">@color/red_main_300</item>
<item name="color_main1_500">@color/red_main_500</item>
<item name="color_main1_700">@color/red_main_700</item>
<item name="color_chat_bubble_outgoing">@color/red_main_100</item>
</style>
<style name="Theme.LinphonePink" parent="Theme.Linphone">
<item name="color_main1_100">@color/pink_main_100</item>
<item name="color_main1_100_alpha_50">@color/pink_main_100_alpha_50</item>
<item name="color_main1_300">@color/pink_main_300</item>
<item name="color_main1_500">@color/pink_main_500</item>
<item name="color_main1_700">@color/pink_main_700</item>
<item name="color_chat_bubble_outgoing">@color/pink_main_100</item>
</style>
<style name="Theme.LinphonePurple" parent="Theme.Linphone">
<item name="color_main1_100">@color/purple_main_100</item>
<item name="color_main1_100_alpha_50">@color/purple_main_100_alpha_50</item>
<item name="color_main1_300">@color/purple_main_300</item>
<item name="color_main1_500">@color/purple_main_500</item>
<item name="color_main1_700">@color/purple_main_700</item>
<item name="color_chat_bubble_outgoing">@color/purple_main_100</item>
</style>
<!-- In-call application theme. -->
<style name="Theme.LinphoneInCall" parent="Theme.Linphone">
<item name="android:windowBackground">@color/gray_600</item>
</style>
<style name="Theme.LinphoneInCallYellow" parent="Theme.LinphoneYellow">
<item name="android:windowBackground">@color/gray_600</item>
</style>
<style name="Theme.LinphoneInCallGreen" parent="Theme.LinphoneGreen">
<item name="android:windowBackground">@color/gray_600</item>
</style>
<style name="Theme.LinphoneInCallBlue" parent="Theme.LinphoneBlue">
<item name="android:windowBackground">@color/gray_600</item>
</style>
<style name="Theme.LinphoneInCallRed" parent="Theme.LinphoneRed">
<item name="android:windowBackground">@color/gray_600</item>
</style>
<style name="Theme.LinphoneInCallPink" parent="Theme.LinphonePink">
<item name="android:windowBackground">@color/gray_600</item>
</style>
<style name="Theme.LinphoneInCallPurple" parent="Theme.LinphonePurple">
<item name="android:windowBackground">@color/gray_600</item>
</style>
<style name="Theme.LinphoneDialog" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:statusBarColor">@color/gray_600</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>