<java-symbol type="bool" name="config_sms_decode_gsm_8bit_data" />
<java-symbol type="string" name="time_picker_am_label" />
<java-symbol type="string" name="time_picker_pm_label" />
+ <java-symbol type="dimen" name="text_size_small_material" />
</resources>
<dimen name="kg_status_line_font_right_margin">16dp</dimen>
<!-- Overload default clock widget parameters -->
- <dimen name="widget_big_font_size">88dp</dimen>
+ <dimen name="widget_big_font_size">100dp</dimen>
</resources>
\ No newline at end of file
<dimen name="keyguard_muliuser_selector_margin">12dp</dimen>
<!-- Overload default clock widget parameters -->
- <dimen name="widget_big_font_size">120dp</dimen>
+ <dimen name="widget_big_font_size">140dp</dimen>
<dimen name="widget_label_font_size">16sp</dimen>
<dimen name="bottom_text_spacing_digital">-16dp</dimen>
<!-- Horizontal padding for the widget pager -->
<dimen name="kg_widget_pager_horizontal_padding">32dp</dimen>
+
+ <dimen name="widget_big_font_size">150dp</dimen>
</resources>
<!-- Height of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) -->
<dimen name="keyguard_security_height">420dp</dimen>
+ <dimen name="widget_big_font_size">150dp</dimen>
</resources>
import android.app.AlarmManager;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.res.Configuration;
import android.content.res.Resources;
import android.provider.AlarmClock;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Slog;
+import android.util.TypedValue;
import android.view.View;
import android.widget.GridLayout;
import android.widget.TextClock;
mClockView.setElegantTextHeight(false);
}
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ mClockView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(R.dimen.widget_big_font_size));
+ mDateView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(R.dimen.widget_label_font_size));
+ mOwnerInfo.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(R.dimen.widget_label_font_size));
+ }
+
protected void refresh() {
AlarmManager.AlarmClockInfo nextAlarm = mLockPatternUtils.getNextAlarm();
Patterns.update(mContext, nextAlarm != null);
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="ring"
- android:innerRadius="24dp" android:thickness="1dp">
- <solid android:color="#66ffffff" />
+ android:innerRadius="22dp" android:thickness="2dp">
+ <solid android:color="#4cffffff" />
</shape>
\ No newline at end of file
android:id="@+id/keyguard_indication_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="70dp"
+ android:layout_marginBottom="@dimen/keyguard_indication_margin_bottom"
android:layout_gravity="bottom|center_horizontal"
android:textStyle="italic"
android:textColor="#ffffff"
android:paddingEnd="@dimen/battery_level_padding_end"
android:textColor="#ffffff"
android:visibility="gone"
- android:textSize="12sp"/>
+ android:textSize="@dimen/battery_level_text_size"/>
</LinearLayout>
<com.android.keyguard.CarrierText
android:layout_marginStart="@dimen/header_battery_margin_expanded"
android:paddingEnd="@dimen/battery_level_padding_end"
android:textColor="#ffffff"
- android:textSize="12sp"/>
+ android:textSize="@dimen/battery_level_text_size"/>
</LinearLayout>
<TextView
--- /dev/null
+<?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
+ -->
+<resources>
+ <!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow
+ card. -->
+ <integer name="keyguard_max_notification_count">4</integer>
+</resources>
+
<!-- The number of columns that the top level tiles span in the QuickSettings -->
<integer name="quick_settings_user_time_settings_tile_span">2</integer>
-</resources>
+ <!-- We have only space for one notification on phone landscape layouts. -->
+ <integer name="keyguard_max_notification_count">1</integer>
+</resources>
<dimen name="keyguard_clock_notifications_margin_min">36dp</dimen>
<dimen name="keyguard_clock_notifications_margin_max">36dp</dimen>
+
+ <dimen name="keyguard_indication_margin_bottom">80dp</dimen>
</resources>
<!-- The width of the region on the left/right edge of the screen for performing the camera/
phone hints. -->
<dimen name="edge_tap_area_width">80dp</dimen>
+
+ <dimen name="keyguard_indication_margin_bottom">90dp</dimen>
</resources>
--- /dev/null
+<?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
+ -->
+<resources>
+ <integer name="keyguard_max_notification_count">4</integer>
+</resources>
+
min value is used when no notifications are displaying, and the max value is when the
highest possible number of notifications are showing. -->
<fraction name="keyguard_clock_y_fraction_max">35%</fraction>
- <fraction name="keyguard_clock_y_fraction_min">20%</fraction>
+ <fraction name="keyguard_clock_y_fraction_min">24%</fraction>
</resources>
<!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow
card. -->
- <integer name="keyguard_max_notification_count">4</integer>
+ <integer name="keyguard_max_notification_count">3</integer>
<!-- Defines the implementation of the velocity tracker to be used for the panel expansion. Can
be 'platform' or 'noisy' (i.e. for noisy touch screens). -->
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
<dimen name="keyguard_affordance_height">56dp</dimen>
<dimen name="keyguard_affordance_width">56dp</dimen>
+
+ <dimen name="keyguard_indication_margin_bottom">65dp</dimen>
+
+ <!-- The text size for battery level -->
+ <dimen name="battery_level_text_size">12sp</dimen>
</resources>
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
+import android.content.res.Configuration;
import android.os.RemoteException;
import android.os.UserHandle;
import android.provider.MediaStore;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityManager;
import android.widget.FrameLayout;
+import android.widget.TextView;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
private KeyguardAffordanceView mCameraImageView;
private KeyguardAffordanceView mPhoneImageView;
private KeyguardAffordanceView mLockIcon;
- private View mIndicationText;
+ private TextView mIndicationText;
private ViewGroup mPreviewContainer;
private View mPhonePreview;
mCameraImageView = (KeyguardAffordanceView) findViewById(R.id.camera_button);
mPhoneImageView = (KeyguardAffordanceView) findViewById(R.id.phone_button);
mLockIcon = (KeyguardAffordanceView) findViewById(R.id.lock_icon);
- mIndicationText = findViewById(R.id.keyguard_indication_text);
+ mIndicationText = (TextView) findViewById(R.id.keyguard_indication_text);
watchForCameraPolicyChanges();
watchForAccessibilityChanges();
updateCameraVisibility();
mLockIcon.setOnClickListener(this);
}
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ int indicationBottomMargin = getResources().getDimensionPixelSize(
+ R.dimen.keyguard_indication_margin_bottom);
+ MarginLayoutParams mlp = (MarginLayoutParams) mIndicationText.getLayoutParams();
+ if (mlp.bottomMargin != indicationBottomMargin) {
+ mlp.bottomMargin = indicationBottomMargin;
+ mIndicationText.setLayoutParams(mlp);
+ }
+
+ // Respect font size setting.
+ mIndicationText.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.text_size_small_material));
+ }
+
public void setActivityStarter(ActivityStarter activityStarter) {
mActivityStarter = activityStarter;
}
import android.animation.LayoutTransition;
import android.content.Context;
+import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
+import android.util.TypedValue;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.animation.AnimationUtils;
private boolean mKeyguardUserSwitcherShowing;
private boolean mBatteryListening;
+ private TextView mCarrierLabel;
private View mSystemIconsSuperContainer;
private MultiUserSwitch mMultiUserSwitch;
private ImageView mMultiUserAvatar;
mMultiUserSwitch = (MultiUserSwitch) findViewById(R.id.multi_user_switch);
mMultiUserAvatar = (ImageView) findViewById(R.id.multi_user_avatar);
mBatteryLevel = (TextView) findViewById(R.id.battery_level);
+ mCarrierLabel = (TextView) findViewById(R.id.keyguard_carrier_text);
loadDimens();
mFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(getContext(),
android.R.interpolator.fast_out_slow_in);
updateUserSwitcher();
}
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+
+ // Respect font size setting.
+ mCarrierLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.text_size_small_material));
+ mBatteryLevel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ getResources().getDimensionPixelSize(R.dimen.battery_level_text_size));
+ }
+
private void loadDimens() {
mSystemIconsSwitcherHiddenExpandedMargin = getResources().getDimensionPixelSize(
R.dimen.system_icons_switcher_hidden_expanded_margin);