Merge "Remove expansion and clear button."
|
Before Width: | Height: | Size: 761 B |
|
Before Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 751 B |
|
Before Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 845 B |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 695 B |
|
Before Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 874 B |
|
Before Width: | Height: | Size: 939 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 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_pressed="true"
|
||||
android:drawable="@drawable/ic_notify_open_normal" />
|
||||
<item
|
||||
android:drawable="@drawable/ic_notify_open_normal" />
|
||||
</selector>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/ic_notify_clear_normal" />
|
||||
<item android:drawable="@drawable/ic_notify_clear_normal" />
|
||||
</selector>
|
||||
@@ -78,22 +78,4 @@
|
||||
android:padding="2dp"
|
||||
/>
|
||||
|
||||
<include layout="@layout/status_bar_flip_button"
|
||||
android:id="@+id/header_flipper"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
<ImageView android:id="@+id/clear_all_button"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_toStartOf="@id/header_flipper"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_notify_clear"
|
||||
android:background="@drawable/ic_notify_button_bg"
|
||||
android:contentDescription="@string/accessibility_clear_all"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</com.android.systemui.statusbar.phone.StatusBarHeaderView>
|
||||
|
||||
@@ -144,7 +144,6 @@ public class NotificationPanelView extends PanelView implements
|
||||
|
||||
public void setQsExpansionEnabled(boolean qsExpansionEnabled) {
|
||||
mQsExpansionEnabled = qsExpansionEnabled;
|
||||
mHeader.setExpansionEnabled(qsExpansionEnabled);
|
||||
}
|
||||
|
||||
public void closeQs() {
|
||||
|
||||
@@ -240,8 +240,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
String mKeyguardHotwordPhrase = "";
|
||||
int mKeyguardMaxNotificationCount;
|
||||
View mDateTimeView;
|
||||
View mClearButton;
|
||||
ImageView mHeaderFlipper;
|
||||
|
||||
// carrier/wifi label
|
||||
private TextView mCarrierLabel;
|
||||
@@ -640,11 +638,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
mKeyguardBottomArea.setActivityStarter(this);
|
||||
mKeyguardIndicationTextView = (KeyguardIndicationTextView) mStatusBarWindow.findViewById(
|
||||
R.id.keyguard_indication_text);
|
||||
mClearButton = mStatusBarWindow.findViewById(R.id.clear_all_button);
|
||||
mClearButton.setOnClickListener(mClearButtonListener);
|
||||
mClearButton.setAlpha(0f);
|
||||
mClearButton.setVisibility(View.INVISIBLE);
|
||||
mClearButton.setEnabled(false);
|
||||
mDateView = (DateView)mStatusBarWindow.findViewById(R.id.date);
|
||||
|
||||
mDateTimeView = mNotificationPanelHeader.findViewById(R.id.datetime);
|
||||
@@ -653,8 +646,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
mDateTimeView.setEnabled(true);
|
||||
}
|
||||
|
||||
mHeaderFlipper = (ImageView) mStatusBarWindow.findViewById(R.id.header_flipper);
|
||||
|
||||
if (!mNotificationPanelIsFullScreenWidth) {
|
||||
mNotificationPanel.setSystemUiVisibility(
|
||||
View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS |
|
||||
@@ -1118,19 +1109,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
if (mNavigationBarView != null) {
|
||||
mNavigationBarView.setLayoutDirection(layoutDirection);
|
||||
}
|
||||
|
||||
if (mClearButton != null && mClearButton instanceof ImageView) {
|
||||
// Force asset reloading
|
||||
((ImageView)mClearButton).setImageDrawable(null);
|
||||
((ImageView)mClearButton).setImageResource(R.drawable.ic_notify_clear);
|
||||
}
|
||||
|
||||
if (mHeaderFlipper != null) {
|
||||
// Force asset reloading
|
||||
mHeaderFlipper.setImageDrawable(null);
|
||||
mHeaderFlipper.setImageResource(R.drawable.ic_notify_quicksettings);
|
||||
}
|
||||
|
||||
refreshAllStatusBarIcons();
|
||||
}
|
||||
|
||||
@@ -1301,38 +1279,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
+ " any=" + any + " clearable=" + clearable);
|
||||
}
|
||||
|
||||
if (mFlipSettingsView != null
|
||||
&& mFlipSettingsView.getVisibility() == View.VISIBLE
|
||||
&& mStackScroller.getVisibility() != View.VISIBLE) {
|
||||
// the flip settings panel is unequivocally showing; we should not be shown
|
||||
mClearButton.setVisibility(View.INVISIBLE);
|
||||
} else if (mClearButton.isShown()) {
|
||||
if (clearable != (mClearButton.getAlpha() == 1.0f)) {
|
||||
ObjectAnimator clearAnimation = ObjectAnimator.ofFloat(
|
||||
mClearButton, "alpha", clearable ? 1.0f : 0.0f).setDuration(250);
|
||||
clearAnimation.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mClearButton.getAlpha() <= 0.0f) {
|
||||
mClearButton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
if (mClearButton.getAlpha() <= 0.0f) {
|
||||
mClearButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
clearAnimation.start();
|
||||
}
|
||||
} else {
|
||||
mClearButton.setAlpha(clearable ? 1.0f : 0.0f);
|
||||
mClearButton.setVisibility(clearable ? View.VISIBLE : View.INVISIBLE);
|
||||
}
|
||||
mClearButton.setEnabled(clearable);
|
||||
|
||||
final View nlo = mStatusBarView.findViewById(R.id.notification_lights_out);
|
||||
final boolean showDot = (any&&!areLightsOn());
|
||||
if (showDot != (nlo.getAlpha() == 1.0f)) {
|
||||
@@ -2449,10 +2395,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
final Context context = mContext;
|
||||
final Resources res = context.getResources();
|
||||
|
||||
if (mClearButton instanceof TextView) {
|
||||
((TextView)mClearButton).setText(context.getText(R.string.status_bar_clear_all_button));
|
||||
}
|
||||
|
||||
// Update the QuickSettings container
|
||||
if (mQS != null) mQS.updateResources();
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ public class StatusBarHeaderView extends RelativeLayout {
|
||||
|
||||
private boolean mExpanded;
|
||||
private View mBackground;
|
||||
private View mFlipper;
|
||||
|
||||
private int mCollapsedHeight;
|
||||
private int mExpandedHeight;
|
||||
@@ -45,7 +44,6 @@ public class StatusBarHeaderView extends RelativeLayout {
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
mBackground = findViewById(R.id.background);
|
||||
mFlipper = findViewById(R.id.header_flipper);
|
||||
loadDimens();
|
||||
}
|
||||
|
||||
@@ -73,10 +71,6 @@ public class StatusBarHeaderView extends RelativeLayout {
|
||||
}
|
||||
}
|
||||
|
||||
public void setExpansionEnabled(boolean enabled) {
|
||||
mFlipper.setVisibility(enabled ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void setExpansion(float height) {
|
||||
if (height < mCollapsedHeight) {
|
||||
height = mCollapsedHeight;
|
||||
|
||||