Clockplus/app/src/main/res/values/styles.xml
2016-08-24 01:23:01 -07:00

129 lines
6.0 KiB
XML

<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<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="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<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>
<!-- TODO: Consider making a dark themed Divider too. -->
<style name="Divider">
<!-- Won't be visible in a bottom sheet dialog... -->
<!--<item name="android:background">?android:attr/listDivider</item>-->
<!-- Extracted from the drawable pointed to by the attr. Visible in bottom sheet. -->
<item name="android:background">#1f000000</item> <!-- 12% black -->
<item name="android:tint">?android:attr/colorForeground</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">?android:attr/colorAccent</item>
</style>
<style name="BottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/ModalStyle</item>
</style>
<style name="ModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="behavior_peekHeight">@dimen/peek_height_upper_limit</item>
</style>
</resources>