2016-05-31 45 views
2

我怎樣才能樣式側面菜單,我創建它使用本教程youtube link,我想OT使它透明,並插入一個標籤與標誌代號之一,樣式化側邊菜單

請參見下面的圖片就如何我希望它看起來像。

現在

enter image description here

它的外觀如何我想它看起來

enter image description here

如何我想它看起來打開時 enter image description here

回答

1

要設置側邊菜單的樣式,請修改主題中的SideNavigationPanel UIID。

要加貼標識,你可以做這樣的事情

Toolbar t = new Toolbar(); 
form.setToolbar(t); 
t.setTitle("tayary"); 
Label logoLabel = new Label(logoImage); 
logoLabel.setTextPosition(Label.BOTTOM); 
logoLabel.setText("label text here"); 
logoLabel.setUIID("SideMenuLogo"); 
t.addComponentToSideMenu(logoLabel); 

SideMenuLogo UIID添加到您的主題,改變AlignmentCenter,並調整頂部和底部邊緣。

要強調命令,請在主題中修改SideCommand UIID中的背景。它應該是TypeIMAGE_TILE_HORIZONTAL_ALIGN_BOTTOM。對於圖像,您可以在主題中使用任何borderBottom圖像(如果您沒有,則使用圖像邊框嚮導創建任何邊框,並使用其borderBottom圖像)。

您可以檢查this demo作爲一個例子。

+1

我也建議調用'new Toolbar(true)',這樣它就會在應用程序背景之上變得透明。 –