Skip to content

Commit

Permalink
Reduced selected date height in DatePicker
Browse files Browse the repository at this point in the history
Should improve #17
  • Loading branch information
wdullaer committed Apr 16, 2015
1 parent 2b49466 commit 8906c7f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:background="@color/mdtp_date_picker_view_animator"
android:gravity="center"
android:orientation="vertical" >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:background="@color/mdtp_date_picker_view_animator"
android:gravity="center"
android:orientation="vertical" >

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/mdtp_selected_calendar_layout_height"
android:layout_height="wrap_content"
android:orientation="vertical" >

<include layout="@layout/mdtp_date_picker_header_view" />
Expand Down
14 changes: 9 additions & 5 deletions library/src/main/res/layout/mdtp_date_picker_selected_date.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/day_picker_selected_date_layout"
android:layout_width="@dimen/mdtp_date_picker_component_width"
android:layout_height="0dip"
android:layout_height="@dimen/mdtp_selected_date_height"
android:layout_weight="1"
android:background="@color/mdtp_accent_color"
android:gravity="center"
android:orientation="vertical" >
android:orientation="vertical">

<com.wdullaer.materialdatetimepicker.AccessibleLinearLayout
android:id="@+id/date_picker_month_and_day"
Expand All @@ -41,7 +42,8 @@
android:gravity="center_horizontal|bottom"
android:includeFontPadding="false"
android:textColor="@color/mdtp_date_picker_selector"
android:textSize="@dimen/mdtp_selected_date_month_size" />
android:textSize="@dimen/mdtp_selected_date_month_size"
tools:text="May"/>

<TextView
android:id="@+id/date_picker_day"
Expand All @@ -54,7 +56,8 @@
android:gravity="center"
android:includeFontPadding="false"
android:textColor="@color/mdtp_date_picker_selector"
android:textSize="@dimen/mdtp_selected_date_day_size" />
android:textSize="@dimen/mdtp_selected_date_day_size"
tools:text="15"/>
</com.wdullaer.materialdatetimepicker.AccessibleLinearLayout>

<com.wdullaer.materialdatetimepicker.AccessibleTextView
Expand All @@ -65,6 +68,7 @@
android:gravity="center_horizontal|top"
android:includeFontPadding="false"
android:textColor="@color/mdtp_date_picker_selector"
android:textSize="@dimen/mdtp_selected_date_year_size" />
android:textSize="@dimen/mdtp_selected_date_year_size"
tools:text="2015" />

</LinearLayout>
1 change: 1 addition & 0 deletions library/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<dimen name="mdtp_date_picker_component_width">270dp</dimen>
<dimen name="mdtp_date_picker_header_height">30dp</dimen>
<dimen name="mdtp_selected_calendar_layout_height">155dp</dimen>
<dimen name="mdtp_selected_date_height">190dp</dimen>
<dimen name="mdtp_date_picker_view_animator_height">270dp</dimen>
<dimen name="mdtp_done_button_height">42dp</dimen>

Expand Down

0 comments on commit 8906c7f

Please sign in to comment.