Loading res/layout/desk_clock_saver.xml +1 −12 Original line number Diff line number Diff line Loading @@ -33,21 +33,10 @@ android:layout_height="wrap_content" android:layout_x="0dip" android:layout_y="0dip" android:id="@+id/saver_view" > <TextView android:id="@+id/nextAlarm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dip" android:layout_marginLeft="4dip" android:gravity="left" android:textAppearance="?android:attr/textAppearanceMedium" android:drawablePadding="6dip" /> android:id="@+id/saver_view"> <include layout="@layout/desk_clock_time_date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/nextAlarm" /> </RelativeLayout> Loading res/values/config.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** Copyright 2011, 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. */ --> <!-- These resources are around just to allow their values to be customized for different hardware and product builds. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <bool name="config_requiresScreenSaver">true</bool> </resources> src/com/android/deskclock/DeskClock.java +4 −7 Original line number Diff line number Diff line Loading @@ -251,6 +251,10 @@ public class DeskClock extends Activity { } private void scheduleScreenSaver() { if (!getResources().getBoolean(R.bool.config_requiresScreenSaver)) { return; } // reschedule screen saver mHandy.removeMessages(SCREEN_SAVER_TIMEOUT_MSG); mHandy.sendMessageDelayed( Loading Loading @@ -296,19 +300,12 @@ public class DeskClock extends Activity { mTime = (DigitalClock) findViewById(R.id.time); mDate = (TextView) findViewById(R.id.date); mNextAlarm = (TextView) findViewById(R.id.nextAlarm); final int color = mDimmed ? SCREEN_SAVER_COLOR_DIM : SCREEN_SAVER_COLOR; ((AndroidClockTextView)findViewById(R.id.timeDisplay)).setTextColor(color); ((AndroidClockTextView)findViewById(R.id.am_pm)).setTextColor(color); mDate.setTextColor(color); mNextAlarm.setTextColor(color); mNextAlarm.setCompoundDrawablesWithIntrinsicBounds( getResources().getDrawable(mDimmed ? R.drawable.ic_lock_idle_alarm_saver_dim : R.drawable.ic_lock_idle_alarm_saver), null, null, null); mBatteryDisplay = mWeatherCurrentTemperature = Loading Loading
res/layout/desk_clock_saver.xml +1 −12 Original line number Diff line number Diff line Loading @@ -33,21 +33,10 @@ android:layout_height="wrap_content" android:layout_x="0dip" android:layout_y="0dip" android:id="@+id/saver_view" > <TextView android:id="@+id/nextAlarm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dip" android:layout_marginLeft="4dip" android:gravity="left" android:textAppearance="?android:attr/textAppearanceMedium" android:drawablePadding="6dip" /> android:id="@+id/saver_view"> <include layout="@layout/desk_clock_time_date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/nextAlarm" /> </RelativeLayout> Loading
res/values/config.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** Copyright 2011, 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. */ --> <!-- These resources are around just to allow their values to be customized for different hardware and product builds. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <bool name="config_requiresScreenSaver">true</bool> </resources>
src/com/android/deskclock/DeskClock.java +4 −7 Original line number Diff line number Diff line Loading @@ -251,6 +251,10 @@ public class DeskClock extends Activity { } private void scheduleScreenSaver() { if (!getResources().getBoolean(R.bool.config_requiresScreenSaver)) { return; } // reschedule screen saver mHandy.removeMessages(SCREEN_SAVER_TIMEOUT_MSG); mHandy.sendMessageDelayed( Loading Loading @@ -296,19 +300,12 @@ public class DeskClock extends Activity { mTime = (DigitalClock) findViewById(R.id.time); mDate = (TextView) findViewById(R.id.date); mNextAlarm = (TextView) findViewById(R.id.nextAlarm); final int color = mDimmed ? SCREEN_SAVER_COLOR_DIM : SCREEN_SAVER_COLOR; ((AndroidClockTextView)findViewById(R.id.timeDisplay)).setTextColor(color); ((AndroidClockTextView)findViewById(R.id.am_pm)).setTextColor(color); mDate.setTextColor(color); mNextAlarm.setTextColor(color); mNextAlarm.setCompoundDrawablesWithIntrinsicBounds( getResources().getDrawable(mDimmed ? R.drawable.ic_lock_idle_alarm_saver_dim : R.drawable.ic_lock_idle_alarm_saver), null, null, null); mBatteryDisplay = mWeatherCurrentTemperature = Loading