diff --git a/app/src/main/java/com/philliphsu/clock2/aospdatetimepicker/AccessibleTextView.java b/app/src/main/java/com/philliphsu/clock2/aospdatetimepicker/AccessibleTextView.java new file mode 100644 index 0000000..5b29a66 --- /dev/null +++ b/app/src/main/java/com/philliphsu/clock2/aospdatetimepicker/AccessibleTextView.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * 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. + */ + +package com.philliphsu.clock2.aospdatetimepicker; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityNodeInfo; +import android.widget.Button; +import android.widget.TextView; + +/** + * Fake Button class, used so TextViews can announce themselves as Buttons, for accessibility. + */ +public class AccessibleTextView extends TextView { + + public AccessibleTextView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + public void onInitializeAccessibilityEvent(AccessibilityEvent event) { + super.onInitializeAccessibilityEvent(event); + event.setClassName(Button.class.getName()); + } + + @Override + public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfo(info); + info.setClassName(Button.class.getName()); + } +} diff --git a/app/src/main/res/layout/dialog_time_picker_number_grid.xml b/app/src/main/res/layout/dialog_time_picker_number_grid.xml index 71df5a1..5e978ab 100644 --- a/app/src/main/res/layout/dialog_time_picker_number_grid.xml +++ b/app/src/main/res/layout/dialog_time_picker_number_grid.xml @@ -1,13 +1,26 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/aosp_datetimepicker_colors.xml b/app/src/main/res/values/aosp_datetimepicker_colors.xml new file mode 100644 index 0000000..1cc249e --- /dev/null +++ b/app/src/main/res/values/aosp_datetimepicker_colors.xml @@ -0,0 +1,52 @@ + + + + + #f2f2f2 + #cccccc + #8c8c8c + #000000 + #cccccc + #8c8c8c + + #7f000000 + #33b5e5 + #c1e8f7 + #33999999 + #0099cc + #ff999999 + #ccc + + #999999 + #f2f2f2 + #ffd1d2d4 + + + #ff3333 + #853333 + #404040 + #363636 + #808080 + #ffffff + #888888 + #bfbfbf + + + #009688 + #76ffffff + #00796b + diff --git a/app/src/main/res/values/aosp_datetimepicker_dimens.xml b/app/src/main/res/values/aosp_datetimepicker_dimens.xml new file mode 100644 index 0000000..74fd03c --- /dev/null +++ b/app/src/main/res/values/aosp_datetimepicker_dimens.xml @@ -0,0 +1,64 @@ + + + + + 0.82 + 0.85 + 0.16 + 0.19 + 0.81 + 0.60 + 0.83 + 0.17 + 0.14 + 0.11 + + + 60sp + -30dp + 16sp + 14sp + 6dip + 4dip + 96dip + 48dip + 48dip + 24dip + + 316dip + + 270dp + 30dp + 155dp + 270dp + 42dp + + 50dp + 10sp + 16dp + 45dp + 30dp + 75dp + 30dp + 14dp + 16sp + 16sp + 64dp + 22dp + \ No newline at end of file diff --git a/app/src/main/res/values/aosp_datetimepicker_strings.xml b/app/src/main/res/values/aosp_datetimepicker_strings.xml new file mode 100644 index 0000000..a4652e3 --- /dev/null +++ b/app/src/main/res/values/aosp_datetimepicker_strings.xml @@ -0,0 +1,73 @@ + + + + + + + Done + + Hours circular slider + + Minutes circular slider + + Select hours + + Select minutes + + + Month grid of days + + Year list + + Select month and day + + Select year + + %1$s selected + + %1$s deleted + + + -- + + : + + + sans-serif + + sans-serif + + + sans-serif + + diff --git a/app/src/main/res/values/aosp_datetimepicker_styles.xml b/app/src/main/res/values/aosp_datetimepicker_styles.xml new file mode 100644 index 0000000..1be2578 --- /dev/null +++ b/app/src/main/res/values/aosp_datetimepicker_styles.xml @@ -0,0 +1,34 @@ + + + + + false + + + + + +