I'm embeding a flex application into a web page using the most recent version of swfobject.js. I've set wmode to transparent and all that but whatever I've enterd for the embeded objects default size, is then a white background within my application. I've set the application's backgroundAlpha to 0 and I know that part works because my aplication resizes after it has finished loading. The resized portion of the application is transparent but the rest still has the white background so it's obvious it has something to do with the application and not the html or javascript embedding it. How do i fix this?
Looking at the default application skin I noticed that it makes use of the backgroundColor style property to set the fill color for the backgroundRect of the applicaton. However, there's no mention of backgroundAlpha so I created a new application skin and added a single line of code which works!
Below this line:
bgRectFill.color = getStyle('backgroundColor');
Add the following:
bgRectFill.alpha = getStyle('backgroundAlpha');
In your application .mxml file set the skinClass property to:
skinClass="YourSkinsDirectory.YourApplicationSkin"
I have mine saved as ApplicationSkin.mxml in a folder called Skins
so mine looks like this: skinClass="Skins.ApplicationSkin"
Here's the full skin:
<?xml version="1.0" encoding="utf-8"?>
<!--
ADOBE SYSTEMS INCORPORATED
Copyright 2008 Adobe Systems Incorporated
All Rights Reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file
in accordance with the terms of the license agreement accompanying it.
-->
<!--- The default skin class for the Spark Application component.
#see spark.components.Application
#langversion 3.0
#playerversion Flash 10
#playerversion AIR 1.5
#productversion Flex 4
-->
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
<fx:Metadata>
<![CDATA[
/**
* A strongly typed property that references the component to which this skin is applied.
*/
[HostComponent("spark.components.Application")]
]]>
</fx:Metadata>
<fx:Script fb:purpose="styling">
<![CDATA[
/**
* #private
*/
override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number) : void
{
bgRectFill.color = getStyle('backgroundColor');
bgRectFill.alpha = getStyle('backgroundAlpha');
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
]]>
</fx:Script>
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
<s:State name="normalWithControlBar" />
<s:State name="disabledWithControlBar" />
</s:states>
<!-- fill -->
<!---
A rectangle with a solid color fill that forms the background of the application.
The color of the fill is set to the Application's backgroundColor property.
-->
<s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
<s:fill>
<!--- #private -->
<s:SolidColor id="bgRectFill" color="#FFFFFF" alpha="1"/>
</s:fill>
</s:Rect>
<s:Group left="0" right="0" top="0" bottom="0">
<s:layout>
<s:VerticalLayout gap="0" horizontalAlign="justify" />
</s:layout>
<!---
#private
Application Control Bar
-->
<s:Group id="topGroup" minWidth="0" minHeight="0"
includeIn="normalWithControlBar, disabledWithControlBar" >
<!-- layer 0: control bar highlight -->
<s:Rect left="0" right="0" top="0" bottom="1" >
<s:stroke>
<s:LinearGradientStroke rotation="90" weight="1">
<s:GradientEntry color="0xFFFFFF" />
<s:GradientEntry color="0xD8D8D8" />
</s:LinearGradientStroke>
</s:stroke>
</s:Rect>
<!-- layer 1: control bar fill -->
<s:Rect left="1" right="1" top="1" bottom="2" >
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0xEDEDED" />
<s:GradientEntry color="0xCDCDCD" />
</s:LinearGradient>
</s:fill>
</s:Rect>
<!-- layer 2: control bar divider line -->
<s:Rect left="0" right="0" bottom="0" height="1" alpha="0.55">
<s:fill>
<s:SolidColor color="0x000000" />
</s:fill>
</s:Rect>
<!-- layer 3: control bar -->
<!--- #copy spark.components.Application#controlBarGroup -->
<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
<s:layout>
<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
</s:layout>
</s:Group>
</s:Group>
<!--- #copy spark.components.SkinnableContainer#contentGroup -->
<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0" />
</s:Group>
</s:Skin>
Related
I want to make the blinking cursor thin in TextInput, how to do that? The normal width is like 3px, I want it to have 1px.
For android you can follow this steps:
step 1: Create editext_cursor.xml and place it under res->drawable directory.
android/app/src/main/res/drawable/editext_cursor.xml
step 2: inside editext_cursor.xml paste this:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size android:width="1dip" />
<solid android:color="#010101" />
</shape>
and here you can change the width to whatever you want.
step 3: add that line to android/app/src/main/res/values/styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>
<item name="android:textCursorDrawable">#drawable/editext_cursor</item> <-- add this
</style>
</resources>
step 4: rebuild your app
How can I change this background color of TextInput when it got highlight from the autoCompleteType that already exists on react native?
like on this image
To customize this autofill bg color, you have to set this at android level.
Create a xml file with the name of your choice, for example autofill_highlight.xml in android/app/src/main/res/drawable
Put this code inside :
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#android:color/transparent" />
</shape>
Here, the color set is transparent ("#android:color/transparent"), replace it with your color.
In android/app/src/main/res/values/styles.xml, add this line to your app theme (make sure to provide your own file name if you don't call it autofill_highlight like in my example)
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- ... your other theme customization ... -->
<!-- ADD THE FOLLOWING LINE -->
<item name="android:autofilledHighlight">#drawable/autofill_highlight</item>
</style>
</resources>
Rebuild your application :)
I try to change the defaut icon of y outlook add-in. By defaut it's blue icon
I changed every logo in my images folder. When I would like add my add-in I see the correct logo
But on Outlook, I have again the old logo []
3
I tried to clean and rebuild the solution, but it didn't change anything. I don't understand why I have always the old logo. I don't know where this old logo come from
Try to add in your manifest file this:
<IconUrl DefaultValue="your URL to image"/>
<HighResolutionIconUrl DefaultValue="your URL to image" />
The image have to be 128x128 .
If you have compose and read tags you need also have this:
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
When icon16,icon32,icon80 is inside the source tag:
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="your URL to image"/>
</bt:Images>
</Resources>
You can see full example and explanation here:
https://learn.microsoft.com/en-us/outlook/add-ins/manifests
I would like to change the background title color in the recent apps view (when you press the Overview square button on Android) using react-native.
You can see in the image below that the Facebook app has a blue background color, but my Bitcoin FOMO Calculator app has the default gray color.
Thanks
1.Create colors.xml into android/app/src/main/res/values/colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Change the color value for your need -->
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
2.Modify the styles.xml inside android/app/src/main/res/values/styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
</resources>
3.The result and more detail about Android Style and Theme:
I am trying to add a checkbox to a List component in my application and everything works seeming well until I scroll through my data.
As I scroll vertically in my List, any checks I may have added start to get added to other items in my List, sometimes the original item I checked is not even checked anymore.
For example, my List height is enough to see 5 items, I check Item 1, scroll down and every 5th item starts to get checked.
It's really odd and I have not been able to figure out why it is doing this. I looked at some examples online, and I'm not doing anything any different as far as I can tell.
I ran some traces and the Checkbox datachange event fires as I scroll through my list, but again, I am not sure why.
Here is the mxml test page for my List.
Any help is appreciated, thanks.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Array id="arr">
<mx:Object label="One" />
<mx:Object label="Two" />
<mx:Object label="Three" />
<mx:Object label="Four" />
<mx:Object label="Five" />
<mx:Object label="Six" />
<mx:Object label="Seven" />
<mx:Object label="Eight"/>
<mx:Object label="Nine" />
<mx:Object label="Ten" />
<mx:Object label="Eleven" />
<mx:Object label="Twelve" />
</mx:Array>
<mx:List
id="addrList"
height="100"
width="100%" fontSize="10"
borderStyle="solid"
borderColor="#000000"
borderThickness="1"
dataProvider="{ arr }">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox
change="trace('change')"
dataChange="trace('dataChange')"/>
</mx:Component>
</mx:itemRenderer>
</mx:List>
</mx:Application>
your putting an object to a list dataprovider, dataprovider supports text only
try this
<mx:Script>
<![CDATA[
[Bindable]
private var arr:Array = ["a","b","c","d","e","f","g"];
]]>
</mx:Script>
<mx:List
id="addrList"
height="100"
width="100%" fontSize="10"
borderStyle="solid"
borderColor="#000000"
borderThickness="1"
dataProvider="{ arr }">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox change="trace('change')"
dataChange="trace('dataChange')"/>
</mx:Component>
</mx:itemRenderer>
</mx:List>