Merge "re-use status bar DateView in QuickSettings." into jb-mr1-dev
This commit is contained in:
@@ -29,10 +29,11 @@
|
||||
android:hand_hour="@drawable/ic_qs_clock_hour"
|
||||
android:hand_minute="@drawable/ic_qs_clock_minute"
|
||||
/>
|
||||
<com.android.systemui.statusbar.policy.QuickSettingsDateView
|
||||
<com.android.systemui.statusbar.policy.DateView
|
||||
android:textAppearance="@style/TextAppearance.QuickSettings.TileView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.android.systemui.statusbar.policy;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.text.format.DateFormat;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.systemui.R;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public final class QuickSettingsDateView extends DateView {
|
||||
|
||||
public QuickSettingsDateView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
protected void updateClock() {
|
||||
final Context context = getContext();
|
||||
Date now = new Date();
|
||||
CharSequence dow = DateFormat.format("MMM d, yyyy", now);
|
||||
setText(dow);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user