179 lines
8.6 KiB
XML
179 lines
8.6 KiB
XML
<resources>
|
|
|
|
<!-- Base application theme. -->
|
|
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
|
<item name="colorPrimary">@color/colorPrimary</item>
|
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
|
<item name="colorAccent">@color/colorAccent</item>
|
|
<!-- TODO: This doesn't work for BottomSheetDialogs. Verify this works for other types of dialogs. -->
|
|
<!--<item name="dialogTheme">@style/AppCompatDialogTheme</item>-->
|
|
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyle</item>
|
|
<item name="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item>
|
|
<item name="themedIconTint">@color/icon_color</item>
|
|
<item name="android:textColorHint">@color/text_color_disabled_light</item>
|
|
</style>
|
|
|
|
<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
|
|
<item name="colorPrimary">@color/colorPrimaryInverse</item>
|
|
<item name="colorPrimaryDark">@color/colorPrimaryDarkInverse</item>
|
|
<item name="colorAccent">@color/colorAccentInverse</item>
|
|
<!-- TODO: This doesn't work for BottomSheetDialogs. Verify this works for other types of dialogs. -->
|
|
<!--<item name="dialogTheme">@style/AppCompatDialogTheme.Dark</item>-->
|
|
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyle.Dark</item>
|
|
<!--TODO: Dark theme-->
|
|
<item name="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item>
|
|
<item name="themedIconTint">@color/icon_color_dark</item>
|
|
<item name="android:textColorHint">@color/text_color_disabled_dark</item>
|
|
</style>
|
|
|
|
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
|
|
|
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
|
|
|
|
<style name="AppTheme.TextOverlay" parent="ThemeOverlay.AppCompat.Dark">
|
|
|
|
</style>
|
|
|
|
<style name="NumberButton">
|
|
<item name="android:layout_width">0dp</item>
|
|
<item name="android:layout_height">match_parent</item>
|
|
<item name="android:layout_weight">1</item>
|
|
<item name="android:padding">12dp</item>
|
|
<item name="android:background">?android:attr/selectableItemBackground</item>
|
|
<item name="android:textSize">28sp</item>
|
|
</style>
|
|
|
|
<style name="grid_element_single">
|
|
<item name="android:background">?android:attr/selectableItemBackground</item>
|
|
<item name="android:textSize">@dimen/grid_element_text_size</item>
|
|
</style>
|
|
|
|
<!-- TODO: Rename to GridLayoutElement -->
|
|
<style name="GridLayoutNumpadElement">
|
|
<!-- http://stackoverflow.com/a/6868308/5055032
|
|
Leave off the namespace to reference a custom attribute.
|
|
Here, we are referencing the "grid:" namespace -->
|
|
<item name="layout_columnWeight">1</item>
|
|
<!--<item name="layout_rowWeight">1</item>-->
|
|
<item name="android:layout_height">@dimen/numeric_keypad_cell_height</item>
|
|
<item name="android:background">?android:attr/selectableItemBackground</item>
|
|
<item name="android:gravity">center</item>
|
|
</style>
|
|
|
|
<!-- TODO: Rename to GridLayout[Text/Button/TextView]? -->
|
|
<style name="GridLayoutNumpadButton" parent="GridLayoutNumpadElement">
|
|
<item name="android:textSize">@dimen/grid_element_text_size</item>
|
|
<item name="android:fontFamily">sans-serif-light</item>
|
|
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
|
</style>
|
|
|
|
<style name="GridLayoutNumpadButton.Inverse">
|
|
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
|
|
</style>
|
|
|
|
<style name="NumberGridButton" parent="GridLayoutNumpadButton">
|
|
<!-- TODO: Do we need this anymore? -->
|
|
<!-- This should give us 87% black. By default, TextView has a grayish text color.
|
|
The reason GridLayoutNumpadButton style used in the NumpadTimerPickerDialog is 87% black
|
|
already is because the numpad's buttons are actually of type Button. For whatever reason,
|
|
I decided to make the buttons for the NumbersGrid of type TextView... -->
|
|
<!--<item name="android:textColor">?android:attr/textColorPrimary</item>-->
|
|
</style>
|
|
<style name="NumberGridButton.Hour">
|
|
<item name="android:layout_height">@dimen/number_grid_hour_cell_height</item>
|
|
</style>
|
|
<style name="NumberGridButton.Minute">
|
|
<!-- Lowered text size, otherwise it looks weird that the minute grid, with 5 rows
|
|
of buttons, has the same text size as the hours grid, with 4 rows of buttons; they look
|
|
too big, and the space between them is smaller. -->
|
|
<item name="android:textSize">@dimen/number_grid_minute_text_size</item>
|
|
<item name="android:layout_height">@dimen/number_grid_minute_cell_height</item>
|
|
</style>
|
|
|
|
<!-- TODO: Replace and Delete -->
|
|
<style name="hybrid_time_picker_grid_element">
|
|
<item name="android:layout_width">@dimen/grid_element_touch_target</item>
|
|
<item name="android:layout_height">@dimen/grid_element_touch_target</item>
|
|
<item name="android:gravity">center</item>
|
|
<item name="android:textSize">20sp</item>
|
|
<!-- http://stackoverflow.com/a/6868308/5055032
|
|
Leave off the namespace to reference a custom attribute.
|
|
Here, we are referencing the "grid:" namespace -->
|
|
<item name="layout_columnWeight">1</item>
|
|
<item name="layout_rowWeight">1</item>
|
|
<item name="layout_gravity">center</item>
|
|
</style>
|
|
|
|
<style name="Divider">
|
|
<!-- This is robust against dark/light theme changes. -->
|
|
<!-- Normally not visible in bottom sheets; workaround is to manually change the background color of the divider-->
|
|
<item name="android:background">?android:attr/listDivider</item>
|
|
</style>
|
|
|
|
<style name="Divider.Horizontal">
|
|
<item name="android:layout_width">match_parent</item>
|
|
<item name="android:layout_height">1dp</item>
|
|
</style>
|
|
|
|
<style name="Divider.Vertical">
|
|
<item name="android:layout_width">1dp</item>
|
|
<item name="android:layout_height">match_parent</item>
|
|
</style>
|
|
|
|
<style name="FocusGrabber">
|
|
<item name="android:layout_width">0dp</item>
|
|
<item name="android:layout_height">0dp</item>
|
|
<!-- We need both focusable attrs for requestFocus() to succeed -->
|
|
<item name="android:focusable">true</item>
|
|
<item name="android:focusableInTouchMode">true</item>
|
|
</style>
|
|
|
|
<!-- Style for AppCompatDialog from the v7 support library -->
|
|
<style name="AppCompatDialogTheme" parent="Theme.AppCompat.Light.Dialog">
|
|
<item name="colorAccent">@color/colorAccent</item>
|
|
</style>
|
|
|
|
<style name="AppCompatDialogTheme.Dark" parent="Theme.AppCompat.Dialog">
|
|
<item name="colorAccent">@color/colorAccent</item>
|
|
</style>
|
|
|
|
<style name="AppCompatAlertDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
|
|
<!-- Trying to use the colorAccent attribute (whether from ?android:attr or ?attr) WILL CRASH.-->
|
|
<item name="colorAccent">@color/colorAccent</item>
|
|
</style>
|
|
<style name="AppCompatAlertDialogStyle.Dark" parent="Theme.AppCompat.Dialog.Alert">
|
|
<!-- Trying to use the colorAccent attribute (whether from ?android:attr or ?attr) WILL CRASH.-->
|
|
<item name="colorAccent">@color/colorAccent</item>
|
|
</style>
|
|
|
|
<style name="BottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
|
|
<item name="bottomSheetStyle">@style/ModalStyle</item>
|
|
<!--TODO: See if defining a colorAccent item works.-->
|
|
</style>
|
|
|
|
<style name="ModalStyle" parent="Widget.Design.BottomSheet.Modal">
|
|
<!-- TODO: See if this can be set programmatically, or else we'd have to force users
|
|
~ to declare a bottomSheetDialogTheme in their theme.
|
|
-->
|
|
<item name="behavior_peekHeight">@dimen/peek_height_upper_limit</item>
|
|
</style>
|
|
|
|
<!--Style for SeekBar that spans full width-->
|
|
<style name="BaseSeekBar">
|
|
<item name="android:layout_width">match_parent</item>
|
|
<item name="android:layout_height">wrap_content</item>
|
|
<item name="android:paddingStart">0dp</item>
|
|
<item name="android:paddingEnd">0dp</item>
|
|
</style>
|
|
|
|
<!--Style for a button that opens an AddLabelDialog-->
|
|
<style name="BaseLabel" parent="TextAppearance.AppCompat">
|
|
<item name="android:layout_width">wrap_content</item>
|
|
<item name="android:layout_height">wrap_content</item>
|
|
<item name="android:hint">@string/label</item>
|
|
<item name="android:ellipsize">end</item>
|
|
<item name="android:maxLines">1</item>
|
|
<item name="android:textSize">@dimen/text_size_subhead</item>
|
|
</style>
|
|
</resources>
|