Skip to content

Commit

Permalink
Increase some MaterialDatePicker dimensions to handle device scaled f…
Browse files Browse the repository at this point in the history
…ont sizes on small devices

PiperOrigin-RevId: 268452885
  • Loading branch information
ldjcmu authored and dsn5ft committed Oct 3, 2019
1 parent ab3d88a commit 1d96b56
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,29 @@
android:paddingBottom="@dimen/mtrl_calendar_navigation_bottom_padding"
android:orientation="horizontal">

<com.google.android.material.button.MaterialButton
android:id="@+id/month_navigation_fragment_toggle"
android:layout_width="wrap_content"
android:layout_height="@dimen/mtrl_calendar_navigation_height"
android:layout_gravity="start"
android:gravity="center_vertical|start"
android:insetBottom="0dp"
android:insetTop="0dp"
app:icon="@drawable/ic_menu_arrow_down_black_24dp"
app:iconGravity="textEnd"
app:iconPadding="4dp"/>

<View
<FrameLayout
android:layout_width="0dp"
android:layout_height="@dimen/mtrl_calendar_navigation_height"
android:layout_weight="1"/>
android:layout_height="match_parent"
android:layout_weight="1">

<com.google.android.material.button.MaterialButton
android:id="@+id/month_navigation_fragment_toggle"
android:layout_width="wrap_content"
android:layout_height="@dimen/mtrl_calendar_navigation_height"
android:layout_gravity="start"
android:gravity="center_vertical|start"
android:insetBottom="0dp"
android:insetTop="0dp"
app:icon="@drawable/ic_menu_arrow_down_black_24dp"
app:iconGravity="textEnd"
app:iconPadding="4dp"/>

</FrameLayout>

<com.google.android.material.button.MaterialButton
android:id="@+id/month_navigation_previous"
android:layout_width="@dimen/mtrl_min_touch_target_size"
android:layout_height="@dimen/mtrl_calendar_navigation_height"
android:layout_gravity="end"
android:contentDescription="@string/mtrl_picker_a11y_prev_month"
android:gravity="center"
android:insetBottom="0dp"
Expand All @@ -56,7 +57,6 @@
android:id="@+id/month_navigation_next"
android:layout_width="@dimen/mtrl_min_touch_target_size"
android:layout_height="@dimen/mtrl_calendar_navigation_height"
android:layout_gravity="end"
android:contentDescription="@string/mtrl_picker_a11y_next_month"
android:gravity="center"
android:insetBottom="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
<dimen name="mtrl_calendar_day_horizontal_padding">2dp</dimen>
<dimen name="mtrl_calendar_day_vertical_padding">2dp</dimen>

<dimen name="mtrl_calendar_days_of_week_height">16dp</dimen>
<dimen name="mtrl_calendar_days_of_week_height">20dp</dimen>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
<dimen name="mtrl_calendar_day_horizontal_padding">2dp</dimen>
<dimen name="mtrl_calendar_day_vertical_padding">2dp</dimen>

<dimen name="mtrl_calendar_days_of_week_height">16dp</dimen>
<dimen name="mtrl_calendar_days_of_week_height">20dp</dimen>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
<integer name="mtrl_calendar_header_orientation">0</integer>
<integer name="mtrl_calendar_selection_text_lines">2</integer>

<dimen name="mtrl_calendar_days_of_week_height">16dp</dimen>
<dimen name="mtrl_calendar_days_of_week_height">20dp</dimen>
</resources>

0 comments on commit 1d96b56

Please sign in to comment.