How to change the colour of bootstrap loader - colors

I included a Bootstrap spinner in a web page, but it seems that only the colors from text color utilities can be used (primary, warning...), which is quite limited. I would like to be able to change the theme of the webpage, and therefore the color of the spinner too, to a color that is not in text color utilities. Is it possible to do that and how?

According to the docs:
Alternatively spinners can be custom
sized with the style property, or custom CSS classes.
Remove variant prop first as this applies !important styles. After removing variant, proceed to style with a custom class or like my example below a style prop - changing color should suffice in your case
<Spinner animation="border" style={{color: "green"}} />

Related

FIGMA I con set that can quickly change Color

Trying to understand how to make component sets and use variance to make designing more simplified. I have a tile that has an icon on the right that I want to be able to change both what type of icon it is as well as its colour. Is there a way to create the two-component properties using variance? Do all the icons need to be grouped by color and do I need to adjust their naming conventions (still not to sure how that works as well)h
There is a more efficient way to do this, by taking advantage of Color Styles. With this method, you only have to create your icons once, and no need for variants. Color Style swapping will handle that.
Create your icon components, but using a boring black color. Avoid creating variants of the icons, if it's only the fill color that's changing.
Instead create a standard set of Color Styles for your icons.
Your designers then, could place an instance of a black icon from your library. Then use the Selection Panel to replace the black color with one of your defined color styles.

TextInputLayout hint color for various states

I have been trying to customize the Hint color in TextInputLayout and it works fine. But the problem is that I have to define color when there is an error, normal/Activated which is working and disabled state of the field.
So I tried creating three different styles with color normal, color activated and so on. But this doesn't seem to change the colour. I have indicated the Appcombat theme as the parent theme as well in my custom styles. I have tried applying these styles through java file as well.
Also let me know on how to define the size of the Hint text through style.
A bit late to the party, but here goes my solution to this:
Set the same style in errorTextAppearance and hintTextAppearance, both with the same color for the item android:textColor. When showing an error, set the error using a spannable with a ForegroundColorSpan with the color you wish to display in the error field, while the hint will remain in the color defined by the style set in errorTextAppearance.

How to change sidebar navbar color in SBAdmn bootstrap theme

I'm using SBAdmin bootstrap theme in my project https://startbootstrap.com/template-overviews/sb-admin/
It's all good but i need to change background color of sidebar navbar nav item
What i've tryed:
Change color in this file Style/sccc/_navbar,
/vendor/bootstrap/css/bootstrap.css but unsuccesful
Changing css of bootstrap is not a good thing.
It's better to add a separate style sheet and override styles as you want.
.sidebar{
background-color: gray;
}
Add above css to change background color of sidebar.
You can change background color by replacing "gray" with any color code you
want.
Sometimes you need to remove class type in bootstrap like this

How to change tabs' strings orientation?

When use TabPane with tabs placed on sides the tabs' headers and strings rotates and has vertical orientation. Is there any way to place tabs' string horizontally when use TabPane with the right/left sided tabs?
Put string as label into graphic node. Graphic node can be rotated (there is a rotate graphic property of the tabpane)
Specifically, instead of tab.setText("Text") use tab.setGraphic(new Label("Text")), and look at TabPane.rotateGraphic property.
If you want implementation via fxml : then yes, it is possible. You need to specify attribute rotateGraphic of tabPane, if needed, and set property graphic of a tab to a new instance of label, and that is all. Mostly all you can do via java-code, you can repeat via fxml.
Talking about tabMinWidth - I think, you should look at binding expressions here :
http://docs.oracle.com/javafx/2/api/javafx/beans/binding/Bindings.html
Specifically, I think, you should be interested in max() method - you need to have max of widths of all tabs.
I have done in this way ...
Set following CSS for Tab pane in .CSS file
-fx-tab-min-width: 30px;
-fx-tab-max-width: 30px;
-fx-tab-min-height: 130px;
-fx-tab-max-height: 130px;
After that set label in Tab graphics,Set Min Width for label (Must require)

android applying a background to the whole screen, containing more than 1 textview

I am developing an app with a home screen, that has 6 text views, arranged in some order.
Now, I want to apply an image as a background to them.
If I apply that image to the parent layout, it's not visible as it is covered by all child layouts/textviews.So, I have to apply that background individually to all the textviews, to make it visible.
But,this is not I want.
Is there a way to apply that image as a background to the parent layout in such a way, that it is visible over all the child layouts.
Means, I want to apply that image as a background such that a single image can cover all the screen and is visible over the textviews, not applying the image to all the individual texviews.
You can also take the question as, how to make the textviews transparent?
Actually, I figured out a way..
I can define a custom layout in a separate file in drawable folder.
There, I can define a selector in which I can define a shape for defining the
gradient(for background gradient
),
solid(for applying solid color)..like elements.
In the solid element, I can define the color attribute as
<solid android:color="#android:color/transparent" />
Then, I can apply this layout as a background to all the textviews.
OR, If you want no other effect rather than just applying the background, you can do this without creating the file.
To each TextView individually, apply the background as:
android:background="#android:color/transparent"
These both ways can solve the problem easily.

Resources