How to Change Android Theme using Custom Theme Style - android-studio

I have declared my own custom theme xml and named it style
<style name="LightTheme.PSIProjectAPP" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
Then i tried to change the manifes theme, setTheme() and filled the paramater with android.R.style, but can't find my custom style.
How do i do it? or there is a way to do it properly?

If you want, you can apply the defined style to the activity or view that you want stylized like this:
in the manifest file:
<activity android:theme="#style/Theme.MyGreenTheme"/>

Related

How to set List View as default view in Hybris PCM Backoffice

I am a bit new to the Hybris platform. I am working with the Backoffice PCM on Hybris 6.7.
I would like to change the default browser display when using the PCM Backoffice. Currently the default behavior renders Grid View but I would like to use List View instead. I will like to either remove entirely the grid view option (or disable it) and automatically open products in list view instead.
You have to customize the xml to obtain the desired behavior. The best approach is creating a new extension from template ybackoffice to consolidate your changes.
Basically, the original extension have these lines:
<context type="Product" component="pcmbackoffice-assortment-collection-browser" >
<cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
<cb:available-molds default-mold="grid-view">
<cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
<cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
</cb:available-molds>
</cb:collection-browser>
</context>
Just copy and paste in your new extension in the file <myextension>-backoffice-config.xml and remove the line correspondent to the grid view (for removing the option), eg.:
<context type="Product" component="pcmbackoffice-assortment-collection-browser" >
<cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
<cb:available-molds default-mold="list-view">
<cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
</cb:available-molds>
</cb:collection-browser>
</context>
Do ant clean all, and after HAC update in your extension.
Ps.: You can apply these changes through orchestrator to see the result in live, before create the new extension.

orchard: include font awesome

How I can include font awesome to my module in admin (v.1.10.2.0)?
There is something similar like Style.Require("jQueryUI_Orchard"); ?
Or I need add Add awesome to my project
Orchard.Resources provides a resource manifest for font awesome. Therefore add a reference to module Orchard.Resources and add Style.Require("FontAwesome") to a view to get font awesome included.

Conflicts between Custom theme CSS and Liferay CSS

I am trying to customize the Liferay UI by using custom theme using base as as "_Styled" theme.
I have my own css files which I coped to _diff/css folder of theme and imported them "custom.css" file .However its breaking the presentation of liferay.In my custom CSS I have styles defined for all the standard tags like body,div etc which is impacting the liferay UI too.
How can I resolve this conflict? Thanks in advance!
Quick (and not the best) solution is to remove contents of liferays css file (for example "base.css") and save this empty file in /diff/css/ folder of your theme. This way the base.css will get overriden with your new empty file and thus no styles will get loaded. And your custom.css will be the only stylesheet that is taken into account.
Well, of course it all has an effect on the rest of Liferay as well. Liferay provides quite a bit of the HTML DOM of your page, and if you change the presentation of all of those elements, you'll have to take care to style Liferay's elements too.
Is this a conflict? No. Let's go for the simplest case: You declare div {color:green;}. Of course, now everything, your components as well as Liferay's components, use green text. If you only want to style your own portlets, you might want to specify some portlets: div.portlet-my-own-application {color:green;}
I know that color is a too simple usecase, but I hope it illustrates the solution strategy.
Rather than following Artem Khojoyan's suggestion to override Liferay's base.css, I'd recommend to take a look at the resulting css, what's effective etc., and simplify your own css - adapt it to be used within Liferay - by inspecting the effective CSS for every elements that looks off. Firebug or any of it's relatives are your friend.
I'm afraid, with the details "I'm doing something which has an effect on Liferay UI" there's nothing much more to help you. In fact, I'd hope that what you do has an effect on Liferay's UI... You'll just need to find the proper CSS code
Ideally if your styles are loaded from custom.css, then will overwrite liferay default styles.
In some cases, to overwrite a style in css, you can use !important
for example, liferay default style
body {
background-color: #fff
}
You can specify your style to consider irrespective of order of loading
body {
background-color: red !important;
}

OrchardCMS Shape tracing not showing up for custom theme

I'm creating a custom theme for my new Orchard site. The shape tracing module is incredibly useful, but for some reason it isn't rendering in my custom theme. I'm not sure what I might be missing to get it to appear.
When I set my site to use the theme TheThemeMachine, it appears just fine at the bottom of the page. When I compare the rendered source from the TheThemeMaching and my custom theme, I see all the CSS & JS references in the head for the shape tracing module. However when I scroll to the bottom of the source of my custom theme, I don't see all the script blogs with the JSON objects. I just see a lot of empty script "shape-tracing-wrapper" blocks.
Ideas?
You're missing a zone named Tail in your document.cshtml. Compare your theme's version with the one in Core/Shapes/Views.

Apply Sketch Styles to all controls in SketchFlow Application

Is there a way to globally apply the Sketch Styles to all controls within my SketchFlow application in Expression Blend 4 without having to apply the Style="{DynamicResource Foo-Sketch}" property to each and every control manually?
Generally spoken, I would like to make those styles defined in SketchStyles.xaml implicit.
You can probably apply the styles implicitly like this:
<UserControl.Resources>
<Style BasedOn="{StaticResource Button-Sketch}" TargetType="Button"/>
</UserControl.Resources>
You would have to do this for each control type you want to use an implicit style for.

Resources