[ 
https://issues.apache.org/jira/browse/FLEX-33871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812296#comment-13812296
 ] 

pol poggi commented on FLEX-33871:
----------------------------------

CustomActionBarSkin.as

package skins
{
import spark.skins.mobile.ActionBarSkin;
import mx.core.DPIClassification;

import spark.skins.mobile160.assets.ActionBarBackground;
import spark.skins.mobile240.assets.ActionBarBackground;
import spark.skins.mobile320.assets.ActionBarBackground;
import spark.skins.mobile480.assets.ActionBarBackground;

public class CustomActionBarSkin extends ActionBarSkin
{
    public function CustomActionBarSkin()
    {
        super();
                
                switch (applicationDPI)
        {
                        case DPIClassification.DPI_480:
                        {
                                // Note provisional may need changes
                                borderSize = 2;
                                layoutShadowHeight = 9;
                                layoutContentGroupHeight = 130;
                                layoutTitleGroupHorizontalPadding = 40;
                                
                                borderClass = 
spark.skins.mobile480.assets.ActionBarBackground;
                                
                                break;
                        }
            case DPIClassification.DPI_320:
            {
                borderSize = 2;
                layoutShadowHeight = 6;
                layoutContentGroupHeight = 86;
                layoutTitleGroupHorizontalPadding = 26;
                
                borderClass = spark.skins.mobile320.assets.ActionBarBackground;
                
                break;
            }
            case DPIClassification.DPI_240:
            {
                borderSize = 1;
                layoutShadowHeight = 3;
                layoutContentGroupHeight = 65;
                layoutTitleGroupHorizontalPadding = 20;
                
                borderClass = spark.skins.mobile240.assets.ActionBarBackground;
                
                break;
            }
            default:
            {
                // default DPI_160
                borderSize = 1;
                layoutShadowHeight = 3;
                layoutContentGroupHeight = 43;
                layoutTitleGroupHorizontalPadding = 13;
                
                borderClass = spark.skins.mobile160.assets.ActionBarBackground;
                
                break;
            }
        }
    }
    
    private var borderSize:uint;
}
}

main.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"; 
        xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.View1">
        <fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";

        s|ActionBar {
        skinClass:ClassReference("skins.CustomActionBarSkin");
        defaultButtonAppearance: beveled;
        }
        </fx:Style>
</s:ViewNavigatorApplication>

view1.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"; 
        xmlns:s="library://ns.adobe.com/flex/spark">
</s:View>

> message error "Definition spark.skins.mobile480.assets:ActionBarBackground 
> could not be found"
> ----------------------------------------------------------------------------------------------
>
>                 Key: FLEX-33871
>                 URL: https://issues.apache.org/jira/browse/FLEX-33871
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: .Unspecified - Mobile
>    Affects Versions: Adobe Flex SDK Next
>            Reporter: pol poggi
>            Priority: Minor
>
> Hello,
> the compiler return  a message error "Definition 
> spark.skins.mobile480.assets:ActionBarBackground could not be found"
> Thanks



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to