Android status bar color setting for all the activities - android-statusbar

I had set the theme color in styles for the status bar but it keeps only one activity to that color other activities are looking as such how can i change my other activities status bar color

in the values folder u have to create v21 in that u have to place the status bar colour

Related

Change Device Navigation Bar Color [CODENAME ONE]

How would one go about changing device navigation bar color in Codename one? I recently learned to change the color of the status bar, and I would like to do the same for the device's navigation bar.
This isn't an editable area, I'm sure there are ways to override that but it's probably not what you want. This is a part of the device control. The device determines the colors based on light/dark theme of application.
To make it work as dark you can use the build hint android.theme=Dark otherwise it should take the color based on device mode.
I found the solution by adding a color.xml file to the native android resources folder with the following line of code:
android/src/main/resources/colors.xml
<resources>
<color name="navigationBarColor">#ff000000</color>
</resources>
With this line of code, the navigation bar is rendered "black".
Refernces:
Change the color of the status bar in codenameone
Change navigation bar color

TreeItem of material-ui to be focused by right-clicking

Please teach me how to control the background color when right-clicking on TreeView/TreeItem.
Based on https://codesandbox.io/s/jggxz?file=/demo.tsx which is linked from https://material-ui.com/components/tree-view/ ,
in the case of implementing the context menu function, the background color of the right-clicked item is not as expected.
Let me explain how it works by watching the attached video.
Right-click on "Forums" to bring up the context menu.
Then, for a brief moment, "Forums" will get the focus and the background color will change to pink.
After the background color disappears, the context menu will appear.
Also, up to this point, the background color of "Promotions", which was selected from the beginning, is always green.
What I want is the following. What should I do to make it look like the following?
Right-click on "Forums" to bring up the context menu.
Then the background color of the right-clicked item "Forums" will change to green, and
at the same time, the background color of the selected "Promotions" from the beginning will disappear.
Another thing I tried was to use TreeView's "selected" props and useState, but it did not work as expected.
That version is below.
https://codesandbox.io/s/material-demo-forked-h5z8e?file=/demo.tsx

How to change selected tab background in codenameone?

I'm doing sample on Tabs and its working fine but here my question how to show differentiate between selected and non selected Tabs in codenameone. it means after selecting Tab i want to show different background color.
how can i achieve this?
Change the background color of the selected state of Tab Uiid in your Codename One Designer.

How to change the BarButtonItem back color?

I am currently working in the C# windows application with DevExpress controls.
Now I want to change back color of bar button item while loading the form.
I've tried following code:
barButton.Appearance.BackColor = Color.Red;
but the bar button back color not changed to red.
By default, bars use the skins to draw their content. In this case, all background colors are provided by specific skin elements, which cannot be changed. The only way to change a specific item's background color is to disable skins:
put the BarAndDockingController component onto a form, and assign it to the BarManager.Controller property. Set BarAndDockingController.PaintStyleName or LookAndFeel to any non-skin style(for example "Flat"). Then use the Bar.Appearance.BackColor property to set the desired color.
Alternatively, you can create your own custom barItem in a way similar to the one described in the How to change the background color of highlighted links KB article.

Keep row permanently selected in the ListView in Win32

I am using Win32 ListView32.
When row in the ListView is selected it has dark blue color.
The row can be selected by either clicking on it or programmatically by calling ListView_SetItemState(hwnd, index, LVIS_SELECTED, LVIS_SELECTED);.
When ListView control focus is lost the selected row becomes gray.
How can I keep selected row with dark blue color irrespective of the focus?
Use the LVS_SHOWSELALWAYS window style. I don't think it can stay as dark blue as that's the indicator that that control has focus.
"Presumably you're doing this in a OnInitDialog handler? If so, you need
to SetFocus to your list control, and return FALSE from OnInitDialog."
If you are using VC6.0. You can set properties as "Show selection always" to ListView. And ListView will be defined by VC6.0 as LVS_SHOWSELALWAYS.
The definition of the CONTROL in resource file looks like:
CONTROL "List2",IDC_LIST_MEMBER,"SysListView32",LVS_REPORT |
LVS_SHOWSELALWAYS | LVS_EDITLABELS | WS_BORDER |
WS_TABSTOP,7,64,514,187
And The selected item will be highlighted. For my program, the default background color is white, the default selected and focused color is blue, and the default selected but lost focused color is gray(when usr click to other control).

Resources