1

I am using a date picker in my layout

  <DatePicker
    android:id="@+id/datepicker"
    android:layout_width="366dp"
    android:calendarViewShown="false"
    android:spinnersShown="false"
    android:layout_height="302dp"
    android:theme="@style/datepicker" />

I want to increase the font size of digits in the calendar body (1-31 digits)...checked for date picker properties..didn't find any...how I can achieve this?

enter image description here

KH_AJU
  • 109
  • 2
  • 18
  • try to use style for the date picker and increase the text size. Please let me know this works or not.Check this how to apply style http://www.materialdoc.com/date-picker/ and make the width and height as match-parent – Sagar Gangawane Aug 17 '16 at 11:00
  • You will need to write in java class instead to do it in xml – Kirtikumar A. Aug 17 '16 at 11:29
  • @KirtikumarA. any idea how to do it? I've already tried some...my layout contains a date picker, time picker and a button... all inside a dialog popup – KH_AJU Aug 17 '16 at 11:39
  • The design isn't very nice. It wont fit in small devices. Better use a separate time picker or use conventional date picker along with time picker instead of the current one which use a lot of area in screen. – shijin Aug 18 '16 at 07:18

2 Answers2

0

In above xml code dont try to add hardcoded layout_width and layout_height parameters instead of try to use match_parent or wrap content to set height and width to datepicker.

Sangram Haladkar
  • 707
  • 9
  • 22
-1

Sorry i don't have enough reputation for comment. I suggest you to take a look at this How to change textsize in datepicker? before questioning please do the enough research.

Community
  • 1
  • 1
Medlin Moni
  • 91
  • 2
  • 13