Material buttons are now used in a wizard
This commit is contained in:
parent
99033ab216
commit
983d6eb2f9
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/cpp_wizard_button_pressed" android:state_enabled="true" android:state_pressed="true" />
|
||||
<item android:color="@color/cpp_wizard_button_disabled" android:state_enabled="false" />
|
||||
<item android:color="@color/cpp_wizard_button_normal" />
|
||||
</selector>
|
@ -24,5 +24,5 @@
|
||||
|
||||
<ripple xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
a:color="?attr/colorControlHighlight">
|
||||
<item a:drawable="@drawable/metro_material_button_shape" />
|
||||
<item a:drawable="@drawable/cpp_wizard_button_shape_normal" />
|
||||
</ripple>
|
@ -23,6 +23,6 @@
|
||||
-->
|
||||
|
||||
<selector xmlns:a="http://schemas.android.com/apk/res/android">
|
||||
<item a:state_pressed="true" a:drawable="@drawable/metro_button_pressed"/>
|
||||
<item a:drawable="@drawable/metro_material_button_shape"/>
|
||||
<item a:state_pressed="true" a:drawable="@drawable/cpp_wizard_button_shape_pressed"/>
|
||||
<item a:drawable="@drawable/cpp_wizard_button_shape_normal"/>
|
||||
</selector>
|
@ -21,6 +21,6 @@
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#5a595b"/>
|
||||
<solid android:color="@color/cpp_wizard_button_normal"/>
|
||||
<corners android:radius="1dp"/>
|
||||
</shape>
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright 2013 serso aka se.solovyev
|
||||
~
|
||||
~ 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.
|
||||
~
|
||||
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Contact details
|
||||
~
|
||||
~ Email: se.solovyev@gmail.com
|
||||
~ Site: http://se.solovyev.org
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/cpp_wizard_button_pressed"/>
|
||||
<corners android:radius="1dp"/>
|
||||
</shape>
|
@ -39,8 +39,8 @@
|
||||
a:textStyle="bold"
|
||||
a:text="@string/cpp_wizard_dragbutton_action_center"
|
||||
style="@style/WizardLabel"
|
||||
a:minLines="2"
|
||||
a:maxLines="2"/>
|
||||
a:minLines="3"
|
||||
a:maxLines="3"/>
|
||||
|
||||
<org.solovyev.android.view.drag.DirectionDragButton
|
||||
a:layout_margin="0dp"
|
||||
@ -51,7 +51,7 @@
|
||||
a:layout_weight="0"
|
||||
a:layout_gravity="center"
|
||||
a:id="@+id/wizard_dragbutton"
|
||||
a:background="@drawable/metro_material_button"
|
||||
a:background="@drawable/cpp_wizard_button_selector"
|
||||
a:text="9"
|
||||
c:textDown="^2"
|
||||
c:textUp="%"
|
||||
|
@ -3,16 +3,19 @@
|
||||
<LinearLayout
|
||||
style="@style/WizardButtons"
|
||||
xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:my="http://schemas.android.com/apk/res-auto"
|
||||
a:layout_gravity="center_horizontal|bottom"
|
||||
a:gravity="center">
|
||||
|
||||
<Button
|
||||
<org.solovyev.android.material.MaterialButton
|
||||
style="@style/MaterialButton.Wizard"
|
||||
a:id="@+id/wizard_prev"
|
||||
a:layout_width="0dp"
|
||||
a:layout_height="wrap_content"
|
||||
a:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
<org.solovyev.android.material.MaterialButton
|
||||
style="@style/MaterialButton.Wizard"
|
||||
a:id="@+id/wizard_next"
|
||||
a:layout_width="0dp"
|
||||
a:layout_height="wrap_content"
|
||||
|
@ -29,7 +29,10 @@
|
||||
<color name="cpp_button_text_ce">#ffffffff</color>
|
||||
<color name="cpp_selected_angle_unit_text">#ffffff99</color>
|
||||
<color name="cpp_main_bg">#ff000000</color>
|
||||
<color name="cpp_wizard_bg">#ff374248</color>
|
||||
<color name="cpp_wizard_bg">#212121</color>
|
||||
<color name="cpp_wizard_button_normal">#424242</color>
|
||||
<color name="cpp_wizard_button_disabled">#616161</color>
|
||||
<color name="cpp_wizard_button_pressed">#757575</color>
|
||||
<color name="cpp_pane_background">#ff1f1f1f</color>
|
||||
<color name="cpp_metro_button_dark">#ff000000</color>
|
||||
<color name="cpp_metro_button">#212121</color>
|
||||
@ -43,5 +46,5 @@
|
||||
<color name="cpp_text_secondary">#89ffffff</color>
|
||||
<color name="cpp_widget_ripple">#40ffffff</color>
|
||||
|
||||
<color name="cpp_wizard_disabled_text">#88ffffff</color>
|
||||
<color name="cpp_wizard_disabled_text">#66ffffff</color>
|
||||
</resources>
|
@ -191,4 +191,10 @@
|
||||
<item name="android:paddingRight">10dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="MaterialButton.Wizard" parent="MaterialButton">
|
||||
<item name="android:textColor">@color/cpp_text</item>
|
||||
<item name="materialColor">@color/cpp_wizard_button_selector</item>
|
||||
<item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
|
||||
</style>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user