diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/BackupAlertBottomSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/BackupAlertBottomSheet.kt index 725d497a366..88f96ccefa7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/BackupAlertBottomSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/BackupAlertBottomSheet.kt @@ -44,6 +44,7 @@ import kotlinx.parcelize.Parcelize import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.SignalPreview import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.billing.launchManageBackupsSubscription @@ -159,7 +160,7 @@ private fun BackupAlertSheetContent( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier .fillMaxWidth() - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) ) { BottomSheets.Handle() diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/CreateBackupBottomSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/CreateBackupBottomSheet.kt index ffebd3920d6..5ec22a04e4c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/CreateBackupBottomSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/CreateBackupBottomSheet.kt @@ -28,6 +28,7 @@ import androidx.fragment.app.setFragmentResult import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.SignalPreview import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.compose.ComposeBottomSheetDialogFragment @@ -84,7 +85,7 @@ private fun CreateBackupBottomSheetContent( Column( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.fillMaxWidth() - .padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) .padding(bottom = 24.dp) ) { BottomSheets.Handle() diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusBanner.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusBanner.kt index d955da0ef84..4b6a2909529 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusBanner.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusBanner.kt @@ -230,7 +230,7 @@ sealed interface BackupStatusData { override val title: String @Composable - get() = stringResource(R.string.default_error_msg) + get() = stringResource(androidx.biometric.R.string.default_error_msg) override val iconColors: BackupsIconColors = BackupsIconColors.Warning } diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusRow.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusRow.kt index 31a51a5aea3..b7a02e11807 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusRow.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/status/BackupStatusRow.kt @@ -32,6 +32,7 @@ import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Rows import org.signal.core.ui.SignalPreview import org.signal.core.util.ByteSize @@ -51,7 +52,7 @@ fun BackupStatusRow( if (backupStatusData !is BackupStatusData.CouldNotCompleteBackup) { Row( verticalAlignment = Alignment.CenterVertically, - modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) { LinearProgressIndicator( color = progressColor(backupStatusData), @@ -74,7 +75,7 @@ fun BackupStatusRow( is BackupStatusData.RestoringMedia -> { Text( text = getRestoringMediaString(backupStatusData), - modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) } @@ -85,7 +86,7 @@ fun BackupStatusRow( backupStatusData.requiredSpace, "%d".format((backupStatusData.progress * 100).roundToInt()) ), - modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) Rows.TextRow( @@ -114,7 +115,7 @@ fun BackupStatusRow( append(stringResource(R.string.BackupStatusRow__your_last_backup)) }, inlineContent = inlineContentMap, - modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsEducationScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsEducationScreen.kt index 1842f52e85d..9689357d069 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsEducationScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsEducationScreen.kt @@ -30,6 +30,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Scaffolds import org.thoughtcrime.securesms.R @@ -52,7 +53,7 @@ fun MessageBackupsEducationScreen( modifier = Modifier .fillMaxSize() .padding(it) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) ) { LazyColumn( horizontalAlignment = Alignment.CenterHorizontally, diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyEducationScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyEducationScreen.kt index 580c90ef8e4..7fce3fbd93e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyEducationScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyEducationScreen.kt @@ -24,6 +24,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Scaffolds import org.signal.core.ui.SignalPreview import org.thoughtcrime.securesms.R @@ -44,7 +45,7 @@ fun MessageBackupsKeyEducationScreen( Column( modifier = Modifier .padding(it) - .padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) .fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally ) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyRecordScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyRecordScreen.kt index 73e2101f9e7..cf86434bc33 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyRecordScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsKeyRecordScreen.kt @@ -45,6 +45,7 @@ import kotlinx.coroutines.launch import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Scaffolds import org.signal.core.ui.SignalPreview import org.signal.core.ui.theme.SignalTheme @@ -78,7 +79,7 @@ fun MessageBackupsKeyRecordScreen( Column( modifier = Modifier .padding(paddingValues) - .padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) .fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally ) { @@ -193,7 +194,7 @@ private fun BottomSheetContent( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier .fillMaxWidth() - .padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) { BottomSheets.Handle() Text( diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsTypeSelectionScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsTypeSelectionScreen.kt index d12d628858a..7b989c6a723 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsTypeSelectionScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/v2/ui/subscription/MessageBackupsTypeSelectionScreen.kt @@ -46,6 +46,7 @@ import kotlinx.collections.immutable.persistentListOf import org.signal.core.ui.Buttons import org.signal.core.ui.Dialogs import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Scaffolds import org.signal.core.ui.SignalPreview import org.signal.core.ui.theme.SignalTheme @@ -83,7 +84,7 @@ fun MessageBackupsTypeSelectionScreen( Column( modifier = Modifier .padding(paddingValues) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .fillMaxSize() ) { LazyColumn( diff --git a/app/src/main/java/org/thoughtcrime/securesms/badges/gifts/flow/GooglePayButton.kt b/app/src/main/java/org/thoughtcrime/securesms/badges/gifts/flow/GooglePayButton.kt index f796a252a7c..6629aaa7d48 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/badges/gifts/flow/GooglePayButton.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/badges/gifts/flow/GooglePayButton.kt @@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.badges.gifts.flow import android.content.Context import android.util.AttributeSet import android.widget.FrameLayout -import org.thoughtcrime.securesms.R /** * Wraps the google pay button in a convenient frame layout. @@ -13,7 +12,7 @@ class GooglePayButton @JvmOverloads constructor( attrs: AttributeSet? = null ) : FrameLayout(context, attrs) { init { - inflate(context, R.layout.donate_with_googlepay_button, this) + inflate(context, org.signal.donations.R.layout.donate_with_googlepay_button, this) } fun setOnGooglePayClickListener(action: () -> Unit) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToEnableOptimizedStorageSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToEnableOptimizedStorageSheet.kt index fac18f7a4cc..6416a400103 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToEnableOptimizedStorageSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToEnableOptimizedStorageSheet.kt @@ -27,6 +27,7 @@ import androidx.compose.ui.unit.dp import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.SignalPreview import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.backup.v2.ui.subscription.MessageBackupsType @@ -84,7 +85,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent( style = MaterialTheme.typography.titleLarge, textAlign = TextAlign.Center, modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) ) Text( @@ -94,7 +95,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent( textAlign = TextAlign.Center, modifier = Modifier .padding(top = 10.dp, bottom = 28.dp) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) ) MessageBackupsTypeBlock( @@ -107,7 +108,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent( it.copy(iconColorNormal = it.iconColorSelected) }, modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(bottom = 50.dp) ) @@ -116,7 +117,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent( onClick = onSubscribeClick, modifier = Modifier .defaultMinSize(minWidth = 256.dp) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(bottom = 8.dp) ) { val resources = LocalContext.current.resources @@ -134,7 +135,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent( onClick = onCancelClick, modifier = Modifier .defaultMinSize(minWidth = 256.dp) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(bottom = 16.dp) ) { Text( diff --git a/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToStartMediaBackupSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToStartMediaBackupSheet.kt index 77bc51ad6ac..8d3eb8859ae 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToStartMediaBackupSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/billing/upgrade/UpgradeToStartMediaBackupSheet.kt @@ -28,6 +28,7 @@ import androidx.compose.ui.unit.dp import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.SignalPreview import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.backup.v2.ui.subscription.MessageBackupsType @@ -73,7 +74,7 @@ private fun UpgradeToStartMediaBackupSheetContent( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier .fillMaxWidth() - .padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) { BottomSheets.Handle() @@ -114,7 +115,7 @@ private fun UpgradeToStartMediaBackupSheetContent( onClick = onSubscribeClick, modifier = Modifier .defaultMinSize(minWidth = 256.dp) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(bottom = 8.dp) ) { val resources = LocalContext.current.resources @@ -132,7 +133,7 @@ private fun UpgradeToStartMediaBackupSheetContent( onClick = onCancelClick, modifier = Modifier .defaultMinSize(minWidth = 256.dp) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(bottom = 16.dp) ) { Text( diff --git a/app/src/main/java/org/thoughtcrime/securesms/calls/links/EditCallLinkNameDialogFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/calls/links/EditCallLinkNameDialogFragment.kt index 8ce72c32266..b36300eec45 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/calls/links/EditCallLinkNameDialogFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/calls/links/EditCallLinkNameDialogFragment.kt @@ -84,7 +84,7 @@ class EditCallLinkNameDialogFragment : ComposeDialogFragment() { Column( modifier = Modifier .padding( - horizontal = dimensionResource(id = org.signal.core.ui.R.dimen.core_ui__gutter) + horizontal = dimensionResource(id = org.signal.core.ui.R.dimen.gutter) ) .padding(top = 20.dp, bottom = 16.dp) ) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/calls/links/SignalCallRow.kt b/app/src/main/java/org/thoughtcrime/securesms/calls/links/SignalCallRow.kt index 80c800b44b7..d2ecdf8b878 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/calls/links/SignalCallRow.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/calls/links/SignalCallRow.kt @@ -37,6 +37,7 @@ import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.SignalPreview import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.conversation.colors.AvatarColorPair @@ -103,7 +104,7 @@ fun SignalCallRow( Row( modifier = modifier .fillMaxWidth() - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .border( width = 1.25.dp, color = MaterialTheme.colorScheme.outline, diff --git a/app/src/main/java/org/thoughtcrime/securesms/calls/links/create/CreateCallLinkBottomSheetDialogFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/calls/links/create/CreateCallLinkBottomSheetDialogFragment.kt index dad88db2574..d2c243f2581 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/calls/links/create/CreateCallLinkBottomSheetDialogFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/calls/links/create/CreateCallLinkBottomSheetDialogFragment.kt @@ -39,6 +39,7 @@ import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.Dividers import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Rows import org.signal.core.ui.SignalPreview import org.signal.core.util.concurrent.LifecycleDisposable @@ -313,7 +314,7 @@ private fun CreateCallLinkBottomSheetContent( Buttons.MediumTonal( onClick = onDoneClicked, modifier = Modifier - .padding(end = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(end = dimensionResource(id = CoreUiR.dimen.gutter)) .align(Alignment.End) ) { Text(text = stringResource(id = R.string.CreateCallLinkBottomSheetDialogFragment__done)) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/ContactFilterView.java b/app/src/main/java/org/thoughtcrime/securesms/components/ContactFilterView.java index d3266e0eed2..11fff39882a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/ContactFilterView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/ContactFilterView.java @@ -40,7 +40,7 @@ public ContactFilterView(Context context) { } public ContactFilterView(Context context, AttributeSet attrs) { - this(context, attrs, R.attr.toolbarStyle); + this(context, attrs, androidx.appcompat.R.attr.toolbarStyle); } public ContactFilterView(Context context, AttributeSet attrs, int defStyleAttr) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/FixedRoundedCornerBottomSheetDialogFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/components/FixedRoundedCornerBottomSheetDialogFragment.kt index cdf94596fa7..c537939819f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/FixedRoundedCornerBottomSheetDialogFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/FixedRoundedCornerBottomSheetDialogFragment.kt @@ -15,6 +15,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment import com.google.android.material.shape.CornerFamily import com.google.android.material.shape.MaterialShapeDrawable import com.google.android.material.shape.ShapeAppearanceModel +import com.google.android.material.R as MaterialR import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.util.ThemeUtil import org.thoughtcrime.securesms.util.ViewUtil @@ -59,8 +60,8 @@ abstract class FixedRoundedCornerBottomSheetDialogFragment : BottomSheetDialogFr dialogBackground = MaterialShapeDrawable(shapeAppearanceModel) - val bottomSheetStyle = ThemeUtil.getThemedResourceId(ContextThemeWrapper(requireContext(), themeResId), R.attr.bottomSheetStyle) - backgroundColor = ThemeUtil.getThemedColor(ContextThemeWrapper(requireContext(), bottomSheetStyle), R.attr.backgroundTint) + val bottomSheetStyle = ThemeUtil.getThemedResourceId(ContextThemeWrapper(requireContext(), themeResId), MaterialR.attr.bottomSheetStyle) + backgroundColor = ThemeUtil.getThemedColor(ContextThemeWrapper(requireContext(), bottomSheetStyle), MaterialR.attr.backgroundTint) dialogBackground.fillColor = ColorStateList.valueOf(backgroundColor) dialog.behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() { diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/SearchToolbar.java b/app/src/main/java/org/thoughtcrime/securesms/components/SearchToolbar.java index 950edd5af4f..9a90489b87f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/SearchToolbar.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/SearchToolbar.java @@ -57,7 +57,7 @@ private void initialize() { this.searchItem = toolbar.getMenu().findItem(R.id.action_filter_search); SearchView searchView = (SearchView) searchItem.getActionView(); - EditText searchText = searchView.findViewById(R.id.search_src_text); + EditText searchText = searchView.findViewById(androidx.appcompat.R.id.search_src_text); EditTextExtensionsKt.setIncognitoKeyboardEnabled(searchText, TextSecurePreferences.isIncognitoKeyboardEnabled(getContext())); diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiEditText.java b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiEditText.java index b77a98f5fa8..f65fc49969b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiEditText.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiEditText.java @@ -35,7 +35,7 @@ public EmojiEditText(Context context) { } public EmojiEditText(Context context, AttributeSet attrs) { - this(context, attrs, R.attr.editTextStyle); + this(context, attrs, androidx.appcompat.R.attr.editTextStyle); } public EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/segmentedprogressbar/SegmentedProgressBar.kt b/app/src/main/java/org/thoughtcrime/securesms/components/segmentedprogressbar/SegmentedProgressBar.kt index 3cf80a67198..0ad979ed7ed 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/segmentedprogressbar/SegmentedProgressBar.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/segmentedprogressbar/SegmentedProgressBar.kt @@ -85,7 +85,7 @@ class SegmentedProgressBar : View, ViewPager.OnPageChangeListener, View.OnTouchL var segmentBackgroundColor: Int = Color.WHITE private set var segmentSelectedBackgroundColor: Int = - context.getThemeColor(R.attr.colorAccent) + context.getThemeColor(androidx.appcompat.R.attr.colorAccent) private set var segmentStrokeColor: Int = Color.BLACK private set diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/BackupsSettingsFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/BackupsSettingsFragment.kt index cd7e4a75dff..b2b348aa33f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/BackupsSettingsFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/BackupsSettingsFragment.kt @@ -35,6 +35,7 @@ import androidx.navigation.fragment.findNavController import org.signal.core.ui.Buttons import org.signal.core.ui.Dividers import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Rows import org.signal.core.ui.Scaffolds import org.signal.core.ui.SignalPreview @@ -118,7 +119,7 @@ private fun BackupsSettingsContent( text = stringResource(R.string.RemoteBackupsSettingsFragment__back_up_your_message_history), color = MaterialTheme.colorScheme.onSurfaceVariant, style = MaterialTheme.typography.bodyMedium, - modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter), vertical = 16.dp) + modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter), vertical = 16.dp) ) } @@ -302,7 +303,7 @@ private fun LoadingBackupsRow() { modifier = Modifier .fillMaxWidth() .height(56.dp) - .padding(horizontal = dimensionResource(R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) { CircularProgressIndicator() } diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsFragment.kt index e9a9085c8a3..53010f93918 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsFragment.kt @@ -62,6 +62,7 @@ import org.signal.core.ui.Buttons import org.signal.core.ui.Dialogs import org.signal.core.ui.Dividers import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Rows import org.signal.core.ui.Scaffolds import org.signal.core.ui.SignalPreview @@ -242,7 +243,7 @@ class RemoteBackupsSettingsFragment : ComposeFragment() { private inner class AuthListener : BiometricPrompt.AuthenticationCallback() { override fun onAuthenticationFailed() { Log.w(TAG, "onAuthenticationFailed") - Toast.makeText(requireContext(), R.string.authentication_required, Toast.LENGTH_SHORT).show() + Toast.makeText(requireContext(), androidx.media3.session.R.string.authentication_required, Toast.LENGTH_SHORT).show() } override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { @@ -734,7 +735,7 @@ private fun InProgressBackupRow( ) { Row( modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(top = 16.dp, bottom = 14.dp) ) { Column( @@ -765,7 +766,7 @@ private fun LastBackupRow( ) { Row( modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(top = 16.dp, bottom = 14.dp) ) { Column( diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/privacy/pnp/PhoneNumberPrivacySettingsFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/privacy/pnp/PhoneNumberPrivacySettingsFragment.kt index 2b8524bfa1d..bee311a02b4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/privacy/pnp/PhoneNumberPrivacySettingsFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/privacy/pnp/PhoneNumberPrivacySettingsFragment.kt @@ -27,6 +27,7 @@ import androidx.navigation.fragment.findNavController import com.google.android.material.dialog.MaterialAlertDialogBuilder import kotlinx.coroutines.launch import org.signal.core.ui.Dividers +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Rows import org.signal.core.ui.Scaffolds import org.signal.core.ui.Texts @@ -149,7 +150,7 @@ private fun Screen( ), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, - modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter), vertical = 16.dp) + modifier = Modifier.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter), vertical = 16.dp) ) } @@ -189,7 +190,7 @@ private fun Screen( ), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, - modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter), vertical = 16.dp) + modifier = Modifier.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter), vertical = 16.dp) ) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/transfer/ideal/IdealTransferDetailsBankSelectionDialogFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/transfer/ideal/IdealTransferDetailsBankSelectionDialogFragment.kt index e17cea02ed2..e79b3ddab59 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/transfer/ideal/IdealTransferDetailsBankSelectionDialogFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/transfer/ideal/IdealTransferDetailsBankSelectionDialogFragment.kt @@ -27,6 +27,7 @@ import androidx.compose.ui.unit.dp import androidx.core.os.bundleOf import androidx.fragment.app.setFragmentResult import androidx.navigation.fragment.findNavController +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Scaffolds import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.compose.ComposeDialogFragment @@ -93,7 +94,7 @@ private fun BankSelectionContent( .clickable { onBankSelected(it) } .fillMaxWidth() .defaultMinSize(minHeight = 56.dp) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter), vertical = 8.dp) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter), vertical = 8.dp) ) { Image( painter = painterResource(id = uiValues.icon), diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/voice/VoiceNoteMediaNotificationProvider.kt b/app/src/main/java/org/thoughtcrime/securesms/components/voice/VoiceNoteMediaNotificationProvider.kt index ca1d8a3d6f0..b5510844495 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/voice/VoiceNoteMediaNotificationProvider.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/voice/VoiceNoteMediaNotificationProvider.kt @@ -22,7 +22,9 @@ import androidx.media3.session.CommandButton import androidx.media3.session.DefaultMediaNotificationProvider import androidx.media3.session.MediaNotification import androidx.media3.session.MediaSession +import androidx.media3.session.R as Media3SessionR import androidx.media3.session.SessionCommand +import androidx.media3.ui.R as Media3UiR import com.google.common.collect.ImmutableList import org.signal.core.util.PendingIntentFlags.cancelCurrent import org.signal.core.util.concurrent.SignalExecutors @@ -192,9 +194,9 @@ class VoiceNoteMediaNotificationProvider(val context: Context) : MediaNotificati commandButtons.add( CommandButton.Builder() .setPlayerCommand(Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM) - .setIconResId(R.drawable.exo_icon_rewind) + .setIconResId(Media3UiR.drawable.exo_icon_rewind) .setDisplayName( - context.getString(R.string.media3_controls_seek_to_previous_description) + context.getString(Media3SessionR.string.media3_controls_seek_to_previous_description) ) .setExtras(commandButtonExtras) .build() @@ -207,11 +209,11 @@ class VoiceNoteMediaNotificationProvider(val context: Context) : MediaNotificati CommandButton.Builder() .setPlayerCommand(Player.COMMAND_PLAY_PAUSE) .setIconResId( - if (showPauseButton) R.drawable.exo_notification_pause else R.drawable.exo_notification_play + if (showPauseButton) Media3UiR.drawable.exo_notification_pause else Media3UiR.drawable.exo_notification_play ) .setExtras(commandButtonExtras) .setDisplayName( - if (showPauseButton) context.getString(R.string.media3_controls_pause_description) else context.getString(R.string.media3_controls_play_description) + if (showPauseButton) context.getString(Media3SessionR.string.media3_controls_pause_description) else context.getString(Media3SessionR.string.media3_controls_play_description) ) .build() ) @@ -221,9 +223,9 @@ class VoiceNoteMediaNotificationProvider(val context: Context) : MediaNotificati commandButtons.add( CommandButton.Builder() .setPlayerCommand(Player.COMMAND_STOP) - .setIconResId(R.drawable.exo_notification_stop) + .setIconResId(Media3UiR.drawable.exo_notification_stop) .setExtras(commandButtonExtras) - .setDisplayName(context.getString(R.string.media3_controls_seek_to_next_description)) + .setDisplayName(context.getString(Media3SessionR.string.media3_controls_seek_to_next_description)) .build() ) } diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcAudioPicker31.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcAudioPicker31.kt index 1e93f457f7f..e3b744ddd04 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcAudioPicker31.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcAudioPicker31.kt @@ -13,6 +13,7 @@ import androidx.compose.ui.res.dimensionResource import androidx.fragment.app.FragmentActivity import kotlinx.collections.immutable.toImmutableList import org.signal.core.util.logging.Log +import org.signal.core.ui.R as CoreUiR import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.dependencies.AppDependencies import org.thoughtcrime.securesms.webrtc.audio.AudioDeviceMapping @@ -81,7 +82,7 @@ class WebRtcAudioPicker31(private val audioOutputChangedListener: OnAudioOutputC initialDeviceId = currentDeviceId, onDeviceSelected = onAudioDeviceSelected, modifier = Modifier.padding( - horizontal = dimensionResource(id = R.dimen.core_ui__gutter) + horizontal = dimensionResource(id = CoreUiR.dimen.gutter) ) ) } diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/requests/CallLinkIncomingRequestSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/requests/CallLinkIncomingRequestSheet.kt index 062cfd1a47f..0150f0432c4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/requests/CallLinkIncomingRequestSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/requests/CallLinkIncomingRequestSheet.kt @@ -36,6 +36,7 @@ import org.signal.core.ui.BottomSheets import org.signal.core.ui.DarkPreview import org.signal.core.ui.Dividers import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Rows import org.signal.core.util.getParcelableCompat import org.thoughtcrime.securesms.R @@ -153,7 +154,7 @@ private fun CallLinkIncomingRequestSheetContent( text = state.groupsInCommon, textAlign = TextAlign.Center, style = MaterialTheme.typography.bodyMedium, - modifier = Modifier.padding(vertical = 6.dp, horizontal = dimensionResource(R.dimen.core_ui__gutter)) + modifier = Modifier.padding(vertical = 6.dp, horizontal = dimensionResource(CoreUiR.dimen.gutter)) ) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallAudioToggleButton.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallAudioToggleButton.kt index 74587631f5e..17bced63e0b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallAudioToggleButton.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/v2/CallAudioToggleButton.kt @@ -35,6 +35,7 @@ import androidx.compose.ui.unit.dp import org.signal.core.ui.DarkPreview import org.signal.core.ui.IconButtons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Rows import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.components.webrtc.AudioStateUpdater @@ -221,13 +222,13 @@ private fun LegacyAudioPickerContent( modifier = Modifier .padding(8.dp) .padding( - horizontal = dimensionResource(id = R.dimen.core_ui__gutter) + horizontal = dimensionResource(id = CoreUiR.dimen.gutter) ) ) LazyColumn( modifier = Modifier.padding( - horizontal = dimensionResource(id = R.dimen.core_ui__gutter) + horizontal = dimensionResource(id = CoreUiR.dimen.gutter) ) ) { items( diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationOptionsMenu.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationOptionsMenu.kt index fe54f843003..a0d3f7f2c1c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationOptionsMenu.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationOptionsMenu.kt @@ -215,7 +215,7 @@ internal object ConversationOptionsMenu { R.id.menu_conversation_settings -> callback.handleConversationSettings() R.id.menu_expiring_messages_off, R.id.menu_expiring_messages -> callback.handleSelectMessageExpiration() R.id.menu_create_bubble -> callback.handleCreateBubble() - R.id.home -> callback.handleGoHome() + androidx.appcompat.R.id.home -> callback.handleGoHome() R.id.menu_block -> callback.handleBlock() R.id.menu_unblock -> callback.handleUnblock() R.id.menu_report_spam -> callback.handleReportSpam() diff --git a/app/src/main/java/org/thoughtcrime/securesms/devicetransfer/moreoptions/MoreTransferOrRestoreOptionsSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/devicetransfer/moreoptions/MoreTransferOrRestoreOptionsSheet.kt index 57645eb3306..20e162623c9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/devicetransfer/moreoptions/MoreTransferOrRestoreOptionsSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/devicetransfer/moreoptions/MoreTransferOrRestoreOptionsSheet.kt @@ -39,6 +39,7 @@ import androidx.navigation.fragment.navArgs import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.compose.ComposeBottomSheetDialogFragment import org.thoughtcrime.securesms.devicetransfer.newdevice.BackupRestorationType @@ -112,7 +113,7 @@ private fun MoreOptionsSheetContent( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier .fillMaxWidth() - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) ) { BottomSheets.Handle() diff --git a/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivityToolbar.java b/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivityToolbar.java index 0aa4bf52161..8857a6cc3fa 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivityToolbar.java +++ b/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivityToolbar.java @@ -36,7 +36,7 @@ public GiphyActivityToolbar(Context context) { } public GiphyActivityToolbar(Context context, AttributeSet attrs) { - this(context, attrs, R.attr.toolbarStyle); + this(context, attrs, androidx.appcompat.R.attr.toolbarStyle); } public GiphyActivityToolbar(Context context, AttributeSet attrs, int defStyleAttr) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitDebugLogActivity.java b/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitDebugLogActivity.java index 6cad3249690..f41aa1c6f6f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitDebugLogActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitDebugLogActivity.java @@ -303,7 +303,7 @@ private void presentResultDialog(@NonNull String url) { dialogView.setText(spannableDialogText); dialogView.setMovementMethod(LongClickMovementMethod.getInstance(this)); - ViewUtil.setPadding(dialogView, (int) ThemeUtil.getThemedDimen(this, R.attr.dialogPreferredPadding)); + ViewUtil.setPadding(dialogView, (int) ThemeUtil.getThemedDimen(this, androidx.appcompat.R.attr.dialogPreferredPadding)); builder.setView(dialogView); builder.show(); diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/AvatarSelectionActivity.java b/app/src/main/java/org/thoughtcrime/securesms/mediasend/AvatarSelectionActivity.java index a1b5f2b5acb..4cd95d8d8fe 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/AvatarSelectionActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/AvatarSelectionActivity.java @@ -79,7 +79,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { @Override public void onCameraError() { - Toast.makeText(this, R.string.default_error_msg, Toast.LENGTH_SHORT).show(); + Toast.makeText(this, androidx.biometric.R.string.default_error_msg, Toast.LENGTH_SHORT).show(); finish(); } diff --git a/app/src/main/java/org/thoughtcrime/securesms/nicknames/NicknameActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/nicknames/NicknameActivity.kt index 31f541c1ecf..58e5eb3f582 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/nicknames/NicknameActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/nicknames/NicknameActivity.kt @@ -12,7 +12,6 @@ import android.os.Bundle import androidx.activity.compose.setContent import androidx.activity.result.contract.ActivityResultContract import androidx.compose.animation.AnimatedVisibility -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer @@ -60,6 +59,7 @@ import org.thoughtcrime.securesms.avatar.AvatarImage import org.thoughtcrime.securesms.recipients.RecipientId import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme import org.thoughtcrime.securesms.util.viewModel +import org.signal.core.ui.R as CoreUiR /** * Fragment allowing a user to set a custom nickname for the given recipient. @@ -226,7 +226,7 @@ private fun NicknameContent( Column( modifier = Modifier .padding(paddingValues) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) ) { LazyColumn(modifier = Modifier.weight(1f)) { item { @@ -407,7 +407,6 @@ private fun ClearableTextFieldPreview() { } } -@OptIn(ExperimentalFoundationApi::class) @Composable private fun ClearableTextField( value: String, diff --git a/app/src/main/java/org/thoughtcrime/securesms/nicknames/ViewNoteSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/nicknames/ViewNoteSheet.kt index 11ddfbff7a6..c910061a655 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/nicknames/ViewNoteSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/nicknames/ViewNoteSheet.kt @@ -35,6 +35,7 @@ import androidx.core.text.method.LinkMovementMethodCompat import androidx.core.text.util.LinkifyCompat import org.signal.core.ui.BottomSheets import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.util.getParcelableCompat import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.components.emoji.EmojiTextView @@ -117,7 +118,7 @@ private fun ViewNoteBottomSheetContent( ) { Column( horizontalAlignment = Alignment.CenterHorizontally, - modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + modifier = Modifier.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) ) { BottomSheets.Handle() @@ -151,7 +152,6 @@ private fun ViewNoteBottomSheetContent( factory = { context -> val view = EmojiTextView(context) - @Suppress("DEPRECATION") view.setTextAppearance(context, R.style.Signal_Text_BodyLarge) view.movementMethod = LinkMovementMethodCompat.getInstance() diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/TurnOnNotificationsBottomSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/notifications/TurnOnNotificationsBottomSheet.kt index efc65452c78..35bd4bed00f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/TurnOnNotificationsBottomSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/TurnOnNotificationsBottomSheet.kt @@ -40,6 +40,7 @@ import androidx.core.os.bundleOf import org.signal.core.ui.BottomSheets import org.signal.core.ui.Buttons import org.signal.core.ui.theme.SignalTheme +import org.signal.core.ui.R as CoreUiR import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.components.settings.app.AppSettingsActivity import org.thoughtcrime.securesms.compose.ComposeBottomSheetDialogFragment @@ -137,7 +138,7 @@ private fun TurnOnNotificationsSheetContent( ) { Column( modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(bottom = 32.dp) ) { BottomSheets.Handle( diff --git a/app/src/main/java/org/thoughtcrime/securesms/payments/backup/entry/PaymentsRecoveryEntryFragment.java b/app/src/main/java/org/thoughtcrime/securesms/payments/backup/entry/PaymentsRecoveryEntryFragment.java index 46a864123a1..77e931d94fd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/payments/backup/entry/PaymentsRecoveryEntryFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/payments/backup/entry/PaymentsRecoveryEntryFragment.java @@ -60,7 +60,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat } }); - ArrayAdapter wordAdapter = new ArrayAdapter<>(requireContext(), R.layout.support_simple_spinner_dropdown_item, Mnemonic.BIP39_WORDS_ENGLISH); + ArrayAdapter wordAdapter = new ArrayAdapter<>(requireContext(), com.google.android.material.R.layout.support_simple_spinner_dropdown_item, Mnemonic.BIP39_WORDS_ENGLISH); word.setAdapter(wordAdapter); word.addTextChangedListener(new AfterTextChanged(e -> viewModel.onWordChanged(e.toString()))); diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/CorrectedPreferenceFragment.java b/app/src/main/java/org/thoughtcrime/securesms/preferences/CorrectedPreferenceFragment.java index 4f74616d275..1afe896023f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/CorrectedPreferenceFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/CorrectedPreferenceFragment.java @@ -61,7 +61,7 @@ public void onBindViewHolder(PreferenceViewHolder holder, int position) { if (preference instanceof PreferenceCategory) { setZeroPaddingToLayoutChildren(holder.itemView); } else { - View iconFrame = holder.itemView.findViewById(R.id.icon_frame); + View iconFrame = holder.itemView.findViewById(androidx.preference.R.id.icon_frame); if (iconFrame != null) { iconFrame.setVisibility(preference.getIcon() == null ? View.GONE : View.VISIBLE); } diff --git a/app/src/main/java/org/thoughtcrime/securesms/profiles/username/NewWaysToConnectDialogFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/profiles/username/NewWaysToConnectDialogFragment.kt index 857402ee908..732a5d666e6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/profiles/username/NewWaysToConnectDialogFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/profiles/username/NewWaysToConnectDialogFragment.kt @@ -29,6 +29,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Scaffolds import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.compose.ComposeDialogFragment @@ -88,7 +89,7 @@ private fun NewWaysToConnectDialogContent( textAlign = TextAlign.Center, modifier = Modifier .fillMaxWidth() - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(top = 4.dp, bottom = 36.dp) ) } @@ -121,7 +122,7 @@ private fun NewWaysToConnectDialogContent( Buttons.LargeTonal( onClick = onSetUpUsernameClick, modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(top = 16.dp) .defaultMinSize(minWidth = 221.dp) .align(alignment = Alignment.CenterHorizontally) @@ -135,8 +136,8 @@ private fun NewWaysToConnectDialogContent( onClick = onNotNowClick, modifier = Modifier .padding( - start = dimensionResource(id = R.dimen.core_ui__gutter), - end = dimensionResource(id = R.dimen.core_ui__gutter), + start = dimensionResource(id = CoreUiR.dimen.gutter), + end = dimensionResource(id = CoreUiR.dimen.gutter), top = 8.dp, bottom = 16.dp ) @@ -171,7 +172,7 @@ private fun NewWaysToConnectRowItem( Row( modifier = modifier .padding( - horizontal = dimensionResource(id = R.dimen.core_ui__gutter) + horizontal = dimensionResource(id = CoreUiR.dimen.gutter) ) .padding( bottom = 40.dp diff --git a/app/src/main/java/org/thoughtcrime/securesms/recipients/ui/findby/FindByActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/recipients/ui/findby/FindByActivity.kt index 9ae4ba99858..e53fa0b620f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/recipients/ui/findby/FindByActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/recipients/ui/findby/FindByActivity.kt @@ -73,6 +73,7 @@ import org.signal.core.ui.Buttons import org.signal.core.ui.Dialogs import org.signal.core.ui.Dividers import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.Scaffolds import org.signal.core.ui.TextFields import org.signal.core.ui.theme.SignalTheme @@ -391,7 +392,7 @@ private fun Content( style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(top = 8.dp) ) @@ -577,7 +578,7 @@ private fun CountryPrefixRowItem( modifier = Modifier .fillMaxWidth() .clickable(onClick = onClick) - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(top = 16.dp, bottom = 14.dp) ) { Text( diff --git a/app/src/main/java/org/thoughtcrime/securesms/registration/ui/restore/RemoteRestoreActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/registration/ui/restore/RemoteRestoreActivity.kt index d2a91540b81..af758192362 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/registration/ui/restore/RemoteRestoreActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/registration/ui/restore/RemoteRestoreActivity.kt @@ -47,6 +47,7 @@ import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.ThreadMode import org.signal.core.ui.Buttons import org.signal.core.ui.Previews +import org.signal.core.ui.R as CoreUiR import org.signal.core.ui.theme.SignalTheme import org.thoughtcrime.securesms.BaseActivity import org.thoughtcrime.securesms.MainActivity @@ -262,7 +263,7 @@ class RemoteRestoreActivity : BaseActivity() { ) { Column( modifier = Modifier - .padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter)) + .padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter)) .padding(top = 40.dp, bottom = 24.dp) ) { Text( diff --git a/app/src/main/java/org/thoughtcrime/securesms/stories/viewer/reply/group/StoryGroupReplyFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/stories/viewer/reply/group/StoryGroupReplyFragment.kt index 028ae3df440..6c2eb3a8cd3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stories/viewer/reply/group/StoryGroupReplyFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/stories/viewer/reply/group/StoryGroupReplyFragment.kt @@ -127,7 +127,7 @@ class StoryGroupReplyFragment : val dialog = (parentFragment as FixedRoundedCornerBottomSheetDialogFragment).dialog as BottomSheetDialog BottomSheetBehaviorHack.setNestedScrollingChild(dialog.behavior, view) - dialog.findViewById(R.id.design_bottom_sheet)?.invalidate() + dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet)?.invalidate() return false } } diff --git a/app/src/main/res/layout/choose_navigation_bar_style_fragment.xml b/app/src/main/res/layout/choose_navigation_bar_style_fragment.xml index d1191c6f9ea..98dd162517d 100644 --- a/app/src/main/res/layout/choose_navigation_bar_style_fragment.xml +++ b/app/src/main/res/layout/choose_navigation_bar_style_fragment.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:background="@color/signal_colorBackground" android:importantForAccessibility="no" - android:paddingHorizontal="@dimen/core_ui__gutter" + android:paddingHorizontal="@dimen/gutter" android:paddingBottom="16dp" app:layout_constraintBottom_toTopOf="@id/title" app:layout_constraintEnd_toEndOf="parent" @@ -30,7 +30,7 @@ android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginHorizontal="@dimen/core_ui__gutter" + android:layout_marginHorizontal="@dimen/gutter" android:layout_marginTop="24dp" android:text="@string/ChooseNavigationBarStyleFragment__navigation_bar_size" android:textAppearance="@style/Signal.Text.HeadlineSmall" @@ -45,9 +45,9 @@ android:id="@+id/toggle" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/core_ui__gutter" + android:layout_marginStart="@dimen/gutter" android:layout_marginTop="16dp" - android:layout_marginEnd="@dimen/core_ui__gutter" + android:layout_marginEnd="@dimen/gutter" app:layout_constraintBottom_toTopOf="@id/ok" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/contact_search_unknown_item.xml b/app/src/main/res/layout/contact_search_unknown_item.xml index 5b4fc10862d..9feaa1f5c10 100644 --- a/app/src/main/res/layout/contact_search_unknown_item.xml +++ b/app/src/main/res/layout/contact_search_unknown_item.xml @@ -22,7 +22,7 @@ android:layout_width="40dp" android:layout_height="40dp" android:layout_marginVertical="12dp" - android:layout_marginStart="@dimen/core_ui__gutter" + android:layout_marginStart="@dimen/gutter" android:background="@color/signal_colorSurfaceVariant" android:importantForAccessibility="no" app:contentPadding="8dp" @@ -38,7 +38,7 @@ android:id="@+id/check_box" android:layout_width="24dp" android:layout_height="24dp" - android:layout_marginEnd="@dimen/core_ui__gutter" + android:layout_marginEnd="@dimen/gutter" android:background="?contactCheckboxBackground" android:button="@null" android:clickable="false" @@ -64,7 +64,7 @@ app:layout_constraintStart_toEndOf="@id/contact_photo_image" app:layout_constraintTop_toBottomOf="@id/contact_header" app:layout_constraintVertical_chainStyle="packed" - app:layout_goneMarginEnd="@dimen/core_ui__gutter" + app:layout_goneMarginEnd="@dimen/gutter" tools:drawableStart="@drawable/ic_bell_24" tools:drawableTint="@color/signal_icon_tint_secondary" tools:text="@sample/contacts.json/data/name" /> @@ -86,7 +86,7 @@ app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintStart_toEndOf="@id/contact_photo_image" app:layout_constraintTop_toBottomOf="@id/name" - app:layout_goneMarginEnd="@dimen/core_ui__gutter" + app:layout_goneMarginEnd="@dimen/gutter" tools:text="@sample/contacts.json/data/number" /> diff --git a/app/src/main/res/layout/credit_card_fragment.xml b/app/src/main/res/layout/credit_card_fragment.xml index 82659a09fa5..5dd21879112 100644 --- a/app/src/main/res/layout/credit_card_fragment.xml +++ b/app/src/main/res/layout/credit_card_fragment.xml @@ -24,7 +24,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" - android:paddingHorizontal="@dimen/core_ui__gutter" + android:paddingHorizontal="@dimen/gutter" android:text="@string/CreditCardFragment__enter_your_card_details" android:textAppearance="@style/Signal.Text.BodyMedium" android:textColor="@color/signal_colorOnSurfaceVariant" diff --git a/app/src/main/res/layout/exo_legacy_player_control_view.xml b/app/src/main/res/layout/exo_legacy_player_control_view.xml index 19328735d1b..466cfcedc82 100644 --- a/app/src/main/res/layout/exo_legacy_player_control_view.xml +++ b/app/src/main/res/layout/exo_legacy_player_control_view.xml @@ -38,7 +38,7 @@ app:touch_target_height="55dp" /> diff --git a/app/src/main/res/layout/review_card.xml b/app/src/main/res/layout/review_card.xml index aad5eaa42e8..4011f69dd63 100644 --- a/app/src/main/res/layout/review_card.xml +++ b/app/src/main/res/layout/review_card.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginHorizontal="@dimen/core_ui__gutter" + android:layout_marginHorizontal="@dimen/gutter" android:layout_marginBottom="16dp" android:background="@drawable/review_card_outline"> diff --git a/core-ui/src/main/java/org/signal/core/ui/DropdownMenus.kt b/core-ui/src/main/java/org/signal/core/ui/DropdownMenus.kt index b04fe3e4386..5ec88baff58 100644 --- a/core-ui/src/main/java/org/signal/core/ui/DropdownMenus.kt +++ b/core-ui/src/main/java/org/signal/core/ui/DropdownMenus.kt @@ -33,7 +33,7 @@ object DropdownMenus { fun Menu( controller: MenuController = remember { MenuController() }, modifier: Modifier = Modifier, - offsetX: Dp = dimensionResource(id = R.dimen.core_ui__gutter), + offsetX: Dp = dimensionResource(id = R.dimen.gutter), offsetY: Dp = 0.dp, content: @Composable ColumnScope.(MenuController) -> Unit ) { diff --git a/core-ui/src/main/java/org/signal/core/ui/ModifierExtensions.kt b/core-ui/src/main/java/org/signal/core/ui/ModifierExtensions.kt index 507ede5cf21..f254aa4fecc 100644 --- a/core-ui/src/main/java/org/signal/core/ui/ModifierExtensions.kt +++ b/core-ui/src/main/java/org/signal/core/ui/ModifierExtensions.kt @@ -16,7 +16,7 @@ import androidx.compose.ui.unit.Dp */ @Composable fun Modifier.horizontalGutters( - gutterSize: Dp = dimensionResource(R.dimen.core_ui__gutter) + gutterSize: Dp = dimensionResource(R.dimen.gutter) ): Modifier { return padding(horizontal = gutterSize) } diff --git a/core-ui/src/main/java/org/signal/core/ui/Rows.kt b/core-ui/src/main/java/org/signal/core/ui/Rows.kt index 942d409b959..2397b7172cf 100644 --- a/core-ui/src/main/java/org/signal/core/ui/Rows.kt +++ b/core-ui/src/main/java/org/signal/core/ui/Rows.kt @@ -190,7 +190,7 @@ object Rows { @Composable fun defaultPadding(): PaddingValues { return PaddingValues( - horizontal = dimensionResource(id = R.dimen.core_ui__gutter), + horizontal = dimensionResource(id = R.dimen.gutter), vertical = 16.dp ) } diff --git a/core-ui/src/main/java/org/signal/core/ui/Texts.kt b/core-ui/src/main/java/org/signal/core/ui/Texts.kt index 0d5ee51028c..c95089872a3 100644 --- a/core-ui/src/main/java/org/signal/core/ui/Texts.kt +++ b/core-ui/src/main/java/org/signal/core/ui/Texts.kt @@ -32,7 +32,7 @@ object Texts { style = MaterialTheme.typography.titleSmall, modifier = modifier .padding( - horizontal = dimensionResource(id = R.dimen.core_ui__gutter) + horizontal = dimensionResource(id = R.dimen.gutter) ) .padding(top = 16.dp, bottom = 12.dp) ) diff --git a/core-ui/src/main/res/values-sw360dp/dimens.xml b/core-ui/src/main/res/values-sw360dp/dimens.xml index 88ea03c8376..dcf0ba61515 100644 --- a/core-ui/src/main/res/values-sw360dp/dimens.xml +++ b/core-ui/src/main/res/values-sw360dp/dimens.xml @@ -1,4 +1,4 @@ - 24dp + 24dp \ No newline at end of file diff --git a/core-ui/src/main/res/values/dimens.xml b/core-ui/src/main/res/values/dimens.xml index 0411eef7bbd..2e2486f2574 100644 --- a/core-ui/src/main/res/values/dimens.xml +++ b/core-ui/src/main/res/values/dimens.xml @@ -1,4 +1,4 @@ - 16dp + 16dp \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index ca975d2bef7..05613b52630 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,6 @@ org.gradle.jvmargs=-Xmx6g -Xms256m -XX:MaxMetaspaceSize=1g android.useAndroidX=true android.experimental.androidTest.numManagedDeviceShards=4 -android.nonTransitiveRClass=false # Uncomment these to build libsignal from source. # libsignalClientPath=../libsignal diff --git a/image-editor/lib/src/main/java/org/signal/imageeditor/core/renderers/TrashRenderer.kt b/image-editor/lib/src/main/java/org/signal/imageeditor/core/renderers/TrashRenderer.kt index c5f2dbde789..7c35eebe840 100644 --- a/image-editor/lib/src/main/java/org/signal/imageeditor/core/renderers/TrashRenderer.kt +++ b/image-editor/lib/src/main/java/org/signal/imageeditor/core/renderers/TrashRenderer.kt @@ -10,12 +10,12 @@ import android.view.animation.Interpolator import androidx.appcompat.content.res.AppCompatResources import androidx.interpolator.view.animation.FastOutSlowInInterpolator import org.signal.core.util.DimensionUnit -import org.signal.imageeditor.R +import org.signal.core.util.R as CoreUtilR import org.signal.imageeditor.core.Bounds import org.signal.imageeditor.core.Renderer import org.signal.imageeditor.core.RendererContext -internal class TrashRenderer : InvalidateableRenderer, Renderer, Parcelable { +internal class TrashRenderer : InvalidateableRenderer(), Renderer, Parcelable { private val outlinePaint = Paint().apply { isAntiAlias = true @@ -44,14 +44,12 @@ internal class TrashRenderer : InvalidateableRenderer, Renderer, Parcelable { private val buttonCenter = FloatArray(2) - constructor() - override fun render(rendererContext: RendererContext) { super.render(rendererContext) val frameRenderTime = System.currentTimeMillis() - val trash: Drawable = requireNotNull(AppCompatResources.getDrawable(rendererContext.context, R.drawable.ic_trash_white_24)) + val trash: Drawable = requireNotNull(AppCompatResources.getDrawable(rendererContext.context, CoreUtilR.drawable.ic_trash_white_24)) trash.setBounds(0, 0, trashSize, trashSize) val diameter = getInterpolatedDiameter(frameRenderTime - startTime)