From e60f842bbbfd98aecc70d1017d9c43c3a5496e10 Mon Sep 17 00:00:00 2001 From: PetarVelikov Date: Tue, 12 Nov 2024 10:08:46 +0100 Subject: [PATCH 1/2] [AND-6] Implement edge-to-edge support for Android 15. --- .../preview/MediaGalleryPreviewActivity.kt | 42 ++++++++++-------- .../preview/MediaPreviewActivity.kt | 43 ++++++++----------- .../documents/AttachmentDocumentActivity.java | 20 +++++++++ .../stream_activity_attachment_document.xml | 1 + .../src/main/AndroidManifest.xml | 1 + .../feature/channels/ChannelListActivity.kt | 12 ++++++ .../ui/feature/gallery/AttachmentActivity.kt | 12 ++++++ .../gallery/AttachmentGalleryActivity.kt | 12 ++++++ .../gallery/AttachmentMediaActivity.kt | 21 +++++++-- .../feature/messages/MessageListActivity.kt | 12 ++++++ .../stream_ui_activity_attachment_gallery.xml | 1 + .../stream_ui_activity_attachment_media.xml | 1 + 12 files changed, 132 insertions(+), 46 deletions(-) diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewActivity.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewActivity.kt index 44ef744d2c9..5bfb95fdf54 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewActivity.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewActivity.kt @@ -28,7 +28,9 @@ import android.widget.FrameLayout import android.widget.MediaController import android.widget.Toast import android.widget.VideoView +import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.compose.animation.AnimatedVisibility @@ -53,13 +55,16 @@ import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid @@ -75,8 +80,8 @@ import androidx.compose.material.Text import androidx.compose.material.rememberScaffoldState import androidx.compose.material.ripple import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.MutableState -import androidx.compose.runtime.SideEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue @@ -93,6 +98,7 @@ import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.input.pointer.PointerEventPass import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.layout.ContentScale @@ -112,7 +118,6 @@ import com.google.accompanist.pager.PagerState import com.google.accompanist.pager.rememberPagerState import com.google.accompanist.permissions.ExperimentalPermissionsApi import com.google.accompanist.permissions.PermissionState -import com.google.accompanist.systemuicontroller.rememberSystemUiController import com.skydoves.landscapist.ImageOptions import com.skydoves.landscapist.coil.CoilImageState import com.skydoves.landscapist.coil.rememberCoilImageState @@ -250,7 +255,7 @@ public class MediaGalleryPreviewActivity : AppCompatActivity() { videoThumbnailsEnabled = videoThumbnailsEnabled, streamCdnImageResizing = streamCdnImageResizing, ) { - SetupSystemUI() + SetupEdgeToEdge() val message = mediaGalleryPreviewViewModel.message @@ -271,21 +276,17 @@ public class MediaGalleryPreviewActivity : AppCompatActivity() { } } - /** - * Responsible for updating the system UI. - */ @Composable - private fun SetupSystemUI() { - val systemUiController = rememberSystemUiController() - val useDarkIcons = !isSystemInDarkTheme() - - val systemBarsColor = ChatTheme.colors.barsBackground - - SideEffect { - systemUiController.setSystemBarsColor( - color = systemBarsColor, - darkIcons = useDarkIcons, - ) + private fun SetupEdgeToEdge() { + val nightMode = isSystemInDarkTheme() + val systemBarsColor = ChatTheme.colors.barsBackground.toArgb() + LaunchedEffect(nightMode) { + val style = if (nightMode) { + SystemBarStyle.dark(systemBarsColor) + } else { + SystemBarStyle.light(systemBarsColor, systemBarsColor) + } + enableEdgeToEdge(statusBarStyle = style, navigationBarStyle = style) } } @@ -317,7 +318,12 @@ public class MediaGalleryPreviewActivity : AppCompatActivity() { val pagerState = rememberPagerState(initialPage = startingPosition) val coroutineScope = rememberCoroutineScope() - Box(modifier = Modifier.fillMaxSize()) { + Box( + modifier = Modifier + .fillMaxSize() + .background(ChatTheme.colors.barsBackground) + .windowInsetsPadding(WindowInsets.systemBars), + ) { Scaffold( modifier = Modifier.fillMaxSize(), scaffoldState = scaffoldState, diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaPreviewActivity.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaPreviewActivity.kt index 4ed2a830a0b..dc0c666f3c6 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaPreviewActivity.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/preview/MediaPreviewActivity.kt @@ -28,22 +28,27 @@ import android.widget.MediaController import android.widget.ProgressBar import android.widget.Toast import android.widget.VideoView +import androidx.activity.SystemBarStyle import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.appcompat.app.AppCompatActivity import androidx.compose.foundation.background +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.systemBars +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.material.Icon import androidx.compose.material.IconButton import androidx.compose.material.Scaffold import androidx.compose.material.Text import androidx.compose.material.TopAppBar import androidx.compose.runtime.Composable -import androidx.compose.runtime.SideEffect import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.res.painterResource @@ -51,7 +56,6 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.isVisible -import com.google.accompanist.systemuicontroller.rememberSystemUiController import io.getstream.chat.android.compose.R import io.getstream.chat.android.compose.ui.theme.ChatTheme import io.getstream.chat.android.compose.ui.util.mirrorRtl @@ -62,6 +66,7 @@ import io.getstream.chat.android.compose.ui.util.mirrorRtl public class MediaPreviewActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { + setupEdgeToEdge() super.onCreate(savedInstanceState) val url = intent.getStringExtra(KEY_URL) val title = intent.getStringExtra(KEY_TITLE) ?: "" @@ -73,8 +78,11 @@ public class MediaPreviewActivity : AppCompatActivity() { setContent { ChatTheme { - SetupSystemUI() MediaPreviewScreen( + modifier = Modifier + .fillMaxSize() + .background(Color.Black) + .windowInsetsPadding(WindowInsets.systemBars), url = url, title = title, onPlaybackError = { @@ -101,6 +109,7 @@ public class MediaPreviewActivity : AppCompatActivity() { */ @Composable private fun MediaPreviewScreen( + modifier: Modifier = Modifier, url: String, title: String, onPlaybackError: () -> Unit, @@ -109,33 +118,19 @@ public class MediaPreviewActivity : AppCompatActivity() { BackHandler(enabled = true, onBack = onBackPressed) Scaffold( - modifier = Modifier.fillMaxSize(), + modifier = modifier, backgroundColor = Color.Black, topBar = { MediaPreviewToolbar(title, onBackPressed) }, content = { MediaPreviewContent(url, onBackPressed, onPlaybackError) }, ) } - /** - * Responsible for updating the system UI. - */ - @Composable - private fun SetupSystemUI() { - val systemUiController = rememberSystemUiController() - - val statusBarColor = Color.Black - val navigationBarColor = Color.Black - - SideEffect { - systemUiController.setStatusBarColor( - color = statusBarColor, - darkIcons = false, - ) - systemUiController.setNavigationBarColor( - color = navigationBarColor, - darkIcons = false, - ) - } + private fun setupEdgeToEdge() { + val barsColor = Color.Black.toArgb() + enableEdgeToEdge( + statusBarStyle = SystemBarStyle.dark(barsColor), + navigationBarStyle = SystemBarStyle.dark(barsColor), + ) } /** diff --git a/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/documents/AttachmentDocumentActivity.java b/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/documents/AttachmentDocumentActivity.java index 400d64d8f6e..568a0d8c9f1 100644 --- a/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/documents/AttachmentDocumentActivity.java +++ b/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/documents/AttachmentDocumentActivity.java @@ -12,7 +12,12 @@ import android.widget.ProgressBar; import android.widget.Toast; +import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.OnApplyWindowInsetsListener; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; @@ -30,6 +35,7 @@ public class AttachmentDocumentActivity extends AppCompatActivity { private static final String KEY_URL = "url"; + View rootView; WebView webView; ProgressBar progressBar; @@ -42,8 +48,10 @@ public class AttachmentDocumentActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.stream_activity_attachment_document); + rootView = findViewById(R.id.rootView); webView = findViewById(R.id.webView); progressBar = findViewById(R.id.progressBar); + setupEdgeToEdge(); configUIs(); init(); } @@ -54,6 +62,18 @@ private void init() { loadDocument(filePath); } + private void setupEdgeToEdge() { + ViewCompat.setOnApplyWindowInsetsListener(rootView, new OnApplyWindowInsetsListener() { + @NonNull + @Override + public WindowInsetsCompat onApplyWindowInsets(@NonNull View v, @NonNull WindowInsetsCompat insets) { + Insets systemBarInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBarInsets.left, systemBarInsets.top, systemBarInsets.right, systemBarInsets.bottom); + return WindowInsetsCompat.CONSUMED; + } + }); + } + private void configUIs() { // WebView webView.getSettings().setJavaScriptEnabled(true); diff --git a/stream-chat-android-ui-common/src/main/res/layout/stream_activity_attachment_document.xml b/stream-chat-android-ui-common/src/main/res/layout/stream_activity_attachment_document.xml index e391d1d5e6f..7a699a44a81 100644 --- a/stream-chat-android-ui-common/src/main/res/layout/stream_activity_attachment_document.xml +++ b/stream-chat-android-ui-common/src/main/res/layout/stream_activity_attachment_document.xml @@ -17,6 +17,7 @@ diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/ChannelListActivity.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/ChannelListActivity.kt index 41e6440a3cd..db6d269d329 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/ChannelListActivity.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/ChannelListActivity.kt @@ -20,6 +20,9 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat +import androidx.core.view.updatePadding import io.getstream.chat.android.ui.R import io.getstream.chat.android.ui.databinding.StreamUiFragmentContainerBinding @@ -34,6 +37,7 @@ public open class ChannelListActivity : AppCompatActivity() { super.onCreate(savedInstanceState) binding = StreamUiFragmentContainerBinding.inflate(layoutInflater) setContentView(binding.root) + setupEdgeToEdge() if (savedInstanceState == null) { supportFragmentManager.beginTransaction() @@ -57,6 +61,14 @@ public open class ChannelListActivity : AppCompatActivity() { } } + private fun setupEdgeToEdge() { + ViewCompat.setOnApplyWindowInsetsListener(binding.root) { root, windowInsets -> + val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) + root.updatePadding(left = insets.left, top = insets.top, right = insets.right, bottom = insets.bottom) + WindowInsetsCompat.CONSUMED + } + } + public companion object { /** * Creates an Intent to start the [ChannelListActivity] or its subclass. diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentActivity.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentActivity.kt index a9ad62f377a..b77ad9c0f54 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentActivity.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentActivity.kt @@ -24,7 +24,10 @@ import android.webkit.WebView import android.webkit.WebViewClient import android.widget.Toast import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat import androidx.core.view.isVisible +import androidx.core.view.updatePadding import io.getstream.chat.android.models.AttachmentType import io.getstream.chat.android.ui.R import io.getstream.chat.android.ui.databinding.StreamUiActivityAttachmentBinding @@ -46,6 +49,7 @@ public class AttachmentActivity : AppCompatActivity() { binding = StreamUiActivityAttachmentBinding.inflate(streamThemeInflater) setContentView(binding.root) + setupEdgeToEdge() configUIs() val type = intent.getStringExtra("type") @@ -75,6 +79,14 @@ public class AttachmentActivity : AppCompatActivity() { } } + private fun setupEdgeToEdge() { + ViewCompat.setOnApplyWindowInsetsListener(binding.root) { root, windowInsets -> + val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) + root.updatePadding(top = insets.top, left = insets.left, right = insets.right, bottom = insets.bottom) + WindowInsetsCompat.CONSUMED + } + } + private fun showAttachment(type: String, url: String) { when (type) { AttachmentType.GIPHY -> showGiphy(url) diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentGalleryActivity.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentGalleryActivity.kt index 737d9e3fbcd..7086febbc13 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentGalleryActivity.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentGalleryActivity.kt @@ -28,7 +28,10 @@ import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.constraintlayout.widget.ConstraintSet import androidx.core.content.ContextCompat +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat import androidx.core.view.isVisible +import androidx.core.view.updatePadding import androidx.lifecycle.lifecycleScope import androidx.viewpager2.widget.ViewPager2 import io.getstream.chat.android.core.internal.coroutines.DispatcherProvider @@ -116,11 +119,20 @@ public class AttachmentGalleryActivity : AppCompatActivity() { binding = StreamUiActivityAttachmentGalleryBinding.inflate(streamThemeInflater) setContentView(binding.root) + setupEdgeToEdge() setupGalleryOverviewButton() binding.closeButton.setOnClickListener { finish() } viewModel.attachmentGalleryItemsLiveData.observe(this, ::setupGallery) } + private fun setupEdgeToEdge() { + ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, windowInsets -> + val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) + v.updatePadding(top = insets.top, left = insets.left, right = insets.right, bottom = insets.bottom) + WindowInsetsCompat.CONSUMED + } + } + private fun setupGallery(attachmentGalleryItems: List) { if (attachmentGalleryItems.isEmpty()) { finish() diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentMediaActivity.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentMediaActivity.kt index ef5e063e8af..93e74e4d5e8 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentMediaActivity.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/gallery/AttachmentMediaActivity.kt @@ -24,8 +24,13 @@ import android.view.KeyEvent import android.widget.MediaController import android.widget.Toast import android.widget.VideoView +import androidx.activity.SystemBarStyle +import androidx.activity.enableEdgeToEdge import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat import androidx.core.view.isVisible +import androidx.core.view.updatePadding import io.getstream.chat.android.ui.R import io.getstream.chat.android.ui.databinding.StreamUiActivityAttachmentMediaBinding import io.getstream.chat.android.ui.utils.extensions.getColorCompat @@ -56,7 +61,7 @@ public class AttachmentMediaActivity : AppCompatActivity() { return } - setupSystemUi() + setupEdgeToEdge() setupViews() setupVideoView() } @@ -73,9 +78,17 @@ public class AttachmentMediaActivity : AppCompatActivity() { /** * Responsible for updating the system UI. */ - private fun setupSystemUi() { - window.navigationBarColor = getColorCompat(R.color.stream_ui_literal_black) - window.statusBarColor = getColorCompat(R.color.stream_ui_literal_black) + private fun setupEdgeToEdge() { + enableEdgeToEdge( + statusBarStyle = SystemBarStyle.dark(getColorCompat(R.color.stream_ui_literal_black)), + navigationBarStyle = SystemBarStyle.dark(getColorCompat(R.color.stream_ui_literal_black)), + ) + ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, windowInsets -> + val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) + v.updatePadding(top = insets.top, left = insets.left, right = insets.right, bottom = insets.bottom) + + WindowInsetsCompat.CONSUMED + } } /** diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/MessageListActivity.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/MessageListActivity.kt index b8917936f33..66cf9b5394b 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/MessageListActivity.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/MessageListActivity.kt @@ -20,6 +20,9 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat +import androidx.core.view.updatePadding import io.getstream.chat.android.ui.R import io.getstream.chat.android.ui.databinding.StreamUiFragmentContainerBinding @@ -34,6 +37,7 @@ public open class MessageListActivity : AppCompatActivity() { super.onCreate(savedInstanceState) binding = StreamUiFragmentContainerBinding.inflate(layoutInflater) setContentView(binding.root) + setupEdgeToEdge() if (savedInstanceState == null) { val cid = requireNotNull(intent.getStringExtra(EXTRA_CID)) { @@ -59,6 +63,14 @@ public open class MessageListActivity : AppCompatActivity() { } } + private fun setupEdgeToEdge() { + ViewCompat.setOnApplyWindowInsetsListener(binding.root) { root, windowInsets -> + val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.ime()) + root.updatePadding(left = insets.left, top = insets.top, right = insets.right, bottom = insets.bottom) + WindowInsetsCompat.CONSUMED + } + } + public companion object { private const val EXTRA_CID: String = "extra_cid" private const val EXTRA_MESSAGE_ID: String = "extra_message_id" diff --git a/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_gallery.xml b/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_gallery.xml index f18c0830f6c..3c2eae0a9a5 100644 --- a/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_gallery.xml +++ b/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_gallery.xml @@ -17,6 +17,7 @@ diff --git a/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_media.xml b/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_media.xml index ac008ae3108..929093f5c11 100644 --- a/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_media.xml +++ b/stream-chat-android-ui-components/src/main/res/layout/stream_ui_activity_attachment_media.xml @@ -19,6 +19,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/stream_ui_literal_black" > Date: Tue, 12 Nov 2024 12:55:50 +0100 Subject: [PATCH 2/2] [AND-6] Add edge-to-edge support to CHANGELOG.md. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f63153638ed..87d573c13a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,7 @@ ### ✅ Added - Add `MessageListViewModel.flagUser()` and `MessageListViewModel.unflagUser()` methods for flagging/un-flagging users. [#5478](https://github.com/GetStream/stream-chat-android/pull/5478) +- Add edge-to-edge support for apps targeting Android 15. [#5469](https://github.com/GetStream/stream-chat-android/pull/5469) ### ⚠️ Changed @@ -123,6 +124,7 @@ ### ✅ Added - Add `MessageListViewModel.flagUser()` and `MessageListViewModel.unflagUser()` methods for flagging/un-flagging users. [#5478](https://github.com/GetStream/stream-chat-android/pull/5478) +- Add edge-to-edge support for apps targeting Android 15. [#5469](https://github.com/GetStream/stream-chat-android/pull/5469) ### ⚠️ Changed - 🚨 Breaking change: Replace usage of `RippleTheme` with `StreamRippleConfiguration` for customizing ripples via `ChatTheme`. [#5475](https://github.com/GetStream/stream-chat-android/pull/5475)