Loading core/java/android/app/TimePickerDialog.java +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class TimePickerDialog extends AlertDialog implements OnClickListener, setView(view); setButton(BUTTON_POSITIVE, themeContext.getString(R.string.ok), this); setButton(BUTTON_NEGATIVE, themeContext.getString(R.string.cancel), this); setButtonPanelLayoutHint(LAYOUT_HINT_SIDE); mTimePicker = (TimePicker) view.findViewById(R.id.timePicker); mTimePicker.setIs24HourView(mIs24HourView); Loading core/res/res/layout/alert_dialog_leanback_button_panel_right.xml→core/res/res/layout/alert_dialog_leanback_button_panel_side.xml +13 −21 Original line number Diff line number Diff line Loading @@ -20,13 +20,7 @@ android:id="@+id/parentPanel" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:background="@drawable/dialog_background_material" android:translationZ="@dimen/floating_window_z" android:layout_marginLeft="@dimen/leanback_alert_dialog_horizontal_margin" android:layout_marginTop="@dimen/leanback_alert_dialog_vertical_margin" android:layout_marginRight="@dimen/leanback_alert_dialog_horizontal_margin" android:layout_marginBottom="@dimen/leanback_alert_dialog_vertical_margin"> android:orientation="horizontal"> <LinearLayout android:id="@+id/leftPanel" Loading @@ -46,14 +40,15 @@ android:gravity="center_vertical|start" android:paddingStart="16dip" android:paddingEnd="16dip" android:paddingTop="16dip"> android:paddingTop="16dip" android:paddingBottom="8dip"> <ImageView android:id="@+id/icon" android:layout_width="32dip" android:layout_height="32dip" android:layout_marginEnd="8dip" android:scaleType="fitCenter" android:src="@null" /> <TextView android:id="@+id/alertTitle" <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle" style="?attr/windowTitleStyle" android:singleLine="true" android:ellipsize="end" Loading Loading @@ -90,41 +85,38 @@ android:layout_height="wrap_content" android:layout_weight="1" android:minHeight="64dp"> <FrameLayout android:id="@+android:id/custom" <FrameLayout android:id="@+id/custom" android:layout_width="match_parent" android:layout_height="wrap_content" /> </FrameLayout> </LinearLayout> <LinearLayout android:id="@+id/buttonPanel" style="?attr/buttonBarStyle" android:layout_width="wrap_content" android:background="#ffffff" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:minHeight="@dimen/alert_dialog_button_bar_height" android:orientation="vertical" android:gravity="end" android:padding="16dip"> android:gravity="end"> <LinearLayout style="?attr/buttonBarStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layoutDirection="locale" android:orientation="vertical"> <Button android:id="@+id/button3" style="?attr/buttonBarButtonStyle" style="?attr/buttonBarNeutralButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:minHeight="@dimen/alert_dialog_button_bar_height" /> <Button android:id="@+id/button2" style="?attr/buttonBarButtonStyle" style="?attr/buttonBarNegativeButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:minHeight="@dimen/alert_dialog_button_bar_height" /> <Button android:id="@+id/button1" style="?attr/buttonBarButtonStyle" style="?attr/buttonBarPositiveButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" Loading core/res/res/layout/time_picker_legacy_leanback.xmldeleted 100644 → 0 +0 −82 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/timePickerLayout" android:orientation="horizontal" android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="8dip" android:paddingEnd="8dip"> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="8dip" android:paddingEnd="8dip" android:layoutDirection="ltr"> <!-- hour --> <NumberPicker android:id="@+id/hour" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dip" android:layout_marginBottom="16dip" android:focusable="true" android:focusableInTouchMode="true" /> <!-- divider --> <TextView android:id="@+id/divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dip" android:layout_marginEnd="6dip" android:layout_gravity="center_vertical" android:importantForAccessibility="no" /> <!-- minute --> <NumberPicker android:id="@+id/minute" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dip" android:layout_marginBottom="16dip" android:focusable="true" android:focusableInTouchMode="true" /> </LinearLayout> <!-- AM / PM --> <NumberPicker android:id="@+id/amPm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dip" android:layout_marginBottom="16dip" android:layout_marginStart="8dip" android:layout_marginEnd="8dip" android:focusable="true" android:focusableInTouchMode="true" /> </LinearLayout> core/res/res/values-television/themes.xml +2 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,6 @@ <style name="Theme.Holo.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" /> <style name="Theme.Material.Dialog.Alert" parent="Theme.Leanback.Dialog.Alert" /> <style name="Theme.Material.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" /> <style name="Theme.Material.Dialog" parent="Theme.Leanback.Dialog" /> <style name="Theme.Material.Light.Dialog" parent="Theme.Leanback.Light.Dialog" /> </resources> core/res/res/values/styles_leanback.xml +1 −3 Original line number Diff line number Diff line Loading @@ -15,8 +15,7 @@ --> <resources> <style name="AlertDialog.Leanback" parent="AlertDialog.Material"> <item name="layout">@android:layout/alert_dialog_leanback</item> <item name="buttonPanelSideLayout">@android:layout/alert_dialog_leanback_button_panel_right</item> <item name="buttonPanelSideLayout">@android:layout/alert_dialog_leanback_button_panel_side</item> </style> <style name="AlertDialog.Leanback.Light"> Loading @@ -24,7 +23,6 @@ <style name="Widget.Leanback.TimePicker" parent="Widget.Material.TimePicker"> <item name="timePickerMode">spinner</item> <item name="legacyLayout">@layout/time_picker_legacy_leanback</item> </style> <style name="Widget.Leanback.DatePicker" parent="Widget.Material.DatePicker"> Loading Loading
core/java/android/app/TimePickerDialog.java +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class TimePickerDialog extends AlertDialog implements OnClickListener, setView(view); setButton(BUTTON_POSITIVE, themeContext.getString(R.string.ok), this); setButton(BUTTON_NEGATIVE, themeContext.getString(R.string.cancel), this); setButtonPanelLayoutHint(LAYOUT_HINT_SIDE); mTimePicker = (TimePicker) view.findViewById(R.id.timePicker); mTimePicker.setIs24HourView(mIs24HourView); Loading
core/res/res/layout/alert_dialog_leanback_button_panel_right.xml→core/res/res/layout/alert_dialog_leanback_button_panel_side.xml +13 −21 Original line number Diff line number Diff line Loading @@ -20,13 +20,7 @@ android:id="@+id/parentPanel" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:background="@drawable/dialog_background_material" android:translationZ="@dimen/floating_window_z" android:layout_marginLeft="@dimen/leanback_alert_dialog_horizontal_margin" android:layout_marginTop="@dimen/leanback_alert_dialog_vertical_margin" android:layout_marginRight="@dimen/leanback_alert_dialog_horizontal_margin" android:layout_marginBottom="@dimen/leanback_alert_dialog_vertical_margin"> android:orientation="horizontal"> <LinearLayout android:id="@+id/leftPanel" Loading @@ -46,14 +40,15 @@ android:gravity="center_vertical|start" android:paddingStart="16dip" android:paddingEnd="16dip" android:paddingTop="16dip"> android:paddingTop="16dip" android:paddingBottom="8dip"> <ImageView android:id="@+id/icon" android:layout_width="32dip" android:layout_height="32dip" android:layout_marginEnd="8dip" android:scaleType="fitCenter" android:src="@null" /> <TextView android:id="@+id/alertTitle" <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle" style="?attr/windowTitleStyle" android:singleLine="true" android:ellipsize="end" Loading Loading @@ -90,41 +85,38 @@ android:layout_height="wrap_content" android:layout_weight="1" android:minHeight="64dp"> <FrameLayout android:id="@+android:id/custom" <FrameLayout android:id="@+id/custom" android:layout_width="match_parent" android:layout_height="wrap_content" /> </FrameLayout> </LinearLayout> <LinearLayout android:id="@+id/buttonPanel" style="?attr/buttonBarStyle" android:layout_width="wrap_content" android:background="#ffffff" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:minHeight="@dimen/alert_dialog_button_bar_height" android:orientation="vertical" android:gravity="end" android:padding="16dip"> android:gravity="end"> <LinearLayout style="?attr/buttonBarStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layoutDirection="locale" android:orientation="vertical"> <Button android:id="@+id/button3" style="?attr/buttonBarButtonStyle" style="?attr/buttonBarNeutralButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:minHeight="@dimen/alert_dialog_button_bar_height" /> <Button android:id="@+id/button2" style="?attr/buttonBarButtonStyle" style="?attr/buttonBarNegativeButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:minHeight="@dimen/alert_dialog_button_bar_height" /> <Button android:id="@+id/button1" style="?attr/buttonBarButtonStyle" style="?attr/buttonBarPositiveButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" Loading
core/res/res/layout/time_picker_legacy_leanback.xmldeleted 100644 → 0 +0 −82 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/timePickerLayout" android:orientation="horizontal" android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="8dip" android:paddingEnd="8dip"> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="8dip" android:paddingEnd="8dip" android:layoutDirection="ltr"> <!-- hour --> <NumberPicker android:id="@+id/hour" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dip" android:layout_marginBottom="16dip" android:focusable="true" android:focusableInTouchMode="true" /> <!-- divider --> <TextView android:id="@+id/divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dip" android:layout_marginEnd="6dip" android:layout_gravity="center_vertical" android:importantForAccessibility="no" /> <!-- minute --> <NumberPicker android:id="@+id/minute" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dip" android:layout_marginBottom="16dip" android:focusable="true" android:focusableInTouchMode="true" /> </LinearLayout> <!-- AM / PM --> <NumberPicker android:id="@+id/amPm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dip" android:layout_marginBottom="16dip" android:layout_marginStart="8dip" android:layout_marginEnd="8dip" android:focusable="true" android:focusableInTouchMode="true" /> </LinearLayout>
core/res/res/values-television/themes.xml +2 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,6 @@ <style name="Theme.Holo.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" /> <style name="Theme.Material.Dialog.Alert" parent="Theme.Leanback.Dialog.Alert" /> <style name="Theme.Material.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" /> <style name="Theme.Material.Dialog" parent="Theme.Leanback.Dialog" /> <style name="Theme.Material.Light.Dialog" parent="Theme.Leanback.Light.Dialog" /> </resources>
core/res/res/values/styles_leanback.xml +1 −3 Original line number Diff line number Diff line Loading @@ -15,8 +15,7 @@ --> <resources> <style name="AlertDialog.Leanback" parent="AlertDialog.Material"> <item name="layout">@android:layout/alert_dialog_leanback</item> <item name="buttonPanelSideLayout">@android:layout/alert_dialog_leanback_button_panel_right</item> <item name="buttonPanelSideLayout">@android:layout/alert_dialog_leanback_button_panel_side</item> </style> <style name="AlertDialog.Leanback.Light"> Loading @@ -24,7 +23,6 @@ <style name="Widget.Leanback.TimePicker" parent="Widget.Material.TimePicker"> <item name="timePickerMode">spinner</item> <item name="legacyLayout">@layout/time_picker_legacy_leanback</item> </style> <style name="Widget.Leanback.DatePicker" parent="Widget.Material.DatePicker"> Loading