зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1377765 - Apply calendar height workaround from bug 1245692 to Android 5.0.x. r=maliu
--HG-- extra : rebase_source : ecce67f881aa1c97fbe96025bb0a40c735c74581
This commit is contained in:
Родитель
fb9c30f56a
Коммит
94d1d5b78a
|
@ -61,6 +61,7 @@ public class AppConstants {
|
|||
* Otherwise, we need a range check.
|
||||
*/
|
||||
public static final boolean preMarshmallow = MAX_SDK_VERSION < 23 || (MIN_SDK_VERSION < 23 && Build.VERSION.SDK_INT < 23);
|
||||
public static final boolean preLollipopMR1 = MAX_SDK_VERSION < 22 || (MIN_SDK_VERSION < 22 && Build.VERSION.SDK_INT < 22);
|
||||
public static final boolean preLollipop = MAX_SDK_VERSION < 21 || (MIN_SDK_VERSION < 21 && Build.VERSION.SDK_INT < 21);
|
||||
public static final boolean preJBMR2 = MAX_SDK_VERSION < 18 || (MIN_SDK_VERSION < 18 && Build.VERSION.SDK_INT < 18);
|
||||
public static final boolean preJBMR1 = MAX_SDK_VERSION < 17 || (MIN_SDK_VERSION < 17 && Build.VERSION.SDK_INT < 17);
|
||||
|
|
|
@ -314,8 +314,8 @@ public class DateTimePicker extends FrameLayout {
|
|||
});
|
||||
|
||||
final int height;
|
||||
if (Versions.preLollipop) {
|
||||
// The 4.X version of CalendarView doesn't request any height, resulting in
|
||||
if (Versions.preLollipopMR1) {
|
||||
// Older versions of CalendarView don't request any height, resulting in
|
||||
// the whole dialog not appearing unless we manually request height.
|
||||
height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200, getResources().getDisplayMetrics());;
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче