Skip to content

Commit

Permalink
[MaterialTimePicker] Properly align text vertically in MaterialTimePi…
Browse files Browse the repository at this point in the history
…cker on S+.

PiperOrigin-RevId: 448541243
  • Loading branch information
Material Design Team authored and leticiarossi committed May 13, 2022
1 parent 4b81bb1 commit 703249d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
Expand Up @@ -26,7 +26,7 @@
android:layout_width="96dp"
android:textCursorDrawable="@drawable/material_cursor_drawable"
android:layout_height="80dp"
android:paddingBottom="6dp" />
android:paddingBottom="@dimen/material_time_input_padding_bottom" />

<TextView
android:id="@+id/material_label"
Expand Down
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 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.
-->

<resources>
<!-- TextInputEditText centers properly on S+, so padding is not needed -->
<dimen name="material_time_input_padding_bottom">0dp</dimen>
</resources>
Expand Up @@ -36,6 +36,8 @@
<dimen name="material_cursor_width">2dp</dimen>

<dimen name="material_clock_size">256dp</dimen>
<!-- TextInputEditText doesn't properly center pre-S, so add padding fix -->
<dimen name="material_time_input_padding_bottom">6dp</dimen>

<dimen name="material_time_picker_minimum_screen_height">560dp</dimen>
<dimen name="material_time_picker_minimum_screen_width">340dp</dimen>
Expand Down

0 comments on commit 703249d

Please sign in to comment.