summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/com/android/internal/widget/DigitalClock.java16
-rw-r--r--core/java/com/android/internal/widget/LockPatternView.java63
-rw-r--r--core/res/res/drawable-hdpi/btn_code_lock_default_holo.pngbin0 -> 332 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_code_lock_touched_holo.pngbin0 -> 332 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lock_idle_alarm.pngbin1197 -> 830 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_normal.pngbin0 -> 915 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_pressed.pngbin0 -> 1754 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_normal.pngbin0 -> 757 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_pressed.pngbin0 -> 1403 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_green_up_holo.pngbin0 -> 860 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up_holo.pngbin0 -> 1129 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.pngbin0 -> 597 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.pngbin0 -> 7573 bytes
-rw-r--r--core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.pngbin0 -> 7560 bytes
-rwxr-xr-x[-rw-r--r--]core/res/res/drawable-mdpi/btn_code_lock_default.pngbin298 -> 1190 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_code_lock_default_holo.pngbin0 -> 298 bytes
-rwxr-xr-x[-rw-r--r--]core/res/res/drawable-mdpi/btn_code_lock_touched.pngbin298 -> 739 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_code_lock_touched_holo.pngbin0 -> 298 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lock_idle_alarm.pngbin650 -> 585 bytes
-rwxr-xr-x[-rw-r--r--]core/res/res/drawable-mdpi/ic_lock_idle_charging.pngbin679 -> 599 bytes
-rwxr-xr-x[-rw-r--r--]core/res/res/drawable-mdpi/ic_lock_idle_lock.pngbin521 -> 547 bytes
-rwxr-xr-x[-rw-r--r--]core/res/res/drawable-mdpi/ic_lock_idle_low_battery.pngbin607 -> 665 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_normal.pngbin0 -> 660 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_pressed.pngbin0 -> 1223 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_normal.pngbin0 -> 591 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_pressed.pngbin0 -> 947 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.pngbin573 -> 388 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up_holo.pngbin0 -> 573 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.pngbin729 -> 386 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up_holo.pngbin0 -> 729 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_holo.pngbin0 -> 481 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_point_area_green_holo.pngbin0 -> 4105 bytes
-rw-r--r--core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.pngbin0 -> 4080 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lock_idle_alarm.pngbin0 -> 1157 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_normal.pngbin0 -> 1165 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_pressed.pngbin0 -> 2287 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_normal.pngbin0 -> 957 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_pressed.pngbin0 -> 1907 bytes
-rw-r--r--core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_holo.pngbin0 -> 802 bytes
-rw-r--r--core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green_holo.pngbin0 -> 11979 bytes
-rw-r--r--core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.pngbin0 -> 11992 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/ic_lock_idle_alarm.pngbin0 -> 1190 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/ic_lock_idle_charging.pngbin0 -> 1249 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/ic_lock_idle_lock.pngbin0 -> 960 bytes
-rw-r--r--core/res/res/drawable-xlarge-hdpi/ic_lock_idle_low_battery.pngbin0 -> 1124 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/btn_code_lock_default.pngbin0 -> 298 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/btn_code_lock_touched.pngbin0 -> 298 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.pngbin0 -> 650 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.pngbin0 -> 679 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.pngbin0 -> 521 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.pngbin0 -> 607 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_green_up.pngbin0 -> 573 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_red_up.pngbin0 -> 729 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_default.pngbin0 -> 23542 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_green.pngbin0 -> 15734 bytes
-rw-r--r--core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_red.pngbin0 -> 13778 bytes
-rw-r--r--core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_default.pngbin0 -> 72735 bytes
-rw-r--r--core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_green.pngbin0 -> 47249 bytes
-rw-r--r--core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_red.pngbin0 -> 41326 bytes
-rw-r--r--core/res/res/drawable/lockscreen_emergency_button.xml21
-rw-r--r--core/res/res/drawable/lockscreen_forgot_password_button.xml21
-rw-r--r--core/res/res/layout-sw600dp/keyguard_screen_status_land.xml4
-rw-r--r--core/res/res/layout-sw600dp/keyguard_screen_status_port.xml4
-rw-r--r--core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml40
-rw-r--r--core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml68
-rw-r--r--core/res/res/layout/keyguard_screen_tab_unlock_land.xml238
-rw-r--r--core/res/res/layout/keyguard_screen_unlock_landscape.xml290
-rw-r--r--core/res/res/layout/keyguard_screen_unlock_portrait.xml270
-rw-r--r--core/res/res/values-land/dimens.xml3
-rw-r--r--core/res/res/values-sw600dp/dimens.xml7
-rw-r--r--core/res/res/values/dimens.xml10
-rw-r--r--policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java82
72 files changed, 523 insertions, 614 deletions
diff --git a/core/java/com/android/internal/widget/DigitalClock.java b/core/java/com/android/internal/widget/DigitalClock.java
index 0885b6e37d29..ac0dc35d7577 100644
--- a/core/java/com/android/internal/widget/DigitalClock.java
+++ b/core/java/com/android/internal/widget/DigitalClock.java
@@ -96,13 +96,13 @@ public class DigitalClock extends RelativeLayout {
};
static class AmPm {
- private TextView mAmPm;
+ private TextView mAmPmTextView;
private String mAmString, mPmString;
AmPm(View parent, Typeface tf) {
- mAmPm = (TextView) parent.findViewById(R.id.am_pm);
- if (tf != null) {
- mAmPm.setTypeface(tf);
+ mAmPmTextView = (TextView) parent.findViewById(R.id.am_pm);
+ if (mAmPmTextView != null && tf != null) {
+ mAmPmTextView.setTypeface(tf);
}
String[] ampm = new DateFormatSymbols().getAmPmStrings();
@@ -111,11 +111,15 @@ public class DigitalClock extends RelativeLayout {
}
void setShowAmPm(boolean show) {
- mAmPm.setVisibility(show ? View.VISIBLE : View.GONE);
+ if (mAmPmTextView != null) {
+ mAmPmTextView.setVisibility(show ? View.VISIBLE : View.GONE);
+ }
}
void setIsMorning(boolean isMorning) {
- mAmPm.setText(isMorning ? mAmString : mPmString);
+ if (mAmPmTextView != null) {
+ mAmPmTextView.setText(isMorning ? mAmString : mPmString);
+ }
}
}
diff --git a/core/java/com/android/internal/widget/LockPatternView.java b/core/java/com/android/internal/widget/LockPatternView.java
index bee8112923a5..fd49ae3428c0 100644
--- a/core/java/com/android/internal/widget/LockPatternView.java
+++ b/core/java/com/android/internal/widget/LockPatternView.java
@@ -131,6 +131,7 @@ public class LockPatternView extends View {
private int mAspect;
private final Matrix mArrowMatrix = new Matrix();
+ private final Matrix mCircleMatrix = new Matrix();
/**
* Represents a cell in the 3 X 3 matrix of the unlock pattern view.
@@ -281,9 +282,14 @@ public class LockPatternView extends View {
mBitmapArrowGreenUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_green_up);
mBitmapArrowRedUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_red_up);
- // we assume all bitmaps have the same size
- mBitmapWidth = mBitmapBtnDefault.getWidth();
- mBitmapHeight = mBitmapBtnDefault.getHeight();
+ // bitmaps have the size of the largest bitmap in this group
+ final Bitmap bitmaps[] = { mBitmapBtnDefault, mBitmapBtnTouched, mBitmapCircleDefault,
+ mBitmapCircleGreen, mBitmapCircleRed };
+
+ for (Bitmap bitmap : bitmaps) {
+ mBitmapWidth = Math.max(mBitmapWidth, bitmap.getWidth());
+ mBitmapHeight = Math.max(mBitmapHeight, bitmap.getHeight());
+ }
// allow vibration pattern to be customized
mVibePattern = loadVibratePattern(com.android.internal.R.array.config_virtualKeyVibePattern);
@@ -458,31 +464,40 @@ public class LockPatternView extends View {
break;
case MeasureSpec.EXACTLY:
default:
- result = specSize;
+ // use the specified size, if non-zero
+ result = specSize != 0 ? specSize : desired;
}
return result;
}
@Override
+ protected int getSuggestedMinimumWidth() {
+ // View should be large enough to contain 3 side-by-side target bitmaps
+ return 3 * mBitmapWidth;
+ }
+
+ @Override
+ protected int getSuggestedMinimumHeight() {
+ // View should be large enough to contain 3 side-by-side target bitmaps
+ return 3 * mBitmapWidth;
+ }
+
+ @Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- final int minimumWidth = 3 * mBitmapCircleDefault.getWidth();
- final int minimumHeight = 3 * mBitmapCircleDefault.getHeight();
+ final int minimumWidth = getSuggestedMinimumWidth();
+ final int minimumHeight = getSuggestedMinimumHeight();
int viewWidth = resolveMeasured(widthMeasureSpec, minimumWidth);
int viewHeight = resolveMeasured(heightMeasureSpec, minimumHeight);
- int requestedWidth = MeasureSpec.getSize(widthMeasureSpec);
- int requestedHeight = MeasureSpec.getSize(heightMeasureSpec);
switch (mAspect) {
case ASPECT_SQUARE:
- viewWidth = viewHeight = Math.min(requestedWidth, requestedHeight);
+ viewWidth = viewHeight = Math.min(viewWidth, viewHeight);
break;
case ASPECT_LOCK_WIDTH:
- viewWidth = requestedWidth;
- viewHeight = Math.min(requestedWidth, requestedHeight);
+ viewHeight = Math.min(viewWidth, viewHeight);
break;
case ASPECT_LOCK_HEIGHT:
- viewWidth = Math.min(requestedWidth, requestedHeight);
- viewHeight = requestedHeight;
+ viewWidth = Math.min(viewWidth, viewHeight);
break;
}
// Log.v(TAG, "LockPatternView dimensions: " + viewWidth + "x" + viewHeight);
@@ -947,8 +962,8 @@ public class LockPatternView extends View {
// This assumes that the arrow image is drawn at 12:00 with it's top edge
// coincident with the circle bitmap's top edge.
Bitmap arrow = green ? mBitmapArrowGreenUp : mBitmapArrowRedUp;
- final int cellWidth = mBitmapCircleDefault.getWidth();
- final int cellHeight = mBitmapCircleDefault.getHeight();
+ final int cellWidth = mBitmapWidth;
+ final int cellHeight = mBitmapHeight;
// the up arrow bitmap is at 12:00, so find the rotation from x axis and add 90 degrees.
final float theta = (float) Math.atan2(
@@ -956,7 +971,12 @@ public class LockPatternView extends View {
final float angle = (float) Math.toDegrees(theta) + 90.0f;
// compose matrix
+ float sx = Math.min(mSquareWidth / mBitmapWidth, 1.0f);
+ float sy = Math.min(mSquareHeight / mBitmapHeight, 1.0f);
mArrowMatrix.setTranslate(leftX + offsetX, topY + offsetY); // transform to cell position
+ mArrowMatrix.preTranslate(mBitmapWidth/2, mBitmapHeight/2);
+ mArrowMatrix.preScale(sx, sy);
+ mArrowMatrix.preTranslate(-mBitmapWidth/2, -mBitmapHeight/2);
mArrowMatrix.preRotate(angle, cellWidth / 2.0f, cellHeight / 2.0f); // rotate about cell center
mArrowMatrix.preTranslate((cellWidth - arrow.getWidth()) / 2.0f, 0.0f); // translate to 12:00 pos
canvas.drawBitmap(arrow, mArrowMatrix, mPaint);
@@ -1002,8 +1022,17 @@ public class LockPatternView extends View {
int offsetX = (int) ((squareWidth - width) / 2f);
int offsetY = (int) ((squareHeight - height) / 2f);
- canvas.drawBitmap(outerCircle, leftX + offsetX, topY + offsetY, mPaint);
- canvas.drawBitmap(innerCircle, leftX + offsetX, topY + offsetY, mPaint);
+ // Allow circles to shrink if the view is too small to hold them.
+ float sx = Math.min(mSquareWidth / mBitmapWidth, 1.0f);
+ float sy = Math.min(mSquareHeight / mBitmapHeight, 1.0f);
+
+ mCircleMatrix.setTranslate(leftX + offsetX, topY + offsetY);
+ mCircleMatrix.preTranslate(mBitmapWidth/2, mBitmapHeight/2);
+ mCircleMatrix.preScale(sx, sy);
+ mCircleMatrix.preTranslate(-mBitmapWidth/2, -mBitmapHeight/2);
+
+ canvas.drawBitmap(outerCircle, mCircleMatrix, mPaint);
+ canvas.drawBitmap(innerCircle, mCircleMatrix, mPaint);
}
@Override
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png b/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png
new file mode 100644
index 000000000000..94d27cf3df3e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_code_lock_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_code_lock_touched_holo.png b/core/res/res/drawable-hdpi/btn_code_lock_touched_holo.png
new file mode 100644
index 000000000000..94d27cf3df3e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_code_lock_touched_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lock_idle_alarm.png b/core/res/res/drawable-hdpi/ic_lock_idle_alarm.png
index 6b4f66d24f80..3cadaff0f798 100644
--- a/core/res/res/drawable-hdpi/ic_lock_idle_alarm.png
+++ b/core/res/res/drawable-hdpi/ic_lock_idle_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_normal.png
new file mode 100644
index 000000000000..460495af2c30
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_pressed.png b/core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_pressed.png
new file mode 100644
index 000000000000..b0f7ae97a1ae
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_emergencycall_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_normal.png
new file mode 100644
index 000000000000..6402d3d428b0
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_normal.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_pressed.png b/core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_pressed.png
new file mode 100644
index 000000000000..83be04650a0b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_forgotpassword_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_green_up_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_green_up_holo.png
new file mode 100644
index 000000000000..a68697507a7e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_green_up_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up_holo.png
new file mode 100644
index 000000000000..92db8efa14d7
--- /dev/null
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_drag_direction_red_up_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png
new file mode 100644
index 000000000000..237011c16b44
--- /dev/null
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png
new file mode 100644
index 000000000000..24180178097d
--- /dev/null
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_green_holo.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png
new file mode 100644
index 000000000000..2120bad70380
--- /dev/null
+++ b/core/res/res/drawable-hdpi/indicator_code_lock_point_area_red_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_default.png b/core/res/res/drawable-mdpi/btn_code_lock_default.png
index 45cc20dd6ddf..f524317d33f8 100644..100755
--- a/core/res/res/drawable-mdpi/btn_code_lock_default.png
+++ b/core/res/res/drawable-mdpi/btn_code_lock_default.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_default_holo.png b/core/res/res/drawable-mdpi/btn_code_lock_default_holo.png
new file mode 100644
index 000000000000..7d11275a7e92
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_code_lock_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched.png b/core/res/res/drawable-mdpi/btn_code_lock_touched.png
index 45cc20dd6ddf..5cd436c0b889 100644..100755
--- a/core/res/res/drawable-mdpi/btn_code_lock_touched.png
+++ b/core/res/res/drawable-mdpi/btn_code_lock_touched.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched_holo.png b/core/res/res/drawable-mdpi/btn_code_lock_touched_holo.png
new file mode 100644
index 000000000000..7d11275a7e92
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_code_lock_touched_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_idle_alarm.png b/core/res/res/drawable-mdpi/ic_lock_idle_alarm.png
index 97ac02361a2d..b5d3e0980551 100644
--- a/core/res/res/drawable-mdpi/ic_lock_idle_alarm.png
+++ b/core/res/res/drawable-mdpi/ic_lock_idle_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_idle_charging.png b/core/res/res/drawable-mdpi/ic_lock_idle_charging.png
index 4210db26765a..20d632068c39 100644..100755
--- a/core/res/res/drawable-mdpi/ic_lock_idle_charging.png
+++ b/core/res/res/drawable-mdpi/ic_lock_idle_charging.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_idle_lock.png b/core/res/res/drawable-mdpi/ic_lock_idle_lock.png
index 1060f5a8da15..0206aeef6883 100644..100755
--- a/core/res/res/drawable-mdpi/ic_lock_idle_lock.png
+++ b/core/res/res/drawable-mdpi/ic_lock_idle_lock.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_idle_low_battery.png b/core/res/res/drawable-mdpi/ic_lock_idle_low_battery.png
index 72e4afa14bec..bb967829d234 100644..100755
--- a/core/res/res/drawable-mdpi/ic_lock_idle_low_battery.png
+++ b/core/res/res/drawable-mdpi/ic_lock_idle_low_battery.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_normal.png b/core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_normal.png
new file mode 100644
index 000000000000..cae795fd7547
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_pressed.png b/core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_pressed.png
new file mode 100644
index 000000000000..28679564935b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_emergencycall_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_normal.png b/core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_normal.png
new file mode 100644
index 000000000000..a7e063a5c8c1
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_pressed.png b/core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_pressed.png
new file mode 100644
index 000000000000..53af5a54faa5
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_forgotpassword_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png
index 0bc86c36a70a..7ddeba529748 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up_holo.png
new file mode 100644
index 000000000000..89d209c3c724
--- /dev/null
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
index 2ab45477a1b8..7201e58a81c0 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up_holo.png
new file mode 100644
index 000000000000..1d4cb32100d1
--- /dev/null
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_holo.png
new file mode 100644
index 000000000000..a627cda96b02
--- /dev/null
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green_holo.png
new file mode 100644
index 000000000000..308624bce110
--- /dev/null
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green_holo.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png
new file mode 100644
index 000000000000..6c451ec5389a
--- /dev/null
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_idle_alarm.png b/core/res/res/drawable-xhdpi/ic_lock_idle_alarm.png
new file mode 100644
index 000000000000..2822a922fa48
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_idle_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_normal.png b/core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_normal.png
new file mode 100644
index 000000000000..a61f7a518d32
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_pressed.png b/core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_pressed.png
new file mode 100644
index 000000000000..dd5e4815b5d9
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_emergencycall_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_normal.png b/core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_normal.png
new file mode 100644
index 000000000000..e4172ce65002
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_normal.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_pressed.png b/core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_pressed.png
new file mode 100644
index 000000000000..e2c76217f128
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_forgotpassword_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_holo.png
new file mode 100644
index 000000000000..d98a126327c2
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_default_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green_holo.png
new file mode 100644
index 000000000000..4491f02f9b5f
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_green_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.png b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.png
new file mode 100644
index 000000000000..6e91fbcdf62a
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/indicator_code_lock_point_area_red_holo.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_alarm.png b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_alarm.png
new file mode 100644
index 000000000000..29cd47139d72
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_charging.png b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_charging.png
new file mode 100644
index 000000000000..211aa0b996a0
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_charging.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_lock.png b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_lock.png
new file mode 100644
index 000000000000..683ba22ce052
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_lock.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_low_battery.png b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_low_battery.png
new file mode 100644
index 000000000000..f4383f3a2f8c
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/ic_lock_idle_low_battery.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/btn_code_lock_default.png b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_default.png
new file mode 100644
index 000000000000..45cc20dd6ddf
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_default.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/btn_code_lock_touched.png b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_touched.png
new file mode 100644
index 000000000000..45cc20dd6ddf
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_touched.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.png
new file mode 100644
index 000000000000..97ac02361a2d
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.png
new file mode 100644
index 000000000000..4210db26765a
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.png
new file mode 100644
index 000000000000..1060f5a8da15
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.png
new file mode 100644
index 000000000000..72e4afa14bec
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_green_up.png
new file mode 100644
index 000000000000..0bc86c36a70a
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_green_up.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_red_up.png
new file mode 100644
index 000000000000..2ab45477a1b8
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_default.png
new file mode 100644
index 000000000000..fe72d000d4bf
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_default.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_green.png
new file mode 100644
index 000000000000..be666c6f553c
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_green.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_red.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_red.png
new file mode 100644
index 000000000000..962719725f26
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_red.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_default.png
new file mode 100644
index 000000000000..6662eb16c7e6
--- /dev/null
+++ b/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_default.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_green.png
new file mode 100644
index 000000000000..dce220a98a97
--- /dev/null
+++ b/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_green.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_red.png b/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_red.png
new file mode 100644
index 000000000000..746a3ea415b2
--- /dev/null
+++ b/core/res/res/drawable-xlarge-xhdpi/indicator_code_lock_point_area_red.png
Binary files differ
diff --git a/core/res/res/drawable/lockscreen_emergency_button.xml b/core/res/res/drawable/lockscreen_emergency_button.xml
new file mode 100644
index 000000000000..4ec6a963e1da
--- /dev/null
+++ b/core/res/res/drawable/lockscreen_emergency_button.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="true" android:drawable="@drawable/ic_lockscreen_emergencycall_normal" />
+ <item android:state_pressed="true" android:drawable="@drawable/ic_lockscreen_emergencycall_pressed" />
+ <item android:drawable="@drawable/ic_lockscreen_emergencycall_normal" />
+</selector>
diff --git a/core/res/res/drawable/lockscreen_forgot_password_button.xml b/core/res/res/drawable/lockscreen_forgot_password_button.xml
new file mode 100644
index 000000000000..6c081bf2c948
--- /dev/null
+++ b/core/res/res/drawable/lockscreen_forgot_password_button.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="true" android:drawable="@drawable/ic_lockscreen_forgotpassword_normal" />
+ <item android:state_pressed="true" android:drawable="@drawable/ic_lockscreen_forgotpassword_pressed" />
+ <item android:drawable="@drawable/ic_lockscreen_forgotpassword_normal" />
+</selector>
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
index 0a485e2fd0d1..302ee01c920e 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_status_land.xml
@@ -56,7 +56,7 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="none"
- android:textSize="98sp"
+ android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/lockscreen_clock_background"
android:layout_marginBottom="6dip"
@@ -67,7 +67,7 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="none"
- android:textSize="98sp"
+ android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/lockscreen_clock_foreground"
android:layout_alignLeft="@id/timeDisplayBackground"
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml b/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
index 346b21e87b84..53fe902796cf 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_status_port.xml
@@ -55,7 +55,7 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="none"
- android:textSize="98sp"
+ android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/lockscreen_clock_background"
android:layout_marginBottom="6dip"
@@ -66,7 +66,7 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="none"
- android:textSize="98sp"
+ android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/lockscreen_clock_foreground"
android:layout_marginBottom="6dip"
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml
index e3d7a3f8ee3b..7ac41b5f1913 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml
@@ -56,10 +56,8 @@
android:layout_gravity="center_vertical"
/>
- <!-- footer -->
-
- <!-- option 1: a single emergency call button -->
- <RelativeLayout android:id="@+id/footerNormal"
+ <!-- Emergency and forgot pattern buttons. -->
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/lockPattern"
@@ -68,43 +66,27 @@
android:layout_marginTop="28dip"
android:layout_marginLeft="28dip"
android:layout_marginRight="28dip"
- >
- <Button android:id="@+id/emergencyCallAlone"
+ android:orientation="horizontal">
+
+ <Button android:id="@+id/forgotPatternButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/lockscreen_emergency_call"
+ android:layout_gravity="center"
style="@style/Widget.Button.Transparent"
android:drawableLeft="@drawable/ic_emergency"
android:drawablePadding="8dip"
+ android:text="@string/lockscreen_forgot_pattern_button_text"
android:visibility="gone"
- />
- </RelativeLayout>
-
- <!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
- <LinearLayout android:id="@+id/footerForgotPattern"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/footerNormal"
- android:layout_alignLeft="@id/lockPattern"
- android:layout_alignRight="@id/lockPattern"
- android:layout_marginTop="28dip"
- android:layout_marginLeft="28dip"
- android:layout_marginRight="28dip">
-
- <Button android:id="@+id/forgotPattern"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/Widget.Button.Transparent"
/>
- <Button android:id="@+id/emergencyCallTogether"
- android:layout_width="match_parent"
+ <Button android:id="@+id/emergencyCallButton"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/lockscreen_emergency_call"
+ android:layout_gravity="center"
style="@style/Widget.Button.Transparent"
android:drawableLeft="@drawable/ic_emergency"
android:drawablePadding="8dip"
+ android:text="@string/lockscreen_emergency_call"
android:visibility="gone"
/>
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml
index f35897e2425d..1f6058fc2fab 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml
@@ -23,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <!-- top: status -->
+ <!-- top: status and emergency/forgot pattern buttons -->
<LinearLayout
android:layout_height="0dip"
android:layout_weight="1"
@@ -36,53 +36,37 @@
android:layout_marginTop="134dip"
android:layout_marginLeft="266dip"/>
- <!-- footer -->
- <FrameLayout
+ <!-- Emergency and forgot pattern buttons. -->
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="140dip"
- >
+ android:orientation="horizontal"
+ android:gravity="center_horizontal">
- <!-- option 1: a single emergency call button -->
- <RelativeLayout android:id="@+id/footerNormal"
- android:layout_width="match_parent"
+ <Button android:id="@+id/forgotPatternButton"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="left"
- >
- <Button android:id="@+id/emergencyCallAlone"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/lockscreen_emergency_call"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- android:visibility="gone"
- />
- </RelativeLayout>
+ android:layout_gravity="center"
+ style="@style/Widget.Button.Transparent"
+ android:drawableLeft="@drawable/ic_emergency"
+ android:drawablePadding="8dip"
+ android:text="@string/lockscreen_forgot_pattern_button_text"
+ android:visibility="gone"
+ />
- <!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
- <LinearLayout android:id="@+id/footerForgotPattern"
- android:orientation="vertical"
- android:layout_width="match_parent"
+ <Button android:id="@+id/emergencyCallButton"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="left"
- >
- <Button android:id="@+id/forgotPattern"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/Widget.Button.Transparent"
- />
- <Button android:id="@+id/emergencyCallTogether"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/lockscreen_emergency_call"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- android:visibility="gone"
- />
- </LinearLayout>
- </FrameLayout>
+ android:layout_gravity="center"
+ style="@style/Widget.Button.Transparent"
+ android:drawableLeft="@drawable/ic_emergency"
+ android:drawablePadding="8dip"
+ android:text="@string/lockscreen_emergency_call"
+ android:visibility="gone"
+ />
+
+ </LinearLayout>
+
</LinearLayout>
<!-- right side: lock pattern -->
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
index df29a4b3c09e..d45cc859968f 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
@@ -20,154 +20,155 @@
<!-- This is the general lock screen which shows information about the
state of the device, as well as instructions on how to get past it
depending on the state of the device.-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="horizontal"
+ android:orientation="vertical"
+ android:rowCount="10"
android:id="@+id/root"
android:clipChildren="false">
- <!-- left side -->
- <RelativeLayout
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1.0"
- android:layout_marginLeft="24dip"
- android:gravity="left">
+ <!-- Column 0 -->
+ <Space android:height="20dip"/>
- <TextView
- android:id="@+id/carrier"
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
+ android:layout_marginTop="56dip"
+ android:layout_marginBottom="8dip">
+
+ <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
+ top of the other. Hence the redundant layout... -->
+ <TextView android:id="@+id/timeDisplayBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_marginTop="20dip"
android:singleLine="true"
- android:ellipsize="marquee"
- android:gravity="right|bottom"
+ android:ellipsize="none"
+ android:textSize="72sp"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_marginBottom="6dip"
+ android:textColor="@color/lockscreen_clock_background"
/>
- <!-- "emergency calls only" shown when sim is missing or PUKd -->
- <TextView
- android:id="@+id/emergencyCallText"
+ <TextView android:id="@+id/timeDisplayForeground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_marginTop="20dip"
- android:text="@string/emergency_calls_only"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/white"
- />
-
- <com.android.internal.widget.DigitalClock android:id="@+id/time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/carrier"
- android:layout_marginTop="56dip"
- android:layout_marginBottom="8dip"
- >
-
- <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
- top of the other. Hence the redundant layout... -->
- <TextView android:id="@+id/timeDisplayBackground"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="72sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="6dip"
- android:textColor="@color/lockscreen_clock_background"
- />
-
- <TextView android:id="@+id/timeDisplayForeground"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="72sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="6dip"
- android:textColor="@color/lockscreen_clock_foreground"
- android:layout_alignLeft="@id/timeDisplayBackground"
- android:layout_alignTop="@id/timeDisplayBackground"
- />
-
- <TextView android:id="@+id/am_pm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/timeDisplayBackground"
- android:layout_alignBaseline="@id/timeDisplayBackground"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="22sp"
- android:layout_marginLeft="8dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/lockscreen_clock_am_pm"
- />
-
- </com.android.internal.widget.DigitalClock>
-
- <TextView
- android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/time"
- android:layout_marginTop="6dip"
+ android:singleLine="true"
+ android:ellipsize="none"
+ android:textSize="72sp"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_marginBottom="6dip"
+ android:textColor="@color/lockscreen_clock_foreground"
+ android:layout_alignLeft="@id/timeDisplayBackground"
+ android:layout_alignTop="@id/timeDisplayBackground"
/>
- <!-- TODO: Redo layout when we release on phones -->
- <TextView
- android:id="@+id/alarm_status"
+ <TextView android:id="@+id/am_pm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/timeDisplayBackground"
+ android:layout_alignBaseline="@id/timeDisplayBackground"
+ android:singleLine="true"
+ android:ellipsize="none"
+ android:textSize="22sp"
+ android:layout_marginLeft="8dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="18sp"
- android:drawablePadding="4dip"
- android:layout_below="@id/date"
- android:layout_marginTop="4dip"
- android:layout_marginLeft="24dip"
+ android:textColor="@color/lockscreen_clock_am_pm"
+ android:visibility="gone"
/>
- <TextView
- android:id="@+id/status1"
+ </com.android.internal.widget.DigitalClock>
+
+ <TextView
+ android:id="@+id/date"
+ android:layout_below="@id/time"
+ android:layout_marginTop="6dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_gravity="left"
+ />
+
+ <TextView
+ android:id="@+id/alarm_status"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="18sp"
+ android:drawablePadding="4dip"
+ android:layout_marginTop="4dip"
+ android:layout_gravity="left"
+ />
+
+ <TextView
+ android:id="@+id/status1"
+ android:layout_marginTop="4dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:drawablePadding="4dip"
+ android:layout_gravity="left"
+ />
+
+ <TextView
+ android:id="@+id/status2"
+ android:layout_marginTop="4dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:drawablePadding="4dip"
+ android:layout_gravity="left"
+ />
+
+ <TextView
+ android:id="@+id/screenLocked"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:gravity="center"
+ android:layout_marginTop="4dip"
+ android:drawablePadding="4dip"
+ android:layout_gravity="left"
+ />
+
+ <Space android:height="20dip"/>
+
+ <LinearLayout android:orientation="horizontal" >
+
+ <TextView
+ android:id="@+id/carrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/alarm_status"
- android:layout_marginTop="6dip"
+ android:layout_alignParentTop="true"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:layout_gravity="bottom|left"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:drawablePadding="4dip"
- />
+ />
- <TextView
- android:id="@+id/status2"
+ <Button
+ android:id="@+id/emergencyCallButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/status1"
- android:layout_marginTop="6dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:drawablePadding="4dip"
- />
+ android:drawableLeft="@drawable/ic_emergency"
+ style="@style/Widget.Button.Transparent"
+ android:drawablePadding="8dip"
+ android:layout_marginRight="80dip"
+ android:visibility="gone"
+ />
+ <!-- "emergency calls only" shown when sim is missing or PUKd -->
<TextView
- android:id="@+id/screenLocked"
+ android:id="@+id/emergencyCallText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/status2"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center"
- android:layout_marginTop="12dip"
- android:drawablePadding="4dip"
- />
+ android:layout_alignParentTop="true"
+ android:layout_marginTop="20dip"
+ android:text="@string/emergency_calls_only"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/white"
+ />
+ </LinearLayout>
- </RelativeLayout>
+ <Space android:height="20dip"/>
- <!-- right side -->
+ <!-- Column 1 -->
+ <Space android:width="20dip" android:layout_columnWeight="1" android:layout_rowSpan="10" />
+
+ <!-- Column 2 -->
<com.android.internal.widget.multiwaveview.MultiWaveView
android:id="@+id/unlock_widget"
android:layout_width="300dip"
android:layout_height="match_parent"
+ android:layout_rowSpan="10"
android:targetDrawables="@array/lockscreen_targets_when_silent"
android:handleDrawable="@drawable/ic_lockscreen_handle"
@@ -178,21 +179,8 @@
android:vibrationDuration="20"
android:topChevronDrawable="@drawable/ic_lockscreen_chevron_up"
android:feedbackCount="3"
- android:horizontalOffset="60dip"
+ android:horizontalOffset="0dip"
android:verticalOffset="0dip"
/>
- <!-- emergency call button shown when sim is PUKd and tab_selector is
- hidden -->
- <Button
- android:id="@+id/emergencyCallButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/ic_emergency"
- style="@style/Widget.Button.Transparent"
- android:drawablePadding="8dip"
- android:layout_marginRight="80dip"
- android:visibility="gone"
- />
-
-</LinearLayout>
+</GridLayout>
diff --git a/core/res/res/layout/keyguard_screen_unlock_landscape.xml b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
index c7b78c4473c6..d52bc57c8c59 100644
--- a/core/res/res/layout/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
@@ -21,198 +21,124 @@
the user how to unlock their device, or make an emergency call. This
is the portrait layout. -->
-<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
+<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/root"
+ android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <!-- left side: instructions and emergency call button -->
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1.0"
- android:layout_marginLeft="24dip"
- android:gravity="left"
- >
-
- <TextView
- android:id="@+id/alarm_status"
+ android:layout_height="match_parent"
+ android:rowCount="9">
+
+ <!-- Column 0: Time, date and status -->
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dip"
+ android:layout_marginBottom="12dip"
+ android:layout_gravity="right">
+
+ <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
+ top of the other. Hence the redundant layout... -->
+ <TextView android:id="@+id/timeDisplayBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:ellipsize="none"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="18sp"
- android:drawablePadding="4dip"
- />
- <TextView
- android:id="@+id/status1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"
+ android:layout_marginBottom="6dip"
+ android:textColor="@color/lockscreen_clock_background"
/>
- <TextView
- android:id="@+id/carrier"
+ <TextView android:id="@+id/timeDisplayForeground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"
- android:drawablePadding="4dip"
- android:layout_marginTop="32dip"
android:singleLine="true"
- android:ellipsize="marquee"
- android:gravity="right|bottom"
- />
-
- <com.android.internal.widget.DigitalClock android:id="@+id/time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"
- android:layout_marginTop="8dip"
- android:layout_marginBottom="8dip"
- >
-
- <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
- top of the other. Hence the redundant layout... -->
- <TextView android:id="@+id/timeDisplayBackground"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="72sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="6dip"
- android:textColor="@color/lockscreen_clock_background"
- />
-
- <TextView android:id="@+id/timeDisplayForeground"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="72sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="6dip"
- android:layout_alignLeft="@id/timeDisplayBackground"
- android:layout_alignTop="@id/timeDisplayBackground"
- android:textColor="@color/lockscreen_clock_foreground"
- />
-
-
-
- <TextView android:id="@+id/am_pm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/timeDisplayBackground"
- android:layout_alignBaseline="@id/timeDisplayBackground"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="22sp"
- android:layout_marginLeft="8dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/lockscreen_clock_am_pm"
- />
-
- </com.android.internal.widget.DigitalClock>
-
- <TextView
- android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/time"
+ android:ellipsize="none"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"
+ android:layout_marginBottom="6dip"
+ android:layout_alignLeft="@id/timeDisplayBackground"
+ android:layout_alignTop="@id/timeDisplayBackground"
+ android:textColor="@color/lockscreen_clock_foreground"
/>
- <!-- used for instructions such as "draw pattern to unlock", the next alarm, and charging
- status. -->
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dip"
- android:gravity="center"
- >
- <TextView
- android:id="@+id/statusSep"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"
- />
- <TextView
- android:id="@+id/status2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="17sp"
- android:drawablePadding="4dip"
- />
- </LinearLayout>
-
- <!-- fill space between header and button below -->
- <View
- android:layout_weight="1.0"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- />
-
- <!-- footer -->
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="16dip"
- >
-
- <!-- option 1: a single emergency call button -->
- <RelativeLayout android:id="@+id/footerNormal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="left"
- >
- <Button android:id="@+id/emergencyCallAlone"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/lockscreen_emergency_call"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- />
- </RelativeLayout>
-
- <!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
- <LinearLayout android:id="@+id/footerForgotPattern"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="left"
- >
- <Button android:id="@+id/forgotPattern"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/Widget.Button.Transparent"
- android:visibility="invisible"
- />
- <Button android:id="@+id/emergencyCallTogether"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/lockscreen_emergency_call"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- />
- </LinearLayout>
- </FrameLayout>
- </LinearLayout>
-
- <!-- right side: lock pattern -->
+ </com.android.internal.widget.DigitalClock>
+
+ <TextView
+ android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:layout_gravity="right"
+ />
+
+ <TextView
+ android:id="@+id/alarm_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:layout_gravity="right"
+ android:drawablePadding="4dip"
+ />
+
+ <TextView
+ android:id="@+id/status1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:layout_gravity="right"
+ />
+
+ <TextView
+ android:id="@+id/status2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:layout_gravity="right"
+ android:drawablePadding="4dip"
+ android:visibility="gone"
+ />
+
+ <Space android:layout_rowWeight="1" android:layout_columnWeight="1" />
+
+ <TextView android:id="@+id/carrier"
+ android:layout_gravity="right"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ />
+
+ <Button android:id="@+id/emergencyCallButton"
+ android:layout_gravity="right"
+ style="@*android:style/Widget.Button.Transparent"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:text="@string/lockscreen_emergency_call"
+ android:drawableLeft="@*android:drawable/lockscreen_emergency_button"
+ android:drawablePadding="0dip"
+ />
+
+ <Button android:id="@+id/forgotPatternButton"
+ android:layout_gravity="right"
+ style="@*android:style/Widget.Button.Transparent"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:text="@*android:string/lockscreen_forgot_pattern_button_text"
+ android:drawableLeft="@*android:drawable/lockscreen_forgot_password_button"
+ android:drawablePadding="0dip"
+ />
+
+ <!-- Column 1: lock pattern -->
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
-</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="8dip"
+ android:layout_marginRight="8dip"
+ android:layout_marginBottom="8dip"
+ android:layout_marginLeft="8dip"
+ android:layout_rowSpan="9"/>
+
+</GridLayout>
diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
index 15f2afb3c4d4..0132b6c8dcdd 100644
--- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
@@ -20,213 +20,149 @@
<!-- This is the screen that shows the 9 circle unlock widget and instructs
the user how to unlock their device, or make an emergency call. This
is the portrait layout. -->
-<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
+<GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal">
- <RelativeLayout
- android:layout_width="match_parent"
+
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- >
- <TextView
- android:id="@+id/carrier"
+ android:layout_marginBottom="18dip"
+ android:layout_marginRight="-4dip"
+ android:layout_gravity="right">
+
+ <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
+ top of the other. Hence the redundant layout... -->
+ <TextView android:id="@*android:id/timeDisplayBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_marginTop="6dip"
- android:layout_alignParentRight="true"
- android:layout_marginRight="8dip"
- android:layout_toRightOf="@+id/time"
android:singleLine="true"
- android:ellipsize="marquee"
- android:gravity="right|bottom"
+ android:ellipsize="none"
+ android:textSize="@*android:dimen/keyguard_pattern_unlock_clock_font_size"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_marginBottom="6dip"
+ android:textColor="@*android:color/lockscreen_clock_background"
/>
- <com.android.internal.widget.DigitalClock android:id="@+id/time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:layout_marginTop="15dip"
- android:layout_marginLeft="20dip"
- android:layout_marginBottom="8dip"
- >
-
- <!-- Because we can't have multi-tone fonts, we render two TextViews, one on
- top of the other. Hence the redundant layout... -->
- <TextView android:id="@+id/timeDisplayBackground"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="56sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="6dip"
- android:textColor="@color/lockscreen_clock_background"
- />
-
- <TextView android:id="@+id/timeDisplayForeground"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="56sp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="6dip"
- android:textColor="@color/lockscreen_clock_foreground"
- />
-
- <TextView android:id="@+id/am_pm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/timeDisplayBackground"
- android:layout_alignBaseline="@id/timeDisplayBackground"
- android:singleLine="true"
- android:ellipsize="none"
- android:textSize="18sp"
- android:layout_marginLeft="4dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/lockscreen_clock_am_pm"
- />
-
- </com.android.internal.widget.DigitalClock>
-
- <TextView
- android:id="@+id/date"
+ <TextView android:id="@*android:id/timeDisplayForeground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/time"
- android:layout_marginLeft="24dip"
+ android:singleLine="true"
+ android:ellipsize="none"
+ android:textSize="@*android:dimen/keyguard_pattern_unlock_clock_font_size"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_marginBottom="6dip"
+ android:textColor="@color/lockscreen_clock_foreground"
/>
- </RelativeLayout>
-
- <View
- android:id="@+id/divider"
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:layout_marginTop="8dip"
- android:layout_marginBottom="8dip"
- android:background="@android:drawable/divider_horizontal_dark"
- />
+ </com.android.internal.widget.DigitalClock>
- <!-- used for instructions such as "draw pattern to unlock", the next alarm, and charging
- status. -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dip"
android:layout_marginLeft="12dip"
- android:gravity="left"
- >
- <!-- TODO: Redo layout when we release on phones -->
- <TextView
- android:id="@+id/alarm_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="18sp"
- android:drawablePadding="4dip"
- />
- <TextView
- android:id="@+id/status1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="18sp"
- android:drawablePadding="4dip"
- />
+ android:layout_gravity="right">
+
<TextView
- android:id="@+id/statusSep"
+ android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="18sp"
+ android:textSize="@*android:dimen/keyguard_pattern_unlock_status_line_font_size"
/>
+
<TextView
- android:id="@+id/status2"
+ android:id="@+id/alarm_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
+ android:layout_marginLeft="16dip"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="18sp"
+ android:textSize="@*android:dimen/keyguard_pattern_unlock_status_line_font_size"
android:drawablePadding="4dip"
/>
+
</LinearLayout>
+
+ <TextView
+ android:id="@+id/status1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@*android:dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:drawablePadding="4dip"
+ android:layout_gravity="right"
+ />
+
+ <TextView
+ android:id="@+id/status2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="@*android:dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:drawablePadding="4dip"
+ android:layout_gravity="right"
+ android:visibility="gone"
+ />
+
<com.android.internal.widget.LockPatternView
android:id="@+id/lockPattern"
android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- android:layout_marginTop="2dip"
- android:aspect="@string/lock_pattern_view_aspect"
- />
-
- <!-- footer -->
- <FrameLayout
+ android:layout_height="match_parent"
+ android:layout_rowWeight="1"
+ android:layout_marginTop="8dip"
+ android:layout_marginRight="8dip"
+ android:layout_marginBottom="4dip"
+ android:layout_marginLeft="8dip"
+ />
+
+ <TextView
+ android:id="@+id/carrier"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:textSize="@*android:dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ />
+
+ <!-- Footer: an emergency call button and an initially hidden "Forgot pattern" button -->
+ <LinearLayout
+ android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- >
-
- <!-- option 1: a single emergency call button -->
- <RelativeLayout android:id="@+id/footerNormal"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- >
- <Button android:id="@+id/emergencyCallAlone"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:text="@string/lockscreen_emergency_call"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- />
-
- </RelativeLayout>
-
- <!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
- <LinearLayout android:id="@+id/footerForgotPattern"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- >
- <Button android:id="@+id/emergencyCallTogether"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1.0"
- android:layout_marginTop="4dip"
- android:layout_marginBottom="4dip"
- android:layout_marginLeft="4dip"
- android:layout_marginRight="2dip"
- android:text="@string/lockscreen_emergency_call"
- style="@style/Widget.Button.Transparent"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- />
- <Button android:id="@+id/forgotPattern"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1.0"
- android:layout_marginTop="4dip"
- android:layout_marginBottom="4dip"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="4dip"
- style="@style/Widget.Button.Transparent"
- android:visibility="invisible"
- />
- </LinearLayout>
-
- </FrameLayout>
-
-</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
+ android:layout_gravity="center">
+
+ <Button android:id="@+id/emergencyCallButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ style="@style/Widget.Button.Transparent"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:text="@string/lockscreen_emergency_call"
+ android:drawableLeft="@drawable/lockscreen_emergency_button"
+ android:drawablePadding="0dip"
+ />
+
+ <Button android:id="@+id/forgotPatternButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ style="@style/Widget.Button.Transparent"
+ android:textSize="@dimen/keyguard_pattern_unlock_status_line_font_size"
+ android:text="@string/lockscreen_forgot_pattern_button_text"
+ android:drawableLeft="@drawable/lockscreen_forgot_password_button"
+ android:drawablePadding="0dip"
+ />
+
+ </LinearLayout>
+
+</GridLayout>
diff --git a/core/res/res/values-land/dimens.xml b/core/res/res/values-land/dimens.xml
index dbaad13f4019..b8ce9b4bb95a 100644
--- a/core/res/res/values-land/dimens.xml
+++ b/core/res/res/values-land/dimens.xml
@@ -32,4 +32,7 @@
<!-- Default height of an action bar. -->
<dimen name="action_bar_default_height">40dip</dimen>
+ <!-- Size of clock font in LockScreen. -->
+ <dimen name="keyguard_pattern_unlock_clock_font_size">80sp</dimen>
+
</resources>
diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml
index df1597cdcc27..150b6d4c137a 100644
--- a/core/res/res/values-sw600dp/dimens.xml
+++ b/core/res/res/values-sw600dp/dimens.xml
@@ -24,5 +24,12 @@
<dimen name="status_bar_icon_size">32dip</dimen>
<!-- Size of the giant number (unread count) in the notifications -->
<dimen name="status_bar_content_number_size">48sp</dimen>
+
+ <!-- Size of clock font in LockScreen. -->
+ <dimen name="keyguard_pattern_unlock_clock_font_size">98sp</dimen>
+
+ <!-- Size of status line font in LockScreen. -->
+ <dimen name="keyguard_pattern_unlock_status_line_font_size">14sp</dimen>
+
</resources>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 0725c2fcf64c..20cb85273a8f 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -119,4 +119,14 @@
<dimen name="action_bar_default_height">48dip</dimen>
<!-- Vertical padding around action bar icons. -->
<dimen name="action_bar_icon_vertical_padding">4dip</dimen>
+
+ <!-- Size of clock font in LockScreen. -->
+ <dimen name="keyguard_pattern_unlock_clock_font_size">80sp</dimen>
+
+ <!-- Size of status line font in LockScreen. -->
+ <dimen name="keyguard_pattern_unlock_status_line_font_size">14sp</dimen>
+
+ <!-- Size of right margin in LockScreen -->
+ <dimen name="keyguard_pattern_unlock_status_line_font_right_margin">20dip</dimen>
+
</resources>
diff --git a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
index a6854973bab1..cd79b60f8b96 100644
--- a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
@@ -23,6 +23,7 @@ import android.os.SystemClock;
import android.security.KeyStore;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.MotionEvent;
import android.widget.Button;
@@ -73,12 +74,8 @@ class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
private boolean mEnableFallback;
private StatusView mStatusView;
-
private LockPatternView mLockPatternView;
- private ViewGroup mFooterNormal;
- private ViewGroup mFooterForgotPattern;
-
/**
* Keeps track of the last time we poked the wake lock during dispatching
* of the touch event, initalized to something gauranteed to make us
@@ -96,9 +93,20 @@ class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
}
};
+ private final OnClickListener mEmergencyClick = new OnClickListener() {
+ public void onClick(View v) {
+ mCallback.takeEmergencyCallAction();
+ }
+ };
+
+ private final OnClickListener mForgotPatternClick = new OnClickListener() {
+ public void onClick(View v) {
+ mCallback.forgotPattern(true);
+ }
+ };
+
private Button mForgotPatternButton;
- private Button mEmergencyAlone;
- private Button mEmergencyTogether;
+ private Button mEmergencyButton;
private int mCreationOrientation;
enum FooterMode {
@@ -107,23 +115,27 @@ class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
VerifyUnlocked
}
+ private void hideForgotPatternButton() {
+ mForgotPatternButton.setVisibility(View.GONE);
+ }
+
+ private void showForgotPatternButton() {
+ mForgotPatternButton.setVisibility(View.VISIBLE);
+ }
+
private void updateFooter(FooterMode mode) {
switch (mode) {
case Normal:
- Log.d(TAG, "mode normal");
- mFooterNormal.setVisibility(View.VISIBLE);
- mFooterForgotPattern.setVisibility(View.GONE);
+ if (DEBUG) Log.d(TAG, "mode normal");
+ hideForgotPatternButton();
break;
case ForgotLockPattern:
- Log.d(TAG, "mode ForgotLockPattern");
- mFooterNormal.setVisibility(View.GONE);
- mFooterForgotPattern.setVisibility(View.VISIBLE);
- mForgotPatternButton.setVisibility(View.VISIBLE);
+ if (DEBUG) Log.d(TAG, "mode ForgotLockPattern");
+ showForgotPatternButton();
break;
case VerifyUnlocked:
- Log.d(TAG, "mode VerifyUnlocked");
- mFooterNormal.setVisibility(View.GONE);
- mFooterForgotPattern.setVisibility(View.GONE);
+ if (DEBUG) Log.d(TAG, "mode VerifyUnlocked");
+ hideForgotPatternButton();
}
}
@@ -176,32 +188,16 @@ class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);
- mFooterNormal = (ViewGroup) findViewById(R.id.footerNormal);
- mFooterForgotPattern = (ViewGroup) findViewById(R.id.footerForgotPattern);
-
// emergency call buttons
- final OnClickListener emergencyClick = new OnClickListener() {
- public void onClick(View v) {
- mCallback.takeEmergencyCallAction();
- }
- };
-
- mEmergencyAlone = (Button) findViewById(R.id.emergencyCallAlone);
- mEmergencyAlone.setFocusable(false); // touch only!
- mEmergencyAlone.setOnClickListener(emergencyClick);
- mEmergencyTogether = (Button) findViewById(R.id.emergencyCallTogether);
- mEmergencyTogether.setFocusable(false);
- mEmergencyTogether.setOnClickListener(emergencyClick);
+ mEmergencyButton = (Button) findViewById(R.id.emergencyCallButton);
+ mEmergencyButton.setFocusable(false); // touch only!
+ mEmergencyButton.setOnClickListener(mEmergencyClick);
+
refreshEmergencyButtonText();
- mForgotPatternButton = (Button) findViewById(R.id.forgotPattern);
+ mForgotPatternButton = (Button) findViewById(R.id.forgotPatternButton);
mForgotPatternButton.setText(R.string.lockscreen_forgot_pattern_button_text);
- mForgotPatternButton.setOnClickListener(new OnClickListener() {
-
- public void onClick(View v) {
- mCallback.forgotPattern(true);
- }
- });
+ mForgotPatternButton.setOnClickListener(mForgotPatternClick);
// make it so unhandled touch events within the unlock screen go to the
// lock pattern view.
@@ -232,8 +228,7 @@ class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
}
private void refreshEmergencyButtonText() {
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyAlone);
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyTogether);
+ mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyButton);
}
public void setEnableFallback(boolean state) {
@@ -338,8 +333,11 @@ class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
mLockPatternView.clearPattern();
// show "forgot pattern?" button if we have an alternate authentication method
- mForgotPatternButton.setVisibility(mCallback.doesFallbackUnlockScreenExist()
- ? View.VISIBLE : View.INVISIBLE);
+ if (mCallback.doesFallbackUnlockScreenExist()) {
+ showForgotPatternButton();
+ } else {
+ hideForgotPatternButton();
+ }
// if the user is currently locked out, enforce it.
long deadline = mLockPatternUtils.getLockoutAttemptDeadline();