Bug 1245692 - Make CalendarView use full width of dialog r=sebastian

Squashing CalendarView makes it look bad and hard to use - by allowing
it to expand to the dialog width we get a usable CalendarView.

Note that this breaks on Android 4.x. On these devices CalendarView is
implemented using a ListView, which for some reason isn't given
any space during layouting - this results in the actual days in the month
being hidden (we do however see the weekday titles / month title).

MozReview-Commit-ID: wHNx1xG3JK

--HG--
extra : rebase_source : 6eb01c3cd4d9a38d7df516875201ab1eea265828
extra : histedit_source : c99960cd21663875f826894433ba57d99cf0facd
This commit is contained in:
Andrzej Hunt 2016-05-27 10:29:04 -07:00
parent cf75cebe3a
commit 9877848eea
2 changed files with 1 additions and 3 deletions

View File

@ -322,8 +322,6 @@ public class DateTimePicker extends FrameLayout {
mCalendar = new CalendarView(context);
mCalendar.setVisibility(GONE);
LayoutParams layoutParams = new LayoutParams(250, 280);
mCalendar.setLayoutParams(layoutParams);
mCalendar.setFocusable(true);
mCalendar.setFocusableInTouchMode(true);
mCalendar.setMaxDate(mMaxDate.getTimeInMillis());

View File

@ -25,7 +25,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/datetime_picker"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"