mirror of https://github.com/buggins/dlangui.git
main menu styles
This commit is contained in:
parent
f07f153f22
commit
c11a305037
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:drawable="main_menu_item_background_selected"
|
||||
android:state_selected="true" />
|
||||
<item
|
||||
android:drawable="main_menu_item_background_hover"
|
||||
android:state_hovered="true" />
|
||||
<item
|
||||
android:drawable="@null" />
|
||||
</selector>
|
Binary file not shown.
After Width: | Height: | Size: 191 B |
Binary file not shown.
After Width: | Height: | Size: 189 B |
Binary file not shown.
After Width: | Height: | Size: 208 B |
|
@ -95,6 +95,8 @@ class MenuWidgetBase : ListWidget {
|
|||
for (int i=0; i < _item.subitemCount; i++) {
|
||||
MenuItem subitem = _item.subitem(i);
|
||||
MenuItemWidget widget = new MenuItemWidget(subitem);
|
||||
if (orientation == Orientation.Horizontal)
|
||||
widget.styleId = "MAIN_MENU_ITEM";
|
||||
//widget.handler = this;
|
||||
adapter.widgets.add(widget);
|
||||
}
|
||||
|
|
|
@ -664,7 +664,8 @@ Theme createDefaultTheme() {
|
|||
//tabWidget.backgroundImageId("frame_blue");
|
||||
//res.dumpStats();
|
||||
|
||||
Style mainMenu = res.createSubstyle("MAIN_MENU").backgroundColor(0x00E7E8EC).layoutWidth(FILL_PARENT);
|
||||
Style mainMenu = res.createSubstyle("MAIN_MENU").backgroundColor(0xEFEFF2).layoutWidth(FILL_PARENT);
|
||||
Style mainMenuItem = res.createSubstyle("MAIN_MENU_ITEM").padding(Rect(4,2,4,2)).backgroundImageId("main_menu_item_background");
|
||||
Style menuItem = res.createSubstyle("MENU_ITEM").padding(Rect(4,2,4,2)); //.backgroundColor(0xE0E080) ;
|
||||
menuItem.createState(State.Focused, State.Focused).backgroundColor(0x40C0C000);
|
||||
menuItem.createState(State.Pressed, State.Pressed).backgroundColor(0x4080C000);
|
||||
|
|
Loading…
Reference in New Issue