I fixed status bar color is white by this code
<style name="BaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="android:statusBarColor">@color/white</item>
<item name="android:windowLightStatusBar" tools:targetApi="M">true</item>
</style>
So, status bar is white, and icon is black.
In my project, I use library StfalconImageViewer for show images.
private fun showImageViewer(sourceImageView: ImageView?, position: Int) {
val imageLoader = ImageLoader<String> { imageView, imageUrl ->
loadImage(imageView, imageUrl)
}
StfalconImageViewer.Builder(context, imageUrls, imageLoader)
.withHiddenStatusBar(false)
.withStartPosition(position)
.withTransitionFrom(sourceImageView)
.show()
}
When dialog is showed, I seen status bar is back and icon is black too (because I fixed color with code above).
How to make status bar icon color auto change, if status bar is black, icon color auto change to white. Or, another way of asking: I want to show StfalconImageViewer with status bar icon color is white.
Please give me some suggestion.
Thanks in advance.