Levels on LevelScreen have different order

Tools can be set in Toolbar by clicking, no longer dragging
This commit is contained in:
= 2016-11-16 11:02:35 +01:00
parent 7cf0868730
commit c0a398fa5d
11 changed files with 2131 additions and 5730 deletions

View File

@ -238,20 +238,20 @@ public final class R {
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f080007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f0c004a;
public static final int abc_background_cache_hint_selector_material_light = 0x7f0c004b;
public static final int abc_color_highlight_material = 0x7f0c004c;
public static final int abc_background_cache_hint_selector_material_dark = 0x7f0c004b;
public static final int abc_background_cache_hint_selector_material_light = 0x7f0c004c;
public static final int abc_color_highlight_material = 0x7f0c004d;
public static final int abc_input_method_navigation_guard = 0x7f0c0000;
public static final int abc_primary_text_disable_only_material_dark = 0x7f0c004d;
public static final int abc_primary_text_disable_only_material_light = 0x7f0c004e;
public static final int abc_primary_text_material_dark = 0x7f0c004f;
public static final int abc_primary_text_material_light = 0x7f0c0050;
public static final int abc_search_url_text = 0x7f0c0051;
public static final int abc_primary_text_disable_only_material_dark = 0x7f0c004e;
public static final int abc_primary_text_disable_only_material_light = 0x7f0c004f;
public static final int abc_primary_text_material_dark = 0x7f0c0050;
public static final int abc_primary_text_material_light = 0x7f0c0051;
public static final int abc_search_url_text = 0x7f0c0052;
public static final int abc_search_url_text_normal = 0x7f0c0001;
public static final int abc_search_url_text_pressed = 0x7f0c0002;
public static final int abc_search_url_text_selected = 0x7f0c0003;
public static final int abc_secondary_text_material_dark = 0x7f0c0052;
public static final int abc_secondary_text_material_light = 0x7f0c0053;
public static final int abc_secondary_text_material_dark = 0x7f0c0053;
public static final int abc_secondary_text_material_light = 0x7f0c0054;
public static final int accent_material_dark = 0x7f0c0004;
public static final int accent_material_light = 0x7f0c0005;
public static final int background_floating_material_dark = 0x7f0c0006;
@ -304,8 +304,8 @@ public final class R {
public static final int secondary_text_disabled_material_light = 0x7f0c003d;
public static final int switch_thumb_disabled_material_dark = 0x7f0c003e;
public static final int switch_thumb_disabled_material_light = 0x7f0c003f;
public static final int switch_thumb_material_dark = 0x7f0c0054;
public static final int switch_thumb_material_light = 0x7f0c0055;
public static final int switch_thumb_material_dark = 0x7f0c0055;
public static final int switch_thumb_material_light = 0x7f0c0056;
public static final int switch_thumb_normal_material_dark = 0x7f0c0040;
public static final int switch_thumb_normal_material_light = 0x7f0c0041;
}

View File

@ -1380,20 +1380,20 @@ containing a value of this type.
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f080007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark=0x7f0c004a;
public static final int abc_background_cache_hint_selector_material_light=0x7f0c004b;
public static final int abc_color_highlight_material=0x7f0c004c;
public static final int abc_background_cache_hint_selector_material_dark=0x7f0c004b;
public static final int abc_background_cache_hint_selector_material_light=0x7f0c004c;
public static final int abc_color_highlight_material=0x7f0c004d;
public static final int abc_input_method_navigation_guard=0x7f0c0000;
public static final int abc_primary_text_disable_only_material_dark=0x7f0c004d;
public static final int abc_primary_text_disable_only_material_light=0x7f0c004e;
public static final int abc_primary_text_material_dark=0x7f0c004f;
public static final int abc_primary_text_material_light=0x7f0c0050;
public static final int abc_search_url_text=0x7f0c0051;
public static final int abc_primary_text_disable_only_material_dark=0x7f0c004e;
public static final int abc_primary_text_disable_only_material_light=0x7f0c004f;
public static final int abc_primary_text_material_dark=0x7f0c0050;
public static final int abc_primary_text_material_light=0x7f0c0051;
public static final int abc_search_url_text=0x7f0c0052;
public static final int abc_search_url_text_normal=0x7f0c0001;
public static final int abc_search_url_text_pressed=0x7f0c0002;
public static final int abc_search_url_text_selected=0x7f0c0003;
public static final int abc_secondary_text_material_dark=0x7f0c0052;
public static final int abc_secondary_text_material_light=0x7f0c0053;
public static final int abc_secondary_text_material_dark=0x7f0c0053;
public static final int abc_secondary_text_material_light=0x7f0c0054;
public static final int accent_material_dark=0x7f0c0004;
public static final int accent_material_light=0x7f0c0005;
public static final int background_floating_material_dark=0x7f0c0006;
@ -1454,8 +1454,8 @@ containing a value of this type.
public static final int secondary_text_disabled_material_light=0x7f0c003d;
public static final int switch_thumb_disabled_material_dark=0x7f0c003e;
public static final int switch_thumb_disabled_material_light=0x7f0c003f;
public static final int switch_thumb_material_dark=0x7f0c0054;
public static final int switch_thumb_material_light=0x7f0c0055;
public static final int switch_thumb_material_dark=0x7f0c0055;
public static final int switch_thumb_material_light=0x7f0c0056;
public static final int switch_thumb_normal_material_dark=0x7f0c0040;
public static final int switch_thumb_normal_material_light=0x7f0c0041;
public static final int toolbuttonActiveNotReady=0x7f0c0042;
@ -1465,7 +1465,8 @@ containing a value of this type.
public static final int toolbuttonLocked=0x7f0c0046;
public static final int toolslotDisabled=0x7f0c0047;
public static final int toolslotEnabled=0x7f0c0048;
public static final int win=0x7f0c0049;
public static final int toolslotEnabledSelected=0x7f0c0049;
public static final int win=0x7f0c004a;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material=0x7f09000d;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -85,6 +85,7 @@
<color name="toolbuttonLocked">#db494b49</color>
<color name="toolslotDisabled">#715f5f</color>
<color name="toolslotEnabled">#db41e42b</color>
<color name="toolslotEnabledSelected">#b3d700</color>
<color name="win">#ffda45</color>
<declare-styleable name="ActionBar"><attr name="navigationMode"><enum name="normal" value="0"/><enum name="listMode" value="1"/><enum name="tabMode" value="2"/></attr><attr name="displayOptions"><flag name="none" value="0"/><flag name="useLogo" value="0x1"/><flag name="showHome" value="0x2"/><flag name="homeAsUp" value="0x4"/><flag name="showTitle" value="0x8"/><flag name="showCustom" value="0x10"/><flag name="disableHome" value="0x20"/></attr><attr name="title"/><attr format="string" name="subtitle"/><attr format="reference" name="titleTextStyle"/><attr format="reference" name="subtitleTextStyle"/><attr format="reference" name="icon"/><attr format="reference" name="logo"/><attr format="reference" name="divider"/><attr format="reference" name="background"/><attr format="reference|color" name="backgroundStacked"/><attr format="reference|color" name="backgroundSplit"/><attr format="reference" name="customNavigationLayout"/><attr name="height"/><attr format="reference" name="homeLayout"/><attr format="reference" name="progressBarStyle"/><attr format="reference" name="indeterminateProgressStyle"/><attr format="dimension" name="progressBarPadding"/><attr name="homeAsUpIndicator"/><attr format="dimension" name="itemPadding"/><attr format="boolean" name="hideOnContentScroll"/><attr format="dimension" name="contentInsetStart"/><attr format="dimension" name="contentInsetEnd"/><attr format="dimension" name="contentInsetLeft"/><attr format="dimension" name="contentInsetRight"/><attr format="dimension" name="elevation"/><attr format="reference" name="popupTheme"/></declare-styleable>
<declare-styleable name="ActionBarLayout"><attr name="android:layout_gravity"/></declare-styleable>
@ -230,7 +231,7 @@
<style name="Animation.AppCompat.Dialog" parent="Base.Animation.AppCompat.Dialog"/>
<style name="Animation.AppCompat.DropDownUp" parent="Base.Animation.AppCompat.DropDownUp"/>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
@ -442,7 +443,7 @@
<item name="actionBarWidgetTheme">@null</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<!-- Panel attributes -->
<item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>
<item name="colorPrimaryDark">@color/primary_dark_material_dark</item>
@ -492,7 +493,7 @@
<item name="colorButtonNormal">@color/button_material_dark</item>
<item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>
<!-- Used by MediaRouter -->
<item name="isLightTheme">false</item>
</style>
<style name="Base.ThemeOverlay.AppCompat.Dark.ActionBar">
@ -523,7 +524,7 @@
<item name="colorButtonNormal">@color/button_material_light</item>
<item name="colorSwitchThumbNormal">@color/switch_thumb_material_light</item>
<!-- Used by MediaRouter -->
<item name="isLightTheme">true</item>
</style>
<style name="Base.V7.Theme.AppCompat" parent="Platform.AppCompat">
@ -533,7 +534,7 @@
<item name="windowActionModeOverlay">false</item>
<item name="actionBarPopupTheme">@null</item>
<!-- Used by MediaRouter -->
<item name="isLightTheme">false</item>
<item name="selectableItemBackground">@drawable/abc_item_background_holo_dark</item>
@ -544,7 +545,7 @@
<item name="dividerVertical">@drawable/abc_list_divider_mtrl_alpha</item>
<item name="dividerHorizontal">@drawable/abc_list_divider_mtrl_alpha</item>
<!-- Action Bar Styles -->
<item name="actionBarTabStyle">@style/Widget.AppCompat.ActionBar.TabView</item>
<item name="actionBarTabBarStyle">@style/Widget.AppCompat.ActionBar.TabBar</item>
<item name="actionBarTabTextStyle">@style/Widget.AppCompat.ActionBar.TabText</item>
@ -561,10 +562,10 @@
<item name="actionMenuTextAppearance">@style/TextAppearance.AppCompat.Widget.ActionBar.Menu</item>
<item name="actionMenuTextColor">?android:attr/textColorPrimaryDisableOnly</item>
<!-- Dropdown Spinner Attributes -->
<item name="actionDropDownStyle">@style/Widget.AppCompat.Spinner.DropDown.ActionBar</item>
<!-- Action Mode -->
<item name="actionModeStyle">@style/Widget.AppCompat.ActionMode</item>
<item name="actionModeBackground">@drawable/abc_cab_background_top_material</item>
<item name="actionModeSplitBackground">?attr/colorPrimaryDark</item>
@ -577,14 +578,14 @@
<item name="actionModeSelectAllDrawable">@drawable/abc_ic_menu_selectall_mtrl_alpha</item>
<item name="actionModeShareDrawable">@drawable/abc_ic_menu_share_mtrl_alpha</item>
<!-- Panel attributes -->
<item name="panelMenuListWidth">@dimen/abc_panel_menu_list_width</item>
<item name="panelMenuListTheme">@style/Theme.AppCompat.CompactMenu</item>
<item name="panelBackground">@drawable/abc_menu_hardkey_panel_mtrl_mult</item>
<item name="android:panelBackground">@android:color/transparent</item>
<item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>
<!-- List attributes -->
<item name="textAppearanceListItem">@style/TextAppearance.AppCompat.Subhead</item>
<item name="textAppearanceListItemSmall">@style/TextAppearance.AppCompat.Subhead</item>
<item name="listPreferredItemHeight">64dp</item>
@ -593,33 +594,33 @@
<item name="listPreferredItemPaddingLeft">@dimen/abc_list_item_padding_horizontal_material</item>
<item name="listPreferredItemPaddingRight">@dimen/abc_list_item_padding_horizontal_material</item>
<!-- Spinner styles -->
<item name="spinnerStyle">@style/Widget.AppCompat.Spinner</item>
<item name="android:spinnerItemStyle">@style/Widget.AppCompat.TextView.SpinnerItem</item>
<item name="android:dropDownListViewStyle">@style/Widget.AppCompat.ListView.DropDown</item>
<!-- Required for use of support_simple_spinner_dropdown_item.xml -->
<item name="spinnerDropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</item>
<item name="dropdownListPreferredItemHeight">?attr/listPreferredItemHeightSmall</item>
<!-- Popup Menu styles -->
<item name="popupMenuStyle">@style/Widget.AppCompat.PopupMenu</item>
<item name="textAppearanceLargePopupMenu">@style/TextAppearance.AppCompat.Widget.PopupMenu.Large</item>
<item name="textAppearanceSmallPopupMenu">@style/TextAppearance.AppCompat.Widget.PopupMenu.Small</item>
<item name="listPopupWindowStyle">@style/Widget.AppCompat.ListPopupWindow</item>
<item name="dropDownListViewStyle">?android:attr/dropDownListViewStyle</item>
<!-- SearchView attributes -->
<item name="searchViewStyle">@style/Widget.AppCompat.SearchView</item>
<item name="android:dropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</item>
<item name="textColorSearchUrl">@color/abc_search_url_text</item>
<item name="textAppearanceSearchResultTitle">@style/TextAppearance.AppCompat.SearchResult.Title</item>
<item name="textAppearanceSearchResultSubtitle">@style/TextAppearance.AppCompat.SearchResult.Subtitle</item>
<!-- ShareActionProvider attributes -->
<item name="activityChooserViewStyle">@style/Widget.AppCompat.ActivityChooserView</item>
<!-- Toolbar styles -->
<item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item>
<item name="toolbarNavigationButtonStyle">@style/Widget.AppCompat.Toolbar.Button.Navigation</item>
@ -628,7 +629,7 @@
<item name="editTextColor">?android:attr/textColorPrimary</item>
<item name="autoCompleteTextViewStyle">@style/Widget.AppCompat.AutoCompleteTextView</item>
<!-- Color palette -->
<item name="colorPrimaryDark">@color/primary_dark_material_dark</item>
<item name="colorPrimary">@color/primary_material_dark</item>
<item name="colorAccent">@color/accent_material_dark</item>
@ -649,7 +650,7 @@
<item name="ratingBarStyle">@style/Widget.AppCompat.RatingBar</item>
<item name="seekBarStyle">@style/Widget.AppCompat.SeekBar</item>
<!-- Button styles -->
<item name="buttonStyle">@style/Widget.AppCompat.Button</item>
<item name="buttonStyleSmall">@style/Widget.AppCompat.Button.Small</item>
<item name="android:textAppearanceButton">@style/TextAppearance.AppCompat.Widget.Button</item>
@ -662,7 +663,7 @@
<item name="buttonBarNegativeButtonStyle">?attr/buttonBarButtonStyle</item>
<item name="buttonBarNeutralButtonStyle">?attr/buttonBarButtonStyle</item>
<!-- Dialog attributes -->
<item name="dialogTheme">@style/Theme.AppCompat.Dialog</item>
<item name="dialogPreferredPadding">@dimen/abc_dialog_padding_material</item>
@ -672,8 +673,7 @@
<item name="textColorAlertDialogListItem">@color/abc_primary_text_material_dark</item>
<item name="listDividerAlertDialog">@null</item>
<!-- Define these here; ContextThemeWrappers around themes that define them should
always clear these values. -->
<item name="windowFixedWidthMajor">0dp</item>
<item name="windowFixedWidthMinor">0dp</item>
<item name="windowFixedHeightMajor">0dp</item>
@ -708,7 +708,7 @@
<item name="windowActionModeOverlay">false</item>
<item name="actionBarPopupTheme">@null</item>
<!-- Used by MediaRouter -->
<item name="isLightTheme">true</item>
<item name="selectableItemBackground">@drawable/abc_item_background_holo_light</item>
@ -719,7 +719,7 @@
<item name="dividerVertical">@drawable/abc_list_divider_mtrl_alpha</item>
<item name="dividerHorizontal">@drawable/abc_list_divider_mtrl_alpha</item>
<!-- Action Bar Styles -->
<item name="actionBarTabStyle">@style/Widget.AppCompat.Light.ActionBar.TabView</item>
<item name="actionBarTabBarStyle">@style/Widget.AppCompat.Light.ActionBar.TabBar</item>
<item name="actionBarTabTextStyle">@style/Widget.AppCompat.Light.ActionBar.TabText</item>
@ -736,7 +736,7 @@
<item name="actionMenuTextAppearance">@style/TextAppearance.AppCompat.Widget.ActionBar.Menu</item>
<item name="actionMenuTextColor">?android:attr/textColorPrimaryDisableOnly</item>
<!-- Action Mode -->
<item name="actionModeStyle">@style/Widget.AppCompat.ActionMode</item>
<item name="actionModeBackground">@drawable/abc_cab_background_top_material</item>
<item name="actionModeSplitBackground">?attr/colorPrimaryDark</item>
@ -749,17 +749,17 @@
<item name="actionModeSelectAllDrawable">@drawable/abc_ic_menu_selectall_mtrl_alpha</item>
<item name="actionModeShareDrawable">@drawable/abc_ic_menu_share_mtrl_alpha</item>
<!-- Dropdown Spinner Attributes -->
<item name="actionDropDownStyle">@style/Widget.AppCompat.Light.Spinner.DropDown.ActionBar</item>
<!-- Panel attributes -->
<item name="panelMenuListWidth">@dimen/abc_panel_menu_list_width</item>
<item name="panelMenuListTheme">@style/Theme.AppCompat.CompactMenu</item>
<item name="panelBackground">@drawable/abc_menu_hardkey_panel_mtrl_mult</item>
<item name="android:panelBackground">@android:color/transparent</item>
<item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_light</item>
<!-- List attributes -->
<item name="textAppearanceListItem">@style/TextAppearance.AppCompat.Subhead</item>
<item name="textAppearanceListItemSmall">@style/TextAppearance.AppCompat.Subhead</item>
<item name="listPreferredItemHeight">64dp</item>
@ -768,33 +768,33 @@
<item name="listPreferredItemPaddingLeft">@dimen/abc_list_item_padding_horizontal_material</item>
<item name="listPreferredItemPaddingRight">@dimen/abc_list_item_padding_horizontal_material</item>
<!-- Spinner styles -->
<item name="spinnerStyle">@style/Widget.AppCompat.Spinner</item>
<item name="android:spinnerItemStyle">@style/Widget.AppCompat.TextView.SpinnerItem</item>
<item name="android:dropDownListViewStyle">@style/Widget.AppCompat.ListView.DropDown</item>
<!-- Required for use of support_simple_spinner_dropdown_item.xml -->
<item name="spinnerDropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</item>
<item name="dropdownListPreferredItemHeight">?attr/listPreferredItemHeightSmall</item>
<!-- Popup Menu styles -->
<item name="popupMenuStyle">@style/Widget.AppCompat.Light.PopupMenu</item>
<item name="textAppearanceLargePopupMenu">@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large</item>
<item name="textAppearanceSmallPopupMenu">@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small</item>
<item name="listPopupWindowStyle">@style/Widget.AppCompat.ListPopupWindow</item>
<item name="dropDownListViewStyle">?android:attr/dropDownListViewStyle</item>
<!-- SearchView attributes -->
<item name="searchViewStyle">@style/Widget.AppCompat.Light.SearchView</item>
<item name="android:dropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</item>
<item name="textColorSearchUrl">@color/abc_search_url_text</item>
<item name="textAppearanceSearchResultTitle">@style/TextAppearance.AppCompat.SearchResult.Title</item>
<item name="textAppearanceSearchResultSubtitle">@style/TextAppearance.AppCompat.SearchResult.Subtitle</item>
<!-- ShareActionProvider attributes -->
<item name="activityChooserViewStyle">@style/Widget.AppCompat.ActivityChooserView</item>
<!-- Toolbar styles -->
<item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item>
<item name="toolbarNavigationButtonStyle">@style/Widget.AppCompat.Toolbar.Button.Navigation</item>
@ -803,7 +803,7 @@
<item name="editTextColor">?android:attr/textColorPrimary</item>
<item name="autoCompleteTextViewStyle">@style/Widget.AppCompat.AutoCompleteTextView</item>
<!-- Color palette -->
<item name="colorPrimaryDark">@color/primary_dark_material_light</item>
<item name="colorPrimary">@color/primary_material_light</item>
<item name="colorAccent">@color/accent_material_light</item>
@ -824,7 +824,7 @@
<item name="ratingBarStyle">@style/Widget.AppCompat.RatingBar</item>
<item name="seekBarStyle">@style/Widget.AppCompat.SeekBar</item>
<!-- Button styles -->
<item name="buttonStyle">@style/Widget.AppCompat.Button</item>
<item name="buttonStyleSmall">@style/Widget.AppCompat.Button.Small</item>
<item name="android:textAppearanceButton">@style/TextAppearance.AppCompat.Widget.Button</item>
@ -837,7 +837,7 @@
<item name="buttonBarNegativeButtonStyle">?attr/buttonBarButtonStyle</item>
<item name="buttonBarNeutralButtonStyle">?attr/buttonBarButtonStyle</item>
<!-- Dialog attributes -->
<item name="dialogTheme">@style/Theme.AppCompat.Light.Dialog</item>
<item name="dialogPreferredPadding">@dimen/abc_dialog_padding_material</item>
@ -847,8 +847,7 @@
<item name="textColorAlertDialogListItem">@color/abc_primary_text_material_light</item>
<item name="listDividerAlertDialog">@null</item>
<!-- Define these here; ContextThemeWrappers around themes that define them should
always clear these values. -->
<item name="windowFixedWidthMajor">0dp</item>
<item name="windowFixedWidthMinor">0dp</item>
<item name="windowFixedHeightMajor">0dp</item>
@ -1173,7 +1172,7 @@
<style name="Platform.AppCompat" parent="android:Theme">
<item name="android:windowNoTitle">true</item>
<!-- Window colors -->
<item name="android:colorForeground">@color/foreground_material_dark</item>
<item name="android:colorForegroundInverse">@color/foreground_material_light</item>
<item name="android:colorBackground">@color/background_material_dark</item>
@ -1182,7 +1181,7 @@
<item name="android:backgroundDimAmount">0.6</item>
<item name="android:windowBackground">@color/background_material_dark</item>
<!-- Text colors -->
<item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item>
<item name="android:textColorPrimaryDisableOnly">@color/abc_primary_text_disable_only_material_dark</item>
@ -1195,7 +1194,7 @@
<item name="android:textColorHighlight">@color/highlighted_text_material_dark</item>
<item name="android:textColorLink">?attr/colorAccent</item>
<!-- Text styles -->
<item name="android:textAppearance">@style/TextAppearance.AppCompat</item>
<item name="android:textAppearanceInverse">@style/TextAppearance.AppCompat.Inverse</item>
<item name="android:textAppearanceLarge">@style/TextAppearance.AppCompat.Large</item>
@ -1211,7 +1210,7 @@
<style name="Platform.AppCompat.Light" parent="android:Theme.Light">
<item name="android:windowNoTitle">true</item>
<!-- Window colors -->
<item name="android:colorForeground">@color/foreground_material_light</item>
<item name="android:colorForegroundInverse">@color/foreground_material_dark</item>
<item name="android:colorBackground">@color/background_material_light</item>
@ -1220,7 +1219,7 @@
<item name="android:backgroundDimAmount">0.6</item>
<item name="android:windowBackground">@color/background_material_light</item>
<!-- Text colors -->
<item name="android:textColorPrimary">@color/abc_primary_text_material_light</item>
<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_dark</item>
<item name="android:textColorSecondary">@color/abc_secondary_text_material_light</item>
@ -1234,7 +1233,7 @@
<item name="android:textColorHighlight">@color/highlighted_text_material_light</item>
<item name="android:textColorLink">?attr/colorAccent</item>
<!-- Text styles -->
<item name="android:textAppearance">@style/TextAppearance.AppCompat</item>
<item name="android:textAppearanceInverse">@style/TextAppearance.AppCompat.Inverse</item>
<item name="android:textAppearanceLarge">@style/TextAppearance.AppCompat.Large</item>
@ -1249,12 +1248,12 @@
</style>
<style name="Platform.ThemeOverlay.AppCompat" parent=""/>
<style name="Platform.ThemeOverlay.AppCompat.Dark">
<!-- Action Bar styles -->
<item name="actionBarItemBackground">@drawable/abc_item_background_holo_dark</item>
<item name="actionDropDownStyle">@style/Widget.AppCompat.Spinner.DropDown.ActionBar</item>
<item name="selectableItemBackground">@drawable/abc_item_background_holo_dark</item>
<!-- SearchView styles -->
<item name="android:autoCompleteTextViewStyle">@style/Widget.AppCompat.AutoCompleteTextView</item>
<item name="android:dropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</item>
</style>
@ -1263,7 +1262,7 @@
<item name="actionDropDownStyle">@style/Widget.AppCompat.Light.Spinner.DropDown.ActionBar</item>
<item name="selectableItemBackground">@drawable/abc_item_background_holo_light</item>
<!-- SearchView attributes -->
<item name="android:autoCompleteTextViewStyle">@style/Widget.AppCompat.Light.AutoCompleteTextView</item>
<item name="android:dropDownItemStyle">@style/Widget.AppCompat.DropDownItem.Spinner</item>
</style>

View File

@ -232,20 +232,20 @@ int bool abc_config_actionMenuItemAllCaps 0x7f080005
int bool abc_config_allowActionMenuItemTextWithIcon 0x7f080002
int bool abc_config_closeDialogWhenTouchOutside 0x7f080006
int bool abc_config_showMenuShortcutsWhenKeyboardPresent 0x7f080007
int color abc_background_cache_hint_selector_material_dark 0x7f0c004a
int color abc_background_cache_hint_selector_material_light 0x7f0c004b
int color abc_color_highlight_material 0x7f0c004c
int color abc_background_cache_hint_selector_material_dark 0x7f0c004b
int color abc_background_cache_hint_selector_material_light 0x7f0c004c
int color abc_color_highlight_material 0x7f0c004d
int color abc_input_method_navigation_guard 0x7f0c0000
int color abc_primary_text_disable_only_material_dark 0x7f0c004d
int color abc_primary_text_disable_only_material_light 0x7f0c004e
int color abc_primary_text_material_dark 0x7f0c004f
int color abc_primary_text_material_light 0x7f0c0050
int color abc_search_url_text 0x7f0c0051
int color abc_primary_text_disable_only_material_dark 0x7f0c004e
int color abc_primary_text_disable_only_material_light 0x7f0c004f
int color abc_primary_text_material_dark 0x7f0c0050
int color abc_primary_text_material_light 0x7f0c0051
int color abc_search_url_text 0x7f0c0052
int color abc_search_url_text_normal 0x7f0c0001
int color abc_search_url_text_pressed 0x7f0c0002
int color abc_search_url_text_selected 0x7f0c0003
int color abc_secondary_text_material_dark 0x7f0c0052
int color abc_secondary_text_material_light 0x7f0c0053
int color abc_secondary_text_material_dark 0x7f0c0053
int color abc_secondary_text_material_light 0x7f0c0054
int color accent_material_dark 0x7f0c0004
int color accent_material_light 0x7f0c0005
int color background_floating_material_dark 0x7f0c0006
@ -306,8 +306,8 @@ int color secondary_text_disabled_material_dark 0x7f0c003c
int color secondary_text_disabled_material_light 0x7f0c003d
int color switch_thumb_disabled_material_dark 0x7f0c003e
int color switch_thumb_disabled_material_light 0x7f0c003f
int color switch_thumb_material_dark 0x7f0c0054
int color switch_thumb_material_light 0x7f0c0055
int color switch_thumb_material_dark 0x7f0c0055
int color switch_thumb_material_light 0x7f0c0056
int color switch_thumb_normal_material_dark 0x7f0c0040
int color switch_thumb_normal_material_light 0x7f0c0041
int color toolbuttonActiveNotReady 0x7f0c0042
@ -317,7 +317,8 @@ int color toolbuttonInactiveReady 0x7f0c0045
int color toolbuttonLocked 0x7f0c0046
int color toolslotDisabled 0x7f0c0047
int color toolslotEnabled 0x7f0c0048
int color win 0x7f0c0049
int color toolslotEnabledSelected 0x7f0c0049
int color win 0x7f0c004a
int dimen abc_action_bar_content_inset_material 0x7f09000d
int dimen abc_action_bar_default_height_material 0x7f090001
int dimen abc_action_bar_default_padding_end_material 0x7f09000e

View File

@ -46,17 +46,22 @@ public class LevelsScreen extends Screen<LinearLayout> implements View.OnClickLi
topRow.removeAllViews();
bottomRow.removeAllViews();
levelButtons.clear();
int levelCount = levelPack.getLevels().size();
for (Level level : levelPack.getLevels())
createButton(activity, level);
createButton(activity, level, levelCount);
}
private void createButton(Context context, Level level) {
private void createButton(Context context, Level level, int levelCount) {
int levelNumber = level.getNumber();
LevelButton button = new LevelButton(context, typeface, this, levelNumber, !level.isUnlocked());
//TODO: light only collected star
button.setStarCount(level.getCollectedStars().length());
levelButtons.put(levelNumber, button);
if (levelNumber % 2 == 1)
int halfLevelCount = levelCount / 2;
if(levelCount % 2 == 1)
halfLevelCount++;
if (levelNumber <= halfLevelCount)
topRow.addView(button);
else
bottomRow.addView(button);

View File

@ -12,6 +12,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.entities.tools.ToolSlot;
import com.example.julian.endlessroll.entities.tools.ToolSlotSettings;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.levels.levelup.LevelUpBounties;
@ -28,7 +29,7 @@ import java.util.List;
/**
* Created by Julian on 08.07.2016.
*/
public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnDragListener, View.OnClickListener, View.OnTouchListener {
public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnClickListener, View.OnTouchListener {
private LevelUpBounties levelUpBounties;
private GameActivity activity;
@ -71,7 +72,7 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnDra
params.setMargins(20, 0, 20, 0);
for (ToolType type : ToolType.values()) {
if (type != ToolType.NONE) {
ToolOfferSlot slot = new ToolOfferSlot(this, activity, topBarData.getTypeface(), type, levelUpBounties);
ToolOfferSlot slot = new ToolOfferSlot(this, activity, topBarData.getTypeface(), type);
toolOfferSlots.add(slot);
toolOfferLayout.addView(slot.getLayout(), params);
}
@ -79,7 +80,7 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnDra
}
public void showPriceButton(ToolOfferSlot slot) {
selectedToolOfferSlot = slot;
setSelectedToolOfferSlot(slot);
int[] slotLocation = new int[2];
slot.getImage().getLocationOnScreen(slotLocation);
priceButton.setX(slotLocation[0]);
@ -90,10 +91,18 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnDra
priceButton.setVisibility(View.VISIBLE);
}
public void setSelectedToolOfferSlot(ToolOfferSlot slot) {
selectedToolOfferSlot = slot;
for(ToolOfferSlot offerSlot : toolOfferSlots){
if(!offerSlot.equals(slot))
offerSlot.setSelected(false);
}
}
private ImageView getToolSlotView(int id) {
FrameLayout slotLayout = (FrameLayout) layout.findViewById(id);
ImageView imageView = (ImageView) slotLayout.findViewById(R.id.toolslot_image);
imageView.setOnDragListener(this);
imageView.setOnClickListener(this);
return imageView;
}
@ -124,44 +133,6 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnDra
activity.flipToScreen(caller);
}
@Override
public boolean onDrag(View v, DragEvent event) {
if (event.getAction() == DragEvent.ACTION_DRAG_ENDED) {
for (ToolOfferSlot toolOfferSlot : toolOfferSlots)
toolOfferSlot.setDragged(false);
return true;
}
int slot = -1;
slot = v.equals(toolSlot1) ? 0 : slot;
slot = v.equals(toolSlot2) ? 1 : slot;
slot = v.equals(toolSlot3) ? 2 : slot;
slot = v.equals(toolSlot4) ? 3 : slot;
if (!slotSettings.get(slot).isLocked()) {
if (event.getAction() == DragEvent.ACTION_DRAG_ENTERED) {
//TODO: animation
}
if (event.getAction() == DragEvent.ACTION_DRAG_EXITED) {
//TODO: ggf. animation
}
if (event.getAction() == DragEvent.ACTION_DROP) {
//TODO: animation??
slotSettings.changeToolSlotType(slot, getDraggedToolType());
prepareToBeShown();
dataStorageHandler.writeUserData(user);
}
}
return true;
}
private ToolType getDraggedToolType() {
for (ToolOfferSlot toolOfferSlot : toolOfferSlots) {
if (toolOfferSlot.isDragged())
return toolOfferSlot.getToolType();
}
return ToolType.NONE;
}
@Override
public void onClick(View v) {
if (v.equals(layout)) {
@ -175,6 +146,17 @@ public class ToolShopScreen extends Screen<RelativeLayout> implements View.OnDra
topBar.update();
dataStorageHandler.writeBoughtTools();
}
int slot = -1;
slot = v.equals(toolSlot1) ? 0 : slot;
slot = v.equals(toolSlot2) ? 1 : slot;
slot = v.equals(toolSlot3) ? 2 : slot;
slot = v.equals(toolSlot4) ? 3 : slot;
if (slot != -1 && !slotSettings.get(slot).isLocked() && selectedToolOfferSlot != null && selectedToolOfferSlot.isBought()) {
slotSettings.changeToolSlotType(slot, selectedToolOfferSlot.getToolType());
selectedToolOfferSlot.setSelected(false);
prepareToBeShown();
dataStorageHandler.writeUserData(user);
}
}
@Override

View File

@ -1,6 +1,5 @@
package com.example.julian.endlessroll.views;
import android.content.ClipData;
import android.content.Context;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
@ -14,42 +13,46 @@ import android.widget.TextView;
import com.example.julian.endlessroll.R;
import com.example.julian.endlessroll.entities.tools.ToolType;
import com.example.julian.endlessroll.levels.levelup.LevelUpBounties;
import com.example.julian.endlessroll.main.screens.ToolShopScreen;
/**
* Created by Julian on 16.07.2016.
*/
public class ToolOfferSlot implements View.OnClickListener, View.OnLongClickListener {
public class ToolOfferSlot implements View.OnClickListener {
private ToolShopScreen toolShopScreen;
private boolean dragged;
private Context context;
private ToolType toolType;
private LevelUpBounties levelUpBounties;
private boolean locked;
private boolean bought;
private boolean selected;
private int colorDisabled;
private int colorEnabled;
private int colorEnabledSelected;
private LinearLayout layout;
private TextView title;
private ImageView image;
public ToolOfferSlot(ToolShopScreen toolShopScreen, Context context, Typeface typeface, ToolType toolType, LevelUpBounties levelUpBounties) {
public ToolOfferSlot(ToolShopScreen toolShopScreen, Context context, Typeface typeface, ToolType toolType) {
this.toolShopScreen = toolShopScreen;
this.context = context;
this.toolType = toolType;
this.levelUpBounties = levelUpBounties;
bought = toolType.isBought();
LayoutInflater inflater = LayoutInflater.from(context);
layout = (LinearLayout) inflater.inflate(R.layout.tool_offer_slot, null);
layout.setOnClickListener(this);
layout.setOnLongClickListener(this);
FrameLayout slotLayout = (FrameLayout) layout.findViewById(R.id.toolofferslot_slot);
title = (TextView) layout.findViewById(R.id.toolofferslot_title);
title.setTypeface(typeface);
image = (ImageView) slotLayout.findViewById(R.id.toolslot_image);
image.setBackgroundDrawable(createColoredBackground());
setLocked(false);
colorDisabled = context.getResources().getColor(R.color.toolslotDisabled);
colorEnabled = context.getResources().getColor(R.color.toolslotEnabled);
colorEnabledSelected = context.getResources().getColor(R.color.toolslotEnabledSelected);
}
public void setLocked(boolean locked) {
@ -63,23 +66,36 @@ public class ToolOfferSlot implements View.OnClickListener, View.OnLongClickList
}
}
public void updateIsBought(){
public boolean isBought() {
return bought;
}
public void updateIsBought() {
bought = toolType.isBought();
image.setBackgroundDrawable(createColoredBackground());
}
public void setSelected(boolean selected) {
this.selected = selected;
image.setBackgroundDrawable(createColoredBackground());
}
public void buy() {
this.bought = true;
toolType.setBought(true);
toolShopScreen.setSelectedToolOfferSlot(null);
setColor(R.color.toolslotEnabled);
}
private Drawable createColoredBackground() {
GradientDrawable gd = new GradientDrawable();
if (bought) {
gd.setColor(context.getResources().getColor(R.color.toolslotEnabled));
if (selected)
gd.setColor(colorEnabledSelected);
else
gd.setColor(colorEnabled);
} else {
gd.setColor(context.getResources().getColor(R.color.toolslotDisabled));
gd.setColor(colorDisabled);
}
gd.setCornerRadius(10);
return gd;
@ -102,7 +118,7 @@ public class ToolOfferSlot implements View.OnClickListener, View.OnLongClickList
return layout;
}
public ImageView getImage(){
public ImageView getImage() {
return image;
}
@ -110,26 +126,10 @@ public class ToolOfferSlot implements View.OnClickListener, View.OnLongClickList
public void onClick(View v) {
if (!locked && !bought) {
toolShopScreen.showPriceButton(this);
} else if (bought) {
selected = true;
image.setBackgroundDrawable(createColoredBackground());
toolShopScreen.setSelectedToolOfferSlot(this);
}
}
@Override
public boolean onLongClick(View v) {
if (!locked && bought) {
dragged = true;
ClipData clipData = ClipData.newPlainText("", "");
View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(image);
image.startDrag(clipData, shadowBuilder, image, 0);
return true;
}
return false;
}
public boolean isDragged() {
return dragged;
}
public void setDragged(boolean dragged) {
this.dragged = dragged;
}
}

View File

@ -13,6 +13,7 @@
<color name="toolbuttonLocked">#db494b49</color>
<color name="toolslotDisabled">#715f5f</color>
<color name="toolslotEnabled">#db41e42b</color>
<color name="toolslotEnabledSelected">#b3d700</color>
<color name="countdown3">#f0f41e02</color>
<color name="countdown2">#f0f28117</color>
<color name="countdown1">#f0d7b106</color>