Wizard refactor: beginning
This commit is contained in:
@@ -41,4 +41,6 @@
|
||||
<color name="cpp_text_primary">#ddffffff</color>
|
||||
<color name="cpp_text_secondary">#89ffffff</color>
|
||||
<color name="cpp_widget_ripple">#40ffffff</color>
|
||||
|
||||
<color name="cpp_wizard_text">#707070</color>
|
||||
</resources>
|
@@ -35,4 +35,8 @@
|
||||
<dimen name="cpp_display_padding">3dp</dimen>
|
||||
|
||||
<dimen name="cpp_widget_keyboard_button_text_size">20dp</dimen>
|
||||
|
||||
<dimen name="activity_horizontal_margin">5dp</dimen>
|
||||
<dimen name="activity_vertical_margin">5dp</dimen>
|
||||
<dimen name="control_margin">5dp</dimen>
|
||||
</resources>
|
@@ -8,4 +8,9 @@
|
||||
<string name="cpp_clear_history_title">Clear history?</string>
|
||||
<string name="cpp_clear_history_message">All history will be cleared.</string>
|
||||
<string name="cpp_clear_history">Clear</string>
|
||||
<string name="wizard_start">Start wizard</string>
|
||||
<string name="wizard_next">Next</string>
|
||||
<string name="wizard_prev">Back</string>
|
||||
<string name="wizard_final">The app is set up and ready to use.</string>
|
||||
<string name="wizard_skip">Skip</string>
|
||||
</resources>
|
@@ -145,4 +145,41 @@
|
||||
<item name="android:padding">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="BaseWizardButtons">
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginTop">@dimen/control_margin</item>
|
||||
<item name="android:layout_gravity">top|center_horizontal</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
<style name="WizardButton" parent="MaterialButton">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:lines">1</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
|
||||
</style>
|
||||
|
||||
<style name="WizardPrimaryButton" parent="PrimaryButton">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:lines">1</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
|
||||
</style>
|
||||
|
||||
<style name="WizardButtons" parent="BaseWizardButtons"/>
|
||||
<style name="PrimaryButton" parent="MaterialButton">
|
||||
</style>
|
||||
|
||||
<style name="WizardFragment">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:paddingLeft">10dp</item>
|
||||
<item name="android:paddingRight">10dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
</resources>
|
@@ -48,6 +48,11 @@
|
||||
<item name="android:padding">6dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Wizard" parent="cpp_metro_blue_theme">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:background">@color/cpp_metro_button_light</item>
|
||||
</style>
|
||||
|
||||
<style name="cpp_metro_blue_theme" parent="cpp_gray_theme">
|
||||
<item name="cpp_digit_button_style">@style/metro_digit_button_style</item>
|
||||
<item name="cpp_control_button_style">@style/metro_control_button_style</item>
|
||||
|
129
android-app/src/main/res/values/vpi__attrs.xml
Normal file
129
android-app/src/main/res/values/vpi__attrs.xml
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 Jake Wharton
|
||||
Copyright (C) 2011 Patrik Åkerfeldt
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<declare-styleable name="ViewPagerIndicator">
|
||||
<!-- Style of the circle indicator. -->
|
||||
<attr name="vpiCirclePageIndicatorStyle" format="reference"/>
|
||||
<!-- Style of the icon indicator's views. -->
|
||||
<attr name="vpiIconPageIndicatorStyle" format="reference"/>
|
||||
<!-- Style of the line indicator. -->
|
||||
<attr name="vpiLinePageIndicatorStyle" format="reference"/>
|
||||
<!-- Style of the title indicator. -->
|
||||
<attr name="vpiTitlePageIndicatorStyle" format="reference"/>
|
||||
<!-- Style of the tab indicator's tabs. -->
|
||||
<attr name="vpiTabPageIndicatorStyle" format="reference"/>
|
||||
<!-- Style of the underline indicator. -->
|
||||
<attr name="vpiUnderlinePageIndicatorStyle" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<attr name="centered" format="boolean" />
|
||||
<attr name="selectedColor" format="color" />
|
||||
<attr name="strokeWidth" format="dimension" />
|
||||
<attr name="unselectedColor" format="color" />
|
||||
|
||||
<declare-styleable name="CirclePageIndicator">
|
||||
<!-- Whether or not the indicators should be centered. -->
|
||||
<attr name="centered" />
|
||||
<!-- Color of the filled circle that represents the current page. -->
|
||||
<attr name="fillColor" format="color" />
|
||||
<!-- Color of the filled circles that represents pages. -->
|
||||
<attr name="pageColor" format="color" />
|
||||
<!-- Orientation of the indicator. -->
|
||||
<attr name="android:orientation"/>
|
||||
<!-- Radius of the circles. This is also the spacing between circles. -->
|
||||
<attr name="radius" format="dimension" />
|
||||
<!-- Whether or not the selected indicator snaps to the circles. -->
|
||||
<attr name="snap" format="boolean" />
|
||||
<!-- Color of the open circles. -->
|
||||
<attr name="strokeColor" format="color" />
|
||||
<!-- Width of the stroke used to draw the circles. -->
|
||||
<attr name="strokeWidth" />
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="LinePageIndicator">
|
||||
<!-- Whether or not the indicators should be centered. -->
|
||||
<attr name="centered" />
|
||||
<!-- Color of the unselected lines that represent the pages. -->
|
||||
<attr name="unselectedColor" />
|
||||
<!-- Color of the selected line that represents the current page. -->
|
||||
<attr name="selectedColor" />
|
||||
<!-- Width of each indicator line. -->
|
||||
<attr name="lineWidth" format="dimension" />
|
||||
<!-- Width of each indicator line's stroke. -->
|
||||
<attr name="strokeWidth" />
|
||||
<!-- Width of the gap between each indicator line. -->
|
||||
<attr name="gapWidth" format="dimension" />
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="TitlePageIndicator">
|
||||
<!-- Screen edge padding. -->
|
||||
<attr name="clipPadding" format="dimension" />
|
||||
<!-- Color of the footer line and indicator. -->
|
||||
<attr name="footerColor" format="color" />
|
||||
<!-- Height of the footer line. -->
|
||||
<attr name="footerLineHeight" format="dimension" />
|
||||
<!-- Style of the indicator. Default is triangle. -->
|
||||
<attr name="footerIndicatorStyle">
|
||||
<enum name="none" value="0" />
|
||||
<enum name="triangle" value="1" />
|
||||
<enum name="underline" value="2" />
|
||||
</attr>
|
||||
<!-- Height of the indicator above the footer line. -->
|
||||
<attr name="footerIndicatorHeight" format="dimension" />
|
||||
<!-- Left and right padding of the underline indicator. -->
|
||||
<attr name="footerIndicatorUnderlinePadding" format="dimension" />
|
||||
<!-- Padding between the bottom of the title and the footer. -->
|
||||
<attr name="footerPadding" format="dimension" />
|
||||
<!-- Position of the line. -->
|
||||
<attr name="linePosition">
|
||||
<enum name="bottom" value="0"/>
|
||||
<enum name="top" value="1"/>
|
||||
</attr>
|
||||
<!-- Color of the selected title. -->
|
||||
<attr name="selectedColor" />
|
||||
<!-- Whether or not the selected item is displayed as bold. -->
|
||||
<attr name="selectedBold" format="boolean" />
|
||||
<!-- Color of regular titles. -->
|
||||
<attr name="android:textColor" />
|
||||
<!-- Size of title text. -->
|
||||
<attr name="android:textSize" />
|
||||
<!-- Padding between titles when bumping into each other. -->
|
||||
<attr name="titlePadding" format="dimension" />
|
||||
<!-- Padding between titles and the top of the View. -->
|
||||
<attr name="topPadding" format="dimension" />
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="UnderlinePageIndicator">
|
||||
<!-- Whether or not the selected indicator fades. -->
|
||||
<attr name="fades" format="boolean" />
|
||||
<!-- Length of the delay to fade the indicator. -->
|
||||
<attr name="fadeDelay" format="integer" />
|
||||
<!-- Length of the indicator fade to transparent. -->
|
||||
<attr name="fadeLength" format="integer" />
|
||||
<!-- Color of the selected line that represents the current page. -->
|
||||
<attr name="selectedColor" />
|
||||
<!-- View background -->
|
||||
<attr name="android:background"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
53
android-app/src/main/res/values/vpi__defaults.xml
Normal file
53
android-app/src/main/res/values/vpi__defaults.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 Jake Wharton
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<bool name="default_circle_indicator_centered">true</bool>
|
||||
<color name="default_circle_indicator_fill_color">#FFFFFFFF</color>
|
||||
<color name="default_circle_indicator_page_color">#00000000</color>
|
||||
<integer name="default_circle_indicator_orientation">0</integer>
|
||||
<dimen name="default_circle_indicator_radius">3dp</dimen>
|
||||
<bool name="default_circle_indicator_snap">false</bool>
|
||||
<color name="default_circle_indicator_stroke_color">@color/cpp_metro_button_light</color>
|
||||
<dimen name="default_circle_indicator_stroke_width">1px</dimen>
|
||||
|
||||
<dimen name="default_line_indicator_line_width">12dp</dimen>
|
||||
<dimen name="default_line_indicator_gap_width">4dp</dimen>
|
||||
<dimen name="default_line_indicator_stroke_width">1dp</dimen>
|
||||
<color name="default_line_indicator_selected_color">#FF33B5E5</color>
|
||||
<color name="default_line_indicator_unselected_color">#FFBBBBBB</color>
|
||||
<bool name="default_line_indicator_centered">true</bool>
|
||||
|
||||
<dimen name="default_title_indicator_clip_padding">4dp</dimen>
|
||||
<color name="default_title_indicator_footer_color">#FF33B5E5</color>
|
||||
<dimen name="default_title_indicator_footer_line_height">2dp</dimen>
|
||||
<integer name="default_title_indicator_footer_indicator_style">2</integer>
|
||||
<dimen name="default_title_indicator_footer_indicator_height">4dp</dimen>
|
||||
<dimen name="default_title_indicator_footer_indicator_underline_padding">20dp</dimen>
|
||||
<dimen name="default_title_indicator_footer_padding">7dp</dimen>
|
||||
<integer name="default_title_indicator_line_position">0</integer>
|
||||
<color name="default_title_indicator_selected_color">#FFFFFFFF</color>
|
||||
<bool name="default_title_indicator_selected_bold">true</bool>
|
||||
<color name="default_title_indicator_text_color">#BBFFFFFF</color>
|
||||
<dimen name="default_title_indicator_text_size">15dp</dimen>
|
||||
<dimen name="default_title_indicator_title_padding">5dp</dimen>
|
||||
<dimen name="default_title_indicator_top_padding">7dp</dimen>
|
||||
|
||||
<bool name="default_underline_indicator_fades">true</bool>
|
||||
<integer name="default_underline_indicator_fade_delay">300</integer>
|
||||
<integer name="default_underline_indicator_fade_length">400</integer>
|
||||
<color name="default_underline_indicator_selected_color">#FF33B5E5</color>
|
||||
</resources>
|
Reference in New Issue
Block a user