Loading res/layout/crescendo_length_picker.xml 0 → 100644 +40 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- /** * Copyright (c) 2015, Google Inc. * * 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:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_horizontal"> <com.android.deskclock.NumberPickerCompat android:id="@+id/seconds_picker" android:layout_width="wrap_content" android:layout_height="match_parent" android:focusable="true" android:focusableInTouchMode="true" /> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginStart="16dp" android:gravity="center_vertical" android:textAppearance="?android:attr/textAppearanceLarge" /> </LinearLayout> res/layout/snooze_length_picker.xml +9 −10 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- <?xml version="1.0" encoding="utf-8"?><!-- /** * Copyright (c) 2012, Google Inc. * Loading @@ -18,9 +17,9 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="match_parent" > android:layout_height="match_parent" android:gravity="center_horizontal"> <com.android.deskclock.NumberPickerCompat android:id="@+id/minutes_picker" Loading @@ -29,12 +28,12 @@ android:focusable="true" android:focusableInTouchMode="true" /> <TextView android:id="@+id/title" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center_vertical" android:layout_marginLeft="16dip" android:layout_marginStart="16dip" <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="match_parent" /> android:layout_height="match_parent" android:layout_marginStart="16dp" android:gravity="center_vertical" android:textAppearance="?android:attr/textAppearanceLarge" /> </LinearLayout> res/values/strings.xml +12 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,18 @@ <item quantity="other">minutes</item> </plurals> <!-- Setting title for changing the crescendo duration. --> <string name="crescendo_duration_title">Gradually increase volume</string> <!-- Summary value for changing the crescendo duration to 0. --> <string name="no_crescendo_duration">Off</string> <!-- Summary value for changing the crescendo duration. --> <string name="crescendo_duration"><xliff:g id="number" example="7">%s</xliff:g> seconds</string> <!-- Setting label when changing the crescendo duration. --> <string name="crescendo_picker_label">seconds</string> <!-- Auto silence preference title --> <string name="auto_silence_title">Silence after</string> Loading res/xml/settings.xml +10 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,11 @@ android:key="volume_setting" android:title="@string/alarm_volume_title" /> <com.android.deskclock.CrescendoLengthDialog android:key="alarm_crescendo_duration" android:title="@string/crescendo_duration_title" android:defaultValue="0"/> <ListPreference android:key="volume_button_setting" android:title="@string/volume_button_setting_title" Loading @@ -78,6 +83,11 @@ android:key="timer_ringtone" android:title="@string/timer_ringtone_title" android:ringtoneType="alarm" /> <com.android.deskclock.CrescendoLengthDialog android:key="timer_crescendo_duration" android:title="@string/crescendo_duration_title" android:defaultValue="0"/> </PreferenceCategory> </PreferenceScreen> src/com/android/deskclock/AlarmInitReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public class AlarmInitReceiver extends BroadcastReceiver { private void switchVolumeButtonDefault(SharedPreferences prefs) { SharedPreferences.Editor editor = prefs.edit(); editor.putString(SettingsActivity.KEY_VOLUME_BEHAVIOR, editor.putString(SettingsActivity.KEY_VOLUME_BUTTONS, SettingsActivity.DEFAULT_VOLUME_BEHAVIOR); // Make sure we do it only once Loading Loading
res/layout/crescendo_length_picker.xml 0 → 100644 +40 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- /** * Copyright (c) 2015, Google Inc. * * 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:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_horizontal"> <com.android.deskclock.NumberPickerCompat android:id="@+id/seconds_picker" android:layout_width="wrap_content" android:layout_height="match_parent" android:focusable="true" android:focusableInTouchMode="true" /> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginStart="16dp" android:gravity="center_vertical" android:textAppearance="?android:attr/textAppearanceLarge" /> </LinearLayout>
res/layout/snooze_length_picker.xml +9 −10 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- <?xml version="1.0" encoding="utf-8"?><!-- /** * Copyright (c) 2012, Google Inc. * Loading @@ -18,9 +17,9 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="match_parent" > android:layout_height="match_parent" android:gravity="center_horizontal"> <com.android.deskclock.NumberPickerCompat android:id="@+id/minutes_picker" Loading @@ -29,12 +28,12 @@ android:focusable="true" android:focusableInTouchMode="true" /> <TextView android:id="@+id/title" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center_vertical" android:layout_marginLeft="16dip" android:layout_marginStart="16dip" <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="match_parent" /> android:layout_height="match_parent" android:layout_marginStart="16dp" android:gravity="center_vertical" android:textAppearance="?android:attr/textAppearanceLarge" /> </LinearLayout>
res/values/strings.xml +12 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,18 @@ <item quantity="other">minutes</item> </plurals> <!-- Setting title for changing the crescendo duration. --> <string name="crescendo_duration_title">Gradually increase volume</string> <!-- Summary value for changing the crescendo duration to 0. --> <string name="no_crescendo_duration">Off</string> <!-- Summary value for changing the crescendo duration. --> <string name="crescendo_duration"><xliff:g id="number" example="7">%s</xliff:g> seconds</string> <!-- Setting label when changing the crescendo duration. --> <string name="crescendo_picker_label">seconds</string> <!-- Auto silence preference title --> <string name="auto_silence_title">Silence after</string> Loading
res/xml/settings.xml +10 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,11 @@ android:key="volume_setting" android:title="@string/alarm_volume_title" /> <com.android.deskclock.CrescendoLengthDialog android:key="alarm_crescendo_duration" android:title="@string/crescendo_duration_title" android:defaultValue="0"/> <ListPreference android:key="volume_button_setting" android:title="@string/volume_button_setting_title" Loading @@ -78,6 +83,11 @@ android:key="timer_ringtone" android:title="@string/timer_ringtone_title" android:ringtoneType="alarm" /> <com.android.deskclock.CrescendoLengthDialog android:key="timer_crescendo_duration" android:title="@string/crescendo_duration_title" android:defaultValue="0"/> </PreferenceCategory> </PreferenceScreen>
src/com/android/deskclock/AlarmInitReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public class AlarmInitReceiver extends BroadcastReceiver { private void switchVolumeButtonDefault(SharedPreferences prefs) { SharedPreferences.Editor editor = prefs.edit(); editor.putString(SettingsActivity.KEY_VOLUME_BEHAVIOR, editor.putString(SettingsActivity.KEY_VOLUME_BUTTONS, SettingsActivity.DEFAULT_VOLUME_BEHAVIOR); // Make sure we do it only once Loading