2012-09-25 19 views
1

大家好,我在Flash Builder使用Flex 4.6新...柔性4.6背景圖片換膚

我創建了導航視圖爲主題的移動應用程序,但我想我自己的個性化主題,這是連接一個簡單的圖片JPG在我的皮膚:backGround.mxml

<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"> 

<fx:Metadata>[HostComponent("spark.components.View")]</fx:Metadata> 

<s:states> 
    <s:State name="normal" /> 
    <s:State name="disabled" /> 
</s:states> 

<s:BitmapImage includeIn="normal" height="100%" source="assets/fondito.jpg" width="100%"/> 

我導入皮膚的skinClass我HomeView,但它涵蓋了所有的其他組件...標籤,列表,按鈕等...

如何顯示皮膚上方的所有組件?

回答

1

查看視圖類here所需的skinParts。

你會注意到你將需要一個contentGroup可選的皮膚部分。這允許你佈局你的位圖圖像。作爲一個快速修復,這裏是一些示例代碼(未經測試):

... 
<s:BitmapImage includeIn="normal" height="100%" source="assets/fondito.jpg" width="100%"/> 
<s:Group id="contentGroup"/> 
... 
+0

yeees!我很失落,但你的回答幫了我很多,非常感謝你!!!!! –