android:layout_height="match_parent"
>
<ImageView android:id="@+id/icon"
- android:layout_width="48dp"
- android:layout_height="64dp"
- android:layout_marginLeft="4dp"
+ android:layout_width="@dimen/notification_large_icon_width"
+ android:layout_height="@dimen/notification_large_icon_height"
+ android:background="@drawable/notify_panel_notification_icon_bg"
android:scaleType="center"
/>
<LinearLayout
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
- android:paddingLeft="8dp"
+ android:paddingLeft="16dp"
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
+ android:layout_marginBottom="-4dp"
/>
<TextView android:id="@+id/text"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
+ android:paddingLeft="16dp"
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
+ android:layout_marginBottom="-4dp"
/>
<TextView android:id="@+id/text"
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
android:fadingEdge="horizontal"
/>
</LinearLayout>
- <TextView android:id="@+id/info"
- android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info"
+ <RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:singleLine="true"
- android:gravity="center_vertical"
- android:paddingLeft="8dp"
- />
- <ImageView android:id="@+id/icon"
- android:layout_width="48dp"
- android:layout_height="32dp"
- android:layout_gravity="top"
- android:layout_marginTop="8dp"
- android:scaleType="center"
- />
+ >
+ <TextView android:id="@+id/info"
+ android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:singleLine="true"
+ android:gravity="center_vertical"
+ android:layout_alignParentLeft="true"
+ android:paddingLeft="8dp"
+ />
+ <ImageView android:id="@+id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_alignRight="@id/info"
+ android:layout_marginBottom="8dip"
+ android:scaleType="center"
+ />
+ </RelativeLayout>
</LinearLayout>
<item type="dimen" name="dialog_min_width_minor">95%</item>
<!-- The width of the big icons in notifications. -->
- <dimen name="notification_large_icon_width">60dp</dimen>
+ <dimen name="notification_large_icon_width">64dp</dimen>
<!-- The width of the big icons in notifications. -->
- <dimen name="notification_large_icon_height">60dp</dimen>
+ <dimen name="notification_large_icon_height">64dp</dimen>
<!-- Minimum width of the search view text entry area. -->
<dimen name="search_view_text_min_width">160dip</dimen>
<item name="android:textStyle">bold</item>
</style>
<style name="TextAppearance.StatusBar.EventContent">
- <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+ <item name="android:textSize">10sp</item>
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
<style name="TextAppearance.StatusBar.EventContent.Title">
frameworks/base/data/fonts/Clockopia.ttf:system/fonts/Clockopia.ttf \
frameworks/base/data/fonts/DroidSansFallback.ttf:system/fonts/DroidSansFallback.ttf \
frameworks/base/data/fonts/AndroidClock.ttf:system/fonts/AndroidClock.ttf \
- frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Highlight.ttf
+ frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Highlight.ttf \
+ frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Solid.ttf
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="4dp"
+ android:layout_marginBottom="2dip"
+ android:layout_marginLeft="4dip"
+ android:layout_marginRight="4dip"
>
- <TextView android:id="@+id/time_bg"
+ <TextView android:id="@+id/time_solid"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:singleLine="true"
- android:textSize="40sp"
- android:textColor="#1f1f1f" />
- <TextView android:id="@+id/time_fg"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
android:singleLine="true"
android:textSize="40sp"
- android:textColor="#2e2e2e" />
+ android:textColor="#8cffffff" />
</com.android.systemui.statusbar.tablet.HoloClock>
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
>
- <com.android.systemui.statusbar.tablet.NotificationLinearLayout
+ <LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:descendantFocusability="afterDescendants"
- >
- </com.android.systemui.statusbar.tablet.NotificationLinearLayout>
+ />
</ScrollView>
</LinearLayout>
</RelativeLayout>
- <View
- android:id="@+id/glow"
- android:background="@drawable/notify_glow_back"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignTop="@id/content_parent"
- android:layout_alignLeft="@id/content_parent"
- android:layout_marginLeft="100dip"
- android:layout_marginTop="50dip"
- />
-
</com.android.systemui.statusbar.tablet.NotificationPanel>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="65dp"
- android:background="@drawable/status_bar_item_background"
>
<ImageButton
android:layout_alignParentRight="true"
android:src="@drawable/status_bar_veto"
android:scaleType="center"
- android:background="#ff000000"
+ android:background="@null"
android:paddingRight="8dp"
+ android:paddingLeft="8dp"
/>
<ImageView
android:layout_alignParentLeft="true"
android:scaleType="center"
/>
- <!-- TODO: scaleType should be top-left but ImageView doesn't support that. -->
<com.android.systemui.statusbar.LatestItemView android:id="@+id/content"
android:layout_width="match_parent"
private String mClockFormatString;
private SimpleDateFormat mClockFormat;
- private static Typeface sBackgroundType, sForegroundType;
- private TextView mBgText, mFgText;
+ private static final String FONT_DIR = "/system/fonts/";
+ private static final String CLOCK_FONT = FONT_DIR + "AndroidClock_Solid.ttf";
+ private static final String CLOCK_FG_FONT = FONT_DIR + "AndroidClock.ttf";
+ private static final String CLOCK_BG_FONT = FONT_DIR + "AndroidClock_Highlight.ttf";
+
+ private static Typeface sBackgroundType, sForegroundType, sSolidType;
+ private TextView mSolidText, mBgText, mFgText;
public HoloClock(Context context) {
this(context, null);
protected void onFinishInflate() {
super.onFinishInflate();
- if (sBackgroundType == null) {
- AssetManager assets = getContext().getAssets();
-
- sBackgroundType = Typeface.createFromAsset(assets,
- "fonts/AndroidClock.ttf");
- sForegroundType = Typeface.createFromAsset(assets,
- "fonts/AndroidClock2.ttf");
+ if (sSolidType == null) {
+ sSolidType = Typeface.createFromFile(CLOCK_FONT);
+ sBackgroundType = Typeface.createFromFile(CLOCK_BG_FONT);
+ sForegroundType = Typeface.createFromFile(CLOCK_FG_FONT);
}
mBgText = (TextView) findViewById(R.id.time_bg);
if (mBgText != null) {
if (mFgText != null) {
mFgText.setTypeface(sForegroundType);
}
+ mSolidText = (TextView) findViewById(R.id.time_solid);
+ if (mSolidText != null) {
+ mSolidText.setTypeface(sSolidType);
+ }
}
@Override
final void updateClock() {
mCalendar.setTimeInMillis(System.currentTimeMillis());
CharSequence txt = getTimeText();
- mBgText.setText(txt);
- mFgText.setText(txt);
+ if (mBgText != null) mBgText.setText(txt);
+ if (mFgText != null) mFgText.setText(txt);
+ if (mSolidText != null) mSolidText.setText(txt);
}
private final CharSequence getTimeText() {
ViewGroup mContentFrame;
Rect mContentArea = new Rect();
View mSettingsView;
- View mGlow;
ViewGroup mContentParent;
Choreographer mChoreo = new Choreographer();
mModeToggle = findViewById(R.id.mode_toggle);
mModeToggle.setOnClickListener(this);
- mGlow = findViewById(R.id.glow);
-
mSettingsButton = (ImageView)findViewById(R.id.settings_button);
mNotificationButton = (ImageView)findViewById(R.id.notification_button);
? new android.view.animation.DecelerateInterpolator(1.0f)
: new android.view.animation.AccelerateInterpolator(1.0f));
- Animator glowAnim = ObjectAnimator.ofInt(mGlow.getBackground(), "alpha",
- mVisible ? 255 : 0, appearing ? 255 : 0);
- glowAnim.setInterpolator(appearing
- ? new android.view.animation.AccelerateInterpolator(1.0f)
- : new android.view.animation.DecelerateInterpolator(1.0f));
+ if (mContentAnim != null && mContentAnim.isRunning()) {
+ mContentAnim.cancel();
+ }
mContentAnim = new AnimatorSet();
mContentAnim
.play(ObjectAnimator.ofFloat(mContentParent, "alpha",
mContentParent.getAlpha(), appearing ? 1.0f : 0.0f))
.with(bgAnim)
- .with(glowAnim)
.with(posAnim)
;
mContentAnim.setDuration((DEBUG?10:1)*(appearing ? OPEN_DURATION : CLOSE_DURATION));
createAnimation(appearing);
mContentParent.setLayerType(View.LAYER_TYPE_HARDWARE, null);
- mGlow.setLayerType(View.LAYER_TYPE_HARDWARE, null);
mContentAnim.start();
mVisible = appearing;
public void onAnimationCancel(Animator animation) {
if (DEBUG) Slog.d(TAG, "onAnimationCancel");
- // force this to zero so we close the window
- mVisible = false;
}
public void onAnimationEnd(Animator animation) {
setVisibility(View.GONE);
}
mContentParent.setLayerType(View.LAYER_TYPE_NONE, null);
- mGlow.setLayerType(View.LAYER_TYPE_NONE, null);
mContentAnim = null;
}
void workAroundBadLayerDrawableOpacity(View v) {
LayerDrawable d = (LayerDrawable)v.getBackground();
+ if (d == null) return;
v.setBackgroundDrawable(null);
d.setOpacity(PixelFormat.TRANSLUCENT);
v.setBackgroundDrawable(d);