Change Split Screen Expanding Color Android - android

When in the Clock app AND in split screen mode AND expanding, the background color of the expanding part is blue like the rest of the app. I'm referring to the part circled in red.
In my app the expanding part color is white, how can I change it to a custom color?

You can do this this by setting the window's background.
In your xml style:
<style name="YourTheme">
<item name="android:windowBackground">#color/your_color</item>
</style>
Or you can do it programmatically:
getWindow().setBackgroundDrawableResource(R.color.your_color);

Related

android - Change Blur Background color behind AlertDialog

I want to change the black transparent background to white transparent, tried to change it in the AppTheme style but it didn't work.
Also I want to change the black blur background to white blur, tried to change it in the AppTheme style.
I also tried renderscript, fastblur, xml mentioned in this, but it changed only the dialog white background
Any ideas how to change it? Thanks in advance!
Using the style you can change the dim not the blur.
You can use the android:backgroundDimAmount attribute (range: 1.0 - 0.0):
<style name="ThemeOverlay.App.MaterialAlertDialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="android:backgroundDimAmount">0.xx</item>
</style>
and
MaterialAlertDialogBuilder(context, R.style.ThemeOverlay_App_MaterialAlertDialog)
.setTitle("Title")
.show()
With 0.10 and 0.90

Text Covered by AdView in offline mood due to black background

In my layout there is an AdView. When I choose Dark Theme with background color as black (#292929) in offline mode, there is a black blank space at the place of AdView. AdView shouldn't be there unless there is internet connection. So, my text is covered by that blank space. But if I don't assign any background color, everything is okay. Now, how can I remove this blank black space due to AdView when background color is black?
<style name="AppTheme.Dark" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:background">#292929</item>
<item name="android:textColor">#FFFFFF</item>
</style>
Additional problem: during black background color, when I use magnify glass whole screen becomes black
I have figured out the solution. I should delete it now but might be helpful for others. Instead of choosing background, windowBackground color code solve the problem.
<item name="android:windowBackground">#android:color/black</item>

toolbar icon's not totaly white

Lately I have had this problem, which is quite annoying where an icon is not "totally" white, it is in a half gray tone, there are two icons below for a better understanding, I would like the "search" icon to be the same color That of "completed."
You can change colors in one go.
<style name="YourAppTheme" parent="AppTheme">
<item name="android:textColorSecondary">#color/white</item>
</style>
Set color in a theme and Apply that theme to your App. If you already have theme then just add android:textColorSecondary in that theme.
Verify if the icon you are using has some transparency.
If your are using icons from the android SDK icon library then many of them have semi-transparency and the result is some mix between white and the background color.
If you want a fully white icon then you need a not transparent icon.
I deeply appreciate all the help. I was able to solve this using an SVG asset vector.

How to create semi-transparent activity/menu in android

How to achieve a menu similar to this one in the image? How can I display such a menu with semi-transparent background where I can see camera preview. What is the name of that kind of menu?
Set semi transparent or fully transparent color to your layout(menu layout) background.
Below I have mentioned color code with transparency level
Black - "#000000"
100% Transparent"#00000000"
100% Opaque "#FF000000"
50% Transparent "#80000000" (This one you can use in your case)
For more details regarding Android color code you can check
https://stackoverflow.com/a/17239853/1140237
use this code
<style name="MyTheme" parent="android:Theme">
<item name="android:panelFullBackground">{your color or drawable}</item>
</style>

How can I change the color of the scrollbar in Android?

The current problem is that our theme is inheriting from Theme.AppCompat, which appears to have a white scrollbar, and that is not visible on the white background.
I know that I can use
<item name="android:scrollbarThumbVertical">#drawable/scroll_thumb</item>
And create a shape for the custom Scrollbar. But I only want to change it to a darker color. When I use a simple colored rectangle shape, it has a different width than the normal scrollbar.
Is this possible?
ok, it is possible to use a color for the scrollbarThumbVertical item value, but this will change the width, so I set the size to 4dp, which
seems to be the same as in the other views with the native scrollbars
<item name="android:scrollbarSize">4dp</item>
<item name="android:scrollbarThumbVertical">#color/scrollbar_thumb</item>
I don't like having to set the size, but I don't see any other way that would be cleaner.

Categories

Resources